So, in my previous post you saw I setup my USB reader on my Pi, now I need that to add cards to a net2 system I use.
So after some digging I’ve found how Net2 generates it’s tokens (for RFID).
- It (only) takes the first four HEX pairs of the UID of the card
- It converts it to decimal
- The net2 token is the last 8 characters of the decimal figure
WARNING – Some card readers read the hex pairs in reverse.
You should test if yours is one of these with a card you have a known net2 token for, or you can input the test token into the net2 system to check it works.
If yours is one of these you must reverse the hex pairs of the UID before the steps mentioned here.
Generate your net2 tokens here: /projects/card2net2 if you like
Examples, they’re always handy…
Example for 4 byte UID tokens (as tested on Mifare Classic):
- Original UID in HEX : 63a6ed04
- Remember to reverse if your reader needs this step
- Convert to decimal : 1671884036
- Truncated to least significant/last 8 decimal digits : 71884036 <–THIS is the Number seen by Net2 ACU
Example for a 7 byte UID token (as tested on an Oyster card [Mifare DESFire]):
- Original UID in HEX : 802a21045037ca
- Reverse if your reader needs to
- Truncated UID in HEX (most significant 4 pairs) : 802a2104
- Convert to decimal : 2150244612
- Truncated to least significant 8 decimal digits: 50244612 <–Net2 Token