indianajones Posted May 11, 2021 Posted May 11, 2021 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! 0 Quote
indianajones Posted May 12, 2021 Author Posted May 12, 2021 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! 1 Quote
Stanisław Posted June 20, 2023 Posted June 20, 2023 @indianajones any chance you could possible share the code of wiegand reader/library/handler? 0 Quote
Recommended Posts
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.