Difference between revisions of "Touchatag RFID Reader"

From ArchWiki
Jump to: navigation, search
m (Bot: Removing from Category:HOWTOs (English))
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Other hardware (English)]]
+
[[Category:Other hardware]]
 
Touchatag is a RFID Reader
 
Touchatag is a RFID Reader
  
Line 27: Line 27:
  
 
First install this:
 
First install this:
  # pacman -S pcsclite pcsc-tools pcsc-perl ccid
+
  # pacman -S pcsclite ccid
  
=== Install pcsclite-libudev ===
+
== Test Touchatag ==
  
The normal pcsclite package from the community repository uses libusb instead of udev, which causes problems when using the Touchatag reader. So we need to replace it with the [https://aur.archlinux.org/packages.php?ID=49245 pcsclite-libudev] package from AUR:
 
# cd /tmp
 
# wget https://aur.archlinux.org/packages/pcsclite-libudev/pcsclite-libudev.tar.gz
 
# tar -xf pcsclite-libudev.tar.gz
 
# cd pcsclite-libudev
 
# makepkg
 
# sudo pacman -U pcsclite-libudev-*.pkg.tar.xz
 
  
=== Install the ACS CCID PC/SC driver ===
+
To test the device run:
  
Install the [https://aur.archlinux.org/packages.php?ID=49246 acsccid] package from AUR:
+
  # sudo pcscd -f
# cd /tmp
+
# wget https://aur.archlinux.org/packages/acsccid/acsccid.tar.gz
+
# tar -xf acsccid.tar.gz
+
# cd acsccid
+
# makepkg
+
  # sudo pacman -U acsccid-*.pkg.tar.xz
+
  
With old versions of the ACS driver, you can get errors like these:
+
If you encounter a problem like this:
  
  ifdhandler.c: In functie ‘IFDHControl’:
+
  # pcscd -f
  ifdhandler.c:1304:8: fout: ‘PIN_PROPERTIES_STRUCTURE’ has no member named ‘wLcdMaxCharacters’
+
  ifdhandler.c:1305:8: fout: ‘PIN_PROPERTIES_STRUCTURE’ has no member named ‘wLcdMaxLines’
+
ccid_usb.c:859:ccid_check_firmware() Firmware (1.00) is bogus! Upgrade the reader firmware or get a new reader.
 +
  ifdhandler.c:104:IFDHCreateChannelByName() failed
 +
  readerfactory.c:1050:RFInitializeReader() Open Port 200000 Failed (usb:072f/2200:libusb:006)
 +
readerfactory.c:233:RFAddReader() ACS ACR122U PICC Interface init failed.
  
In such a case, you can try commenting out those to lines in src/ifdhandler.c.
+
The [http://code.google.com/p/libnfc/source/browse/trunk/README libnfc README] suggests to do this:
  
== Test Touchatag ==
+
If your Touchatag or ACR122 device fails being detected by PCSC-lite daemon (pcsc_scan doesn't see anything)
 +
then try removing the bogus firmware detection of libccid: edit libccid_Info.plist configuration file
 +
(usually /etc/libccid_Info.plist) and locate "<key>ifdDriverOptions</key>", turn "<string>0x0000</string>"
 +
value into 0x0004 to allow bogus devices and restart pcscd daemon.
 +
 +
Warning: if you use ACS CCID drivers (acsccid), configuration file is located in something like:
 +
/usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Info.plist
 +
 
 +
== Optional: Test tags ==
  
Try to scan your Touchatag:
+
# pacman -S pcsc-tools
  
 +
Put a tag on the reader and try to scan your Touchatag:
 +
# /etc/rc.d/pcscd start
 
  # pcsc_scan
 
  # pcsc_scan
  
Line 91: Line 91:
 
         touchatag SAM card
 
         touchatag SAM card
  
If you encounter a problem like this:
 
 
# pcscd -f
 
 
ccid_usb.c:859:ccid_check_firmware() Firmware (1.00) is bogus! Upgrade the reader firmware or get a new reader.
 
ifdhandler.c:104:IFDHCreateChannelByName() failed
 
readerfactory.c:1050:RFInitializeReader() Open Port 200000 Failed (usb:072f/2200:libusb:006)
 
readerfactory.c:233:RFAddReader() ACS ACR122U PICC Interface init failed.
 
 
The [http://code.google.com/p/libnfc/source/browse/trunk/README libnfc README] suggests to do this:
 
 
If your Touchatag or ACR122 device fails being detected by PCSC-lite daemon (pcsc_scan doesn't see anything)
 
then try removing the bogus firmware detection of libccid: edit libccid_Info.plist configuration file
 
(usually /etc/libccid_Info.plist) and locate "<key>ifdDriverOptions</key>", turn "<string>0x0000</string>"
 
value into 0x0004 to allow bogus devices and restart pcscd daemon.
 
 
Warning: if you use ACS CCID drivers (acsccid), configuration file is located in something like:
 
/usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Info.plist
 
  
 
== Install tagEventor ==
 
== Install tagEventor ==
Line 121: Line 103:
  
 
The scripts are located in /etc/gtagEventor. Read the [http://code.google.com/p/tageventor/ tagEventor documentation] on how to use them.
 
The scripts are located in /etc/gtagEventor. Read the [http://code.google.com/p/tageventor/ tagEventor documentation] on how to use them.
 
== Other related packages ==
 
 
The following AUR packages might also be worth a try:
 
 
[https://aur.archlinux.org/packages.php?ID=33272 libnfc]
 
 
[https://aur.archlinux.org/packages.php?ID=33274 mfoc]
 
 
[https://aur.archlinux.org/packages.php?ID=49244 mfcuk-svn]
 

Revision as of 13:53, 31 July 2012

Touchatag is a RFID Reader

About Touchatag

Touchatag is a RFID tag reader from Touchatag. It is a cheap set consisting of an ACR122U USB tag reader and MiFare Ultralight RFID tags.

It is available here or for Europe here.

Remember: Always put a tag on the reader, otherwise you might encounter problems!

Check hardware version

lsusb shows the device:

Bus 003 Device 004: ID 072f:2200 Advanced Card Systems, Ltd 

lsusb -v shows also the firmware version bcdDevice:

idVendor           0x072f Advanced Card Systems, Ltd
idProduct          0x2200 
bcdDevice            1.00

The Version this howto is about is the above ACS ACR122U PICC firmware 1.0.

Install Touchatag

First install this:

# pacman -S pcsclite ccid

Test Touchatag

To test the device run:

# sudo pcscd -f

If you encounter a problem like this:

# pcscd -f

ccid_usb.c:859:ccid_check_firmware() Firmware (1.00) is bogus! Upgrade the reader firmware or get a new reader.
ifdhandler.c:104:IFDHCreateChannelByName() failed
readerfactory.c:1050:RFInitializeReader() Open Port 200000 Failed (usb:072f/2200:libusb:006)
readerfactory.c:233:RFAddReader() ACS ACR122U PICC Interface init failed.

The libnfc README suggests to do this:

If your Touchatag or ACR122 device fails being detected by PCSC-lite daemon (pcsc_scan doesn't see anything) 
then try removing the bogus firmware detection of libccid: edit libccid_Info.plist configuration file 
(usually /etc/libccid_Info.plist) and locate "<key>ifdDriverOptions</key>", turn "<string>0x0000</string>" 
value into 0x0004 to allow bogus devices and restart pcscd daemon.

Warning: if you use ACS CCID drivers (acsccid), configuration file is located in something like: 
/usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Info.plist

Optional: Test tags

# pacman -S pcsc-tools

Put a tag on the reader and try to scan your Touchatag:

# /etc/rc.d/pcscd start
# pcsc_scan

You should get something like this:

PC/SC device scanner
V 1.4.17 (c) 2001-2009, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.6.6
Scanning present readers...
0: ACS ACR122U 00 00

Mon Mar 21 18:16:07 2011
 Reader 0: ACS ACR122U 00 00
  Card state: Card inserted, Shared Mode, 
  ATR: 3B BE 95 00 00 41 03 00 00 00 00 00 00 00 00 00 02 90 00 

ATR: 3B BE 95 00 00 41 03 00 00 00 00 00 00 00 00 00 02 90 00
+ TS = 3B --> Direct Convention
+ T0 = BE, Y(1): 1011, K: 14 (historical bytes)
  TA(1) = 95 --> Fi=512, Di=16, 32 cycles/ETU
    125000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 156250 bits/s                                                                
  TB(1) = 00 --> VPP is not electrically connected
  TD(1) = 00 --> Y(i+1) = 0000, Protocol T = 0 
-----
+ Historical bytes: 41 03 00 00 00 00 00 00 00 00 00 02 90 00
  Category indicator byte: 41 (proprietary format) 

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B BE 95 00 00 41 03 00 00 00 00 00 00 00 00 00 02 90 00
        touchatag SAM card


Install tagEventor

tagEventor runs in the background and executes scripts when a tag enters or leaves your tag reader.

Download a binary version or compile your own.

Run tagEventor to test your installation:

# tagEventor -v 1

The scripts are located in /etc/gtagEventor. Read the tagEventor documentation on how to use them.