-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wiegand 32 wrong output #58
Comments
Hi @pasleto The values are correct. In Wiegand standard, most significant bit and least significant bit are both parity check. They are not the ID of the card.
When you align the bits together like above, they are exactly the same. There are two ways you can resolve this
Hope this helps. |
Hi @jpliew, thanks for reply. A4DCCC1D is card UID, which i need to read exactly as it is. I tried to modify (*codelow & 0x7FFFFFFE ) >>1; to *codelow, but it returned 24DCCC1D. |
Your reader is outputting W32 2 parity bits + 30 data bit. To proof what I said, you can try this library https://github.com/jpliew/Wiegand-NG-Multi-Bit-Wiegand-Library-for-Arduino It will print the RAW data without modification. |
I tried NG library aswell, it outputs data as expected in binary format. But can't figure out how to get the output in hex. |
@pasleto your reader should output W34 with the parity bits. That way the library will be able to read W34 and give you the correct 32 bit data of the card. If you can configure the reader to send out W34 with parity in it, this will fix your problem. If not then you might want to use WiegandNG library and figure out how to convert the binary data to hex. |
Yeah, the reader supports multiple Wiegand outputs (26,32,34,37,40,56,64). I need modular solution for Wiegand from 32 bits up to 64 bits, so I will use NG library and modify the output somehow. |
Hello,
i have Mifare card with UID A4DCCC1D.
When reading with Wiegand reader using Wiegand 32 Type with this code i get this:
HEX = 126E660E, DECIMAL = 309224974, Wiegand Type = W32
The code is not the same as expected, it seems this library shift binary data off somehow:
A4DCCC1D To Binary Converted 10100100110111001100110000011101
126E660E To Binary Converted 00010010011011100110011000001110
-10100100110111001100110000011101 <- Mifare UID (HEX = A4DCCC1D | DECIMAL = 2765933597)
00010010011011100110011000001110- <- Wiegand 32 (HEX = 126E660E | DECIMAL = 309224974)
How to solve this issue?
The text was updated successfully, but these errors were encountered: