CuriousJames / DIYAC

Raspberry Pi Python code & PCB design project to control door access (access control) via a wiegand card and/or keypad reader, handles a doorbell too
6 stars 2 forks source link

Find card value from read token #39

Closed CuriousJames closed 4 years ago

CuriousJames commented 4 years ago

The problem: You only have one card reader - the wiegand reader itself. So you don't know the HEX value of the card as read by an NFC Phone, or any other non-wiegand reader.

The desired solution: A script or function of the main program to resolve the wiegand read token and output the card HEX, so that the card HEX can be put into the allowedTokens file.

Known limitations: For some card types the HEX is truncated, in these cicumstances we are not able to resolve the full card HEX value, but the code will output a VALID HEX value that can be added into the allowed tokens file.

tame-lx-tech commented 4 years ago

INFO and DBUG will both show the value of a token once it has been read (though until my last commit, DBUG didn't because it was spelt incorrectly)

CuriousJames commented 4 years ago

Yes, but you can't put that token into allowed tokens, as the value in allowedTokens is expected to be HEX, and so the value there cannot be the value that is read by the reader, i.e. the one the logger will be sent, right? I could well be wrong.

tame-lx-tech commented 4 years ago

you are wrong