Obtaining RFID token

Hey everyone!

So I’ve set up a Wiegand RFID reader, but I’m not sure how to see the data for a scanned tag so I can assign it to a user for authentication.

Using Arduino’s Serial Monitor doesn’t seem to show a token just characters.

I thought the tokens would show up under the token section of the web portal, but it only gives the option to enter a token for a user.

I’d appreciate any help, thanks!

Did you add the modifications that @johnnyruz published under his github page? It took me quite a while to get all of the files updated with the correct code. Now when a new token is detected, it will show up in the tokens page and I can associate it with a user.


If you don’t already have your setup in a “production” state, the easiest way to get that working would be to do a fresh install with a script I’ve recently developed which should install my latest updates, including the support for automatically adding the RFID tokens to the Admin > Tokens screen when they are scanned so you can then assign them to a user. I would also, selfishly, like people to beta-test this!!

On a fresh Debian (or Raspbian on RPi) install, run the following:
bash <(wget -qO- https://raw.githubusercontent.com/johnnyruz/kegbot-server/add_my_pkgs_to_github/install_latest.sh)

On another side note, I’ve also put together a script to install the Node.JS server to allow for Live Pour data as well as Live feedback when you scan RFID tags. Run this AFTER you’ve completed your Kegbot install and know your IP address and API key for the installation:
bash <(wget -qO- https://raw.githubusercontent.com/johnnyruz/kegbot-server/add_my_pkgs_to_github/install_node_latest.sh)


I actually did a fresh install using your one line script on Buster!
But I did add the RFID after, can I just re-run your script?

(Thanks by the way for all the enhancements, once I get this working I was absolutely going use the node server for the live pours)

Part of me was wondering if I wired something wrong, but I suppose if I did, it shouldn’t give me an RFID.CORE response when scanninga tag in Arduino serial monitor…right?

EDIT: I installed a fresh image with your script, and it doesn’t seem to be showing up. I’m thinking something may be wired incorrectly, but the serial monitor seems to put out data when scanned.

Hmm, so I haven’t messed with the Wiegand stuff, but give this a try.

If you navigate to the folder /home/kegbot/kegbot-pycore.venv/bin and execute the kegboard-monitor.py script, it should give a decent idea of what the Kegbot Server is seeing from the kegboard.

In my case I’m seeing the following when scanning an RFID tag:

The next troubleshooting step would be to see if the messages are successfully getting published to the Redis Pub/Sub.

If you run the following, you should get some output like below when you scan a tag:

subscribe kegnet


So, after running the running the monitor, I noticed whenever I would scan a tag, the application would crash.

I looked at the manual, and noticed the reader I have does list 9-12V. (Duh, I just assumed it would work with 5v)

So after wiring a 12v adapter to power it up, it did post to the token page.

But with following the wiring manual for the reader (Wires D0/D1), it would only post 0 for the token when scanning, and when I swapped the wires(Thinking maybe they swapped the data wires), it would return with data, but the token would change slightly each time you would scan it.

I’m thinking it’s just an issue with the reader. Shame

I ended up buying the same reader you added support for (MFRC522 SPI RFID) and just wired it up, and everything seems to be working correctly!

I’m in the process of installing Node right now.

Thanks again for all your help guys, and thanks to @johnnyruz for the updates to the kegbot system!

You’re welcome, glad you got it working!

What model reader were you trying to use? Not committing to get one and try to make it work but may be another project for the future :slight_smile:

Do I need to add a program to the Arduino before I run your second step or does your scrip write the needed info to the Arduino

No the script does not do anything with the Arduino, although that’s an interesting thought.

In order to enable the RC522 features just flash the Arduino INO file from my Github page: https://github.com/johnnyruz/kegboard/tree/master/arduino/kegboard

FYI there have been no updates to the Kegboard code as part of these install scripts or new features in the last year, so if you’re running my firmware already no need to upgrade as part of this.

I am going to have to go back and reload the files from the start as part of the reload I may as well load your firmware for the Arduino can you give me that link thanks

on a side note does anyone have the correct pin connection RFID RC522 to Arduino NanoV3

1 Like