A "useful" RFID reader ? Yes M'am !

I just had the opportunity to recycle a Mir:ror from Violet (the former Nabaztag's company) I found in a garage sale.

Here is the plot : a friend of mine has set up a scheme with his kids where they text him (and their mum) every time they leave the house or return to it. This procedure could (should?) be replaced by putting an object on the RFID reader (aka 'check-in') when a kid comes home and removing said object when the kid leaves (aka 'check-out').

The Mir:ror needed a web service from the Violet company to function and said service died mid-2011, hence bricking the device. There has been some attempts to bring it back to life with the likes of "touchtag" (needs a service) or "TagEventor" (local) but I wanted something less intrusive and more self-contained.

Long story short, I connected the Mir:ror to a linux box and it showed up as /dev/hidraw0 immediately. A few of python instructions later and I basically had the core of the functionality working. The devil is in the details though and I struggled to get the script to work on OSX (the device never showed up in /dev to begin with). To the point that I thought I could write this instructable as it might be useful to others...

What you will need for this project:
- a Mir:ror from violet (about 10 / 15 euros on ebay / in a garage sale these days)
- RFID tags (Nanoztags or Ztamps that came with the Mir:ror or any ISO14443A card, ebay is your friend)
- a linux box (mine is running Fedora) or a Mac running OSX (mine is running 10.6.8).

- http://en.wikipedia.org/wiki/Mir:ror
- http://svay.com/blog/hacking-rfid-with-nodejs/
- http://nodejs.org/#download
- http://caspian.dotconf.net/menu/Software/SendEmail/
- http://www.gabrielserafini.com/blog/2008/08/19/mac-os-x-voices-for-using-with-the-say-command/

Step 1: OSX installation

[note: I used to use node.js here but due to incompatibility with 10.5.8, I ended up modifying a hidapi example instead.]

Hidtest is a program that opens the device and reads from it. It is a modified example of the hidapi package. Details in step 4.

Copy the attached hidtest and spotify_osx.sh files into your home directory.
Then, in a terminal:

bash-3.2$ chmod 777 mirror_osx.sh
bash-3.2$ chmod 777 hidtest

Start the script in a terminal

bash-3.2$ ./mirror_osx.sh


If you want the script to run in the background, edit your crontab ("crontab -e") to look like this:

bash-3.2$ sudo su
bash-3.2$ ln -s $HOME/mirror_osx.sh
bash-3.2$ ln -s $HOME/hidtest
@reboot /bin/bash $HOME/mirror_osx.sh > $HOME/mirror.log 2>&1

Upon reboot, the script will be automatically started.

About This Instructable


8 favorites


More by nicoo: Hacked roomba + arduino snowballs into a Eurobot 2013 entry... Flashing bootloader into Arduino UNO R3 Arduino Sprinkler System + Web control
Add instructable to: