This guide will show you how to setup a USB RFID Reader that uses MQTT to broadcast scan information.

The code uses the 'RFIDIOt' RFID library to read tags and the 'Nyamuk' MQTT client library to publish the information.

Step 1: Installing RFIDIOt

Download the RFIDIOt library at https://github.com/AdamLaurie/RFIDIOt

The library has a lot of dependencies which may make installation difficult. It is therefore recommended that you use the 'Getting Started' section of the documentation as guide to installation.

Documentation: http://www.rfidiot.org/documentation.html

Testing your installation
With the reader plugged in, place a tag on the reader and run the example script 'cardselect.py' (included with RFIDIOt library). Information about the card reader and tag should be outputted. 
<p>Being a bit of Linux newb but a big Pi Fan I'm struggling at step1, pathetic I know. I have the reader pictured above. The Pi is detecting the device a quick lsusb lists it as</p><p>Bus 001 Device 005: ID 072f:2200 Advanced Card Systems, Ltd</p><p>I've installed various libs:</p><p>libpcsclite1</p><p>libpcsclite-dbg</p><p>libpcsclite-dev</p><p>libccid</p><p>and all the various python libs using PIP (I think).</p><p>However a quick 'ls /dev/tty*' shows that I don't have a ttyUSBx, there are no devices listed here. Due to this running the test script returns there are no card readers connected. </p><p>Any suggestions as to where I'm going wrong?</p>
<p>were you able to solve this issue? I'm having a similar problem where I can't install pcsc-lite since it's not compatible with raspbian. </p>
I found the reader here... <br>http://nfctags.tagstand.com/products/usb-nfc-reader-writer-acr122u <br> <br>I'm sure there are other places to buy it as well. <br>
This was a student project. The aim is to connect this to a gumball machine we have modified and have it deliver you a random number of gumballs when you swipe your smart card over the reader. For some of our colleagues, this could be a very, very low random number (0) most of the time. :)
what type of reading device do you use?
will you use this to build something else? what are you making?

About This Instructable


71 favorites

More by roscoe_h: USB RFID + Python + Pub-Sub (MQTT)
Add instructable to: