May 11, 20215 yr I'm writing a wiegand protocol handler in a Linux Kernel Module for the NanoPi NEO (AllWinner H3). I have the code working, meaning the interrupt handlers for the D0 and D1 pins do in fact get called when I swipe a prox card. However, I'm missing usually about half or more of the 26 bits. The wiegand protocol is 26 pulses, each pulse 50uS wide, and separated by 2000us, so yeah it has to be fast. I've set the debounce value to zero using gpio_set_debounce(), so it's running as quickly as I can make it without patching Linux source. After doing some reading, I think I need to modify the device tree to make the default polling speed for GPIOA pins faster. Or maybe I need to make the debounce values shorter, not sure which. But this is the first time I will have messed with the device tree, and I could use some pointers on the H3 device tree. Thanks!
May 12, 20215 yr Author Good news! I was able to follow the devmem2 instructions in this forum article posted by @Ohms, and get all 26 pulses (by modifying the debounce timer). Result!
June 20, 20233 yr @indianajones any chance you could possible share the code of wiegand reader/library/handler?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.