sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Mon Jul 27, 2015 4:15 am

Hi everyone,

I'm using a ACS ACR1252U card reader (http://www.acs.com.hk/en/products/342/a ... ed-reader/) connected via USB and to be honest I have no idea how to get it working. I've Googled a ton of stuff but no luck. The following is more or less what I've done:

I get the following using dmesg:

[ 7173.059710] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[ 7173.160500] usb 1-1.3: not running at top speed; connect to a high speed hub
[ 7173.163114] usb 1-1.3: New USB device found, idVendor=072f, idProduct=223b
[ 7173.163147] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7173.163168] usb 1-1.3: Product: ACR1252 Dual Reader
[ 7173.163186] usb 1-1.3: Manufacturer: ACS

I installed PyUSB and I'm able to detect the device using some of the sample code, but nothing like reading the NFC card when swiped.

I also installed libacsccid1 package which says it supports this device https://github.com/acshk/acsccid, but I don't know exactly how to use this.

Besides that, I don't know what else to do. Any help will be greatly appreciated. The goal of my project is to control a GPIO output dependent on the value of the NFC tag detected.

Thanks!

ghp
Posts: 1498
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Tue Jul 28, 2015 5:14 am

Had a short look to the product page and it looks as if this device is using only closed drivers for win and linux for intel or amd platforms. The driver packages for linux do not contain sources.
The PC/SC package you found is a software interface which is on top of a driver and provides a uniform access for operating system.
Try to get in contact with the manufacturer and ask for a driver support for debian ARM.
Regards,
Gerhard

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Tue Jul 28, 2015 1:32 pm

The "acsccid" drivers are made to work with "pcsclite" so I think they should work without any special firmware or binary blob.

Even the standard libccid driver claim that this reader "should work": https://pcsclite.alioth.debian.org/ccid ... 072F0x221A

There is a command "pcsc_scan" that comes from the "pcsc-tools" package that could be used to test the reader. Probably have to be run as root:

Code: Select all

sudo pcsc_scan

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Thu Jul 30, 2015 5:46 am

I've posted a bit more info in case you can take a look:

http://raspberrypi.stackexchange.com/qu ... ard-reader

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Thu Jul 30, 2015 11:28 am

I still think that trying to talk to the reader directly is a bad idea, but its possible to do. You just have to have the complete knowledge about the device.

What I think you are missing from your code in the stackexcange post is the CCID protocol. https://en.wikipedia.org/wiki/CCID_(pro ... are_driver

Using libraries like "libnfc" and "pcsclite" makes more sense, then you shouldn't need to worry too much about the implementation details.

libnfc doesn't have to have support for this reader atm. there are some requests to add it but no one has confirmed that they are working on it.

So I still think that using pcsclite is your best bet.
http://python-pcsclite.sourceforge.net/doc/html/
http://acsccid.sourceforge.net/

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Thu Jul 30, 2015 12:49 pm

Thanks topguy!

I believe I had installed pscslite and had the issue that it wouldn't detect the device, but I've tried so many things I can't remember the specifics.

I'll try this again though!

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Thu Jul 30, 2015 1:17 pm

You might need to compile pcsclite and acsccid yourself to get it to work.
Or you could start pcscd manually in debug mode to get more information about how it deals with the device.
http://ludovicrousseau.blogspot.no/2011 ... utput.html

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Fri Jul 31, 2015 12:23 am

What's the relationship between libccid/libacsccid1 and pcscd?

I'm able to install and run pcscd using: pcscd --foreground --debug

I get the following:

Code: Select all

root@raspberrypi:/home/pi# pcscd --foreground --debug
00000000 debuglog.c:269:DebugLogSetLevel() debug level=debug
00002431 configfile.l:298:DBGetReaderList() Parsing conf file: /etc/reader.conf.d
00001132 pcscdaemon.c:518:main() pcsc-lite 1.8.4 daemon ready.
00009862 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00002695 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00002580 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
00002531 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0xEC00, path: /dev/bus/usb/001/003
00002520 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
00002804 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x072F, PID: 0x223B, path: /dev/bus/usb/001/006
00002547 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x072F, PID: 0x223B, path: /dev/bus/usb/001/006
00002448 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
The device with vendor id=0x072F and product id=0x223B is mine. I imagine it's listed twice because it has 1 configuration but 2 interfaces.

I'm unable to install libacsccid1 (using apt-get install libacsccid1) because of dependency issues with libc6:

Code: Select all

root@raspberrypi:/home/pi# apt-get install libacsccid1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libnfc-dev : Depends: libusb-dev but it is not going to be installed
 libnfc5 : Depends: libc6 (>= 2.15) but 2.13-38+rpi2+deb7u8 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I tried updating my sources.list to include deb http://ftp.us.debian.org/debian sid main but I keep on getting dependency errors (even worse IMO, since some packages need < N while others need > N).

Stuck again :(

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Fri Jul 31, 2015 1:01 am

I was able to install both libacsccid1 and libccid by doing a "apt-get -f install".

I run pscsd and then pscs_scan but this only returns:

Code: Select all

root@raspberrypi:/home/pi/acsccid# pcsc_scan 
PC/SC device scanner
V 1.4.20 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.3
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader...
Again, I don't understand the relationship with libacsccid1/libccid and how it's supposed to be used. Any pointers would be appreciated.

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Fri Jul 31, 2015 3:37 am

I've also installed python-pyscard and I'm trying some of the samples (for example, "Display the ATR of inserted cards") however it does nothing. I imagine that is because no device is found in pcsc_scan?

http://pyscard.sourceforge.net/pyscard- ... rk-samples

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Fri Jul 31, 2015 9:18 am

Getting the pcsc deamon to recognize the reader is a primary concern.

CCID is an usb-standard for how you talk to usb-smartcards readers, and the standard libccid drivers are maintained by the same people who write pcsclite. https://alioth.debian.org/projects/pcsclite/

Exactly how the "pcscd" binary figures out which drivers are available I'n not sure, but it looks like they are being installed under "/usr/lib/pcsc/drivers".

Did you run stuff as super-user as I mentioned earlier, I've had different results sometimes when using "sudo".

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Sat Aug 01, 2015 6:23 pm

Hi! Again, I appreciate your help.

Yes, everything is being done as root.

This is the content of /usr/lib/pcsc/drivers/

Code: Select all

root@raspberrypi:/home/pi# ls -la /usr/lib/pcsc/drivers/
total 20
drwxr-xr-x 5 root root 4096 Jul 31 00:51 .
drwxr-xr-x 3 root root 4096 Jul 27 02:20 ..
drwxr-xr-x 3 root root 4096 Jul 27 02:20 ifd-acsccid.bundle
drwxr-xr-x 3 root root 4096 Jul 31 00:51 ifd-ccid.bundle
drwxr-xr-x 2 root root 4096 Jul 31 00:51 serial
Inside /usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux I have:

Code: Select all

root@raspberrypi:/usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux# ls -la
total 100
drwxr-xr-x 2 root root  4096 Jul 27 02:20 .
drwxr-xr-x 3 root root  4096 Aug  1 16:13 ..
lrwxrwxrwx 1 root root    19 Apr 22  2012 libacsccid.so -> libacsccid.so.1.0.3
-rw-r--r-- 1 root root 92384 Apr 22  2012 libacsccid.so.1.0.3
And inside the ccid version is:

Code: Select all

root@raspberrypi:/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux# ls -la
total 100
drwxr-xr-x 2 root root  4096 Jul 31 00:51 .
drwxr-xr-x 3 root root  4096 Jul 31 00:51 ..
-rw-r--r-- 1 root root 92080 Jul  3  2012 libccid.so
So I'm guessing it's simply that the device isn't being recognized or the drivers aren't being loaded.

sandywilkinscr
Posts: 15
Joined: Sun Jun 28, 2015 3:30 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Sat Aug 01, 2015 6:35 pm

Just out of curiosity I opened Info.plist (in /usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/) and noticed that my device wasn't listed. So I went ahead and added my info in the ifdVendorID (0x072F), ifdProductID (0x223B), and ifdFriendlyName (ACS ACR1252U Dual PICC-SAM Reader) arrays, and ran pcscd -fd.

It's now working! If I run pcsc-scan it will show:

Code: Select all

root@raspberrypi:/usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents# pcsc_scan 
PC/SC device scanner
V 1.4.20 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.3
Using reader plug'n play mechanism
Scanning present readers...
0: ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader PICC] 00 00

Sat Aug  1 18:29:02 2015
Reader 0: ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader PICC] 00 00
  Card state: Card removed, 
I can scan an NFC card and it will display some of it's info:

Code: Select all

Sat Aug  1 18:31:32 2015
Reader 0: ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader PICC] 00 00
  Card state: Card inserted, 
  ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68

ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68
+ TS = 3B --> Direct Convention
+ T0 = 8F, Y(1): 1000, K: 15 (historical bytes)
  TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0 
-----
  TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1 
-----
+ Historical bytes: 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00
  Category indicator byte: 80 (compact TLV data object)
    Tag: 4, len: F (initial access data)
      Initial access data: 0C A0 00 00 03 06 03 00 03 00 00 00 00
+ TCK = 68 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68
3B 8F 80 01 80 4F 0C A0 00 00 03 06 .. 00 03 00 00 00 00 ..
	Mifare Ultralight (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 .. .. 00 00 00 00 ..
	RFID - ISO 14443 Type A Part 3 (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68
	RFID - ISO 14443 Type A - NXP Mifare Ultralight or UltralightC

Sat Aug  1 18:31:35 2015
Reader 0: ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader PICC] 00 00
  Card state: Card removed, 
This device in particular has 1 USB configuration with 2 interfaces (PICC and SAM). Although the one I need is the PICC interface, I also noticed that when trying to configure the SAM interface it fails because the USB device (/dev/bus/usb/001/007) is already in use. Just out of curiosity, how would one select one or the other?

If you see towards the end there's an error message:

Code: Select all

root@raspberrypi:/home/pi# pcscd -fd
00000000 debuglog.c:269:DebugLogSetLevel() debug level=debug
00002264 configfile.l:245:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00001151 configfile.l:298:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00001476 configfile.l:257:DBGetReaderListDir() Skipping non regular file: .
00000775 configfile.l:257:DBGetReaderListDir() Skipping non regular file: ..
00002169 pcscdaemon.c:518:main() pcsc-lite 1.8.4 daemon ready.
00017557 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00002782 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00002512 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
00002641 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0xEC00, path: /dev/bus/usb/001/003
00002503 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
00002785 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x072F, PID: 0x223B, path: /dev/bus/usb/001/007
00001343 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x072F, PID: 0x223B, path: /dev/bus/usb/001/007
00001074 hotplug_libudev.c:311:HPAddDevice() Adding USB device: ACS ACR1252U Dual PICC-SAM Reader
00001378 readerfactory.c:941:RFInitializeReader() Attempting startup of ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader PICC] 00 00 using /usr/lib/pcsc/drivers/i
00002743 readerfactory.c:831:RFBindFunctions() Loading IFD Handler 3.0
00001430 ifdhandler.c:2331:init_driver() Driver version: 1.0.3
00003227 ifdhandler.c:2344:init_driver() LogLevel: 0x0003
00002662 ifdhandler.c:2364:init_driver() DriverOptions: 0x00C0
00002594 ifdhandler.c:2391:init_driver() ACR38CardVoltage: 0
00002842 ifdhandler.c:2398:init_driver() ACR38CardType: 0
00000787 ifdhandler.c:94:IFDHCreateChannelByName() lun: 0, device: usb:072f/223b:libudev:0:/dev/bus/usb/001/007
00005476 ccid_usb.c:309:OpenUSBByName() Manufacturer: Advanced Card Systems Ltd.
00002648 ccid_usb.c:319:OpenUSBByName() ProductString: ACS CCID driver
00002790 ccid_usb.c:325:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later
00006021 ccid_usb.c:582:OpenUSBByName() Found Vendor/Product: 072F/223B (ACS ACR1252U Dual PICC-SAM Reader)
00000986 ccid_usb.c:584:OpenUSBByName() Using USB bus/device: 001/007
00001684 ccid_usb.c:1280:get_data_rates() IFD does not support GET_DATA_RATES request: Broken pipe
00001604 ifdhandler.c:220:IFDHCreateChannelByName() dwFeatures: 0x00040040
00000984 ifdhandler.c:221:IFDHCreateChannelByName() wLcdLayout: 0x0000
00001708 ifdhandler.c:222:IFDHCreateChannelByName() bPINSupport: 0x00
00000885 ifdhandler.c:223:IFDHCreateChannelByName() dwMaxCCIDMessageLength: 522
00000879 ifdhandler.c:224:IFDHCreateChannelByName() dwMaxIFSD: 254
00000887 ifdhandler.c:225:IFDHCreateChannelByName() dwDefaultClock: 4000
00000886 ifdhandler.c:226:IFDHCreateChannelByName() dwMaxDataRate: 250000
00000882 ifdhandler.c:227:IFDHCreateChannelByName() bMaxSlotIndex: 0
00001145 ifdhandler.c:228:IFDHCreateChannelByName() bCurrentSlotIndex: 0
00000936 ifdhandler.c:229:IFDHCreateChannelByName() bInterfaceProtocol: 0x00
00000700 ifdhandler.c:230:IFDHCreateChannelByName() bNumEndpoints: 3
00000888 ifdhandler.c:231:IFDHCreateChannelByName() bVoltageSupport: 0x07
00001136 ifdhandler.c:536:IFDHGetCapabilities() tag: 0xFB3, usb:072f/223b:libudev:0:/dev/bus/usb/001/007 (lun: 0)
00000723 readerfactory.c:294:RFAddReader() Using the pcscd polling thread
00002239 ifdhandler.c:536:IFDHGetCapabilities() tag: 0xFAE, usb:072f/223b:libudev:0:/dev/bus/usb/001/007 (lun: 0)
00000793 ifdhandler.c:629:IFDHGetCapabilities() Reader supports 1 slot(s)
00003945 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x072F, PID: 0x223B, path: /dev/bus/usb/001/007
00001346 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x072F, PID: 0x223B, path: /dev/bus/usb/001/007
00001351 hotplug_libudev.c:311:HPAddDevice() Adding USB device: ACS ACR1252U Dual PICC-SAM Reader
00002486 ifdhandler.c:536:IFDHGetCapabilities() tag: 0xFAF, usb:072f/223b:libudev:0:/dev/bus/usb/001/007 (lun: 0)
00001062 readerfactory.c:589:RFSetReaderName() Support 16 simultaneous readers
00000964 ifdhandler.c:536:IFDHGetCapabilities() tag: 0xFAD, usb:072f/223b:libudev:0:/dev/bus/usb/001/007 (lun: 0)
00001127 readerfactory.c:241:RFAddReader() Driver is thread safe
00000910 readerfactory.c:941:RFInitializeReader() Attempting startup of ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader SAM] 01 00 using /usr/lib/pcsc/drivers/if
00000735 readerfactory.c:745:RFLoadReader() Reusing already loaded driver for /usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so
00001202 readerfactory.c:831:RFBindFunctions() Loading IFD Handler 3.0
00001225 ifdhandler.c:94:IFDHCreateChannelByName() lun: 10000, device: usb:072f/223b:libudev:1:/dev/bus/usb/001/007
00004195 ccid_usb.c:309:OpenUSBByName() Manufacturer: Advanced Card Systems Ltd.
00002837 ccid_usb.c:319:OpenUSBByName() ProductString: ACS CCID driver
00002707 ccid_usb.c:325:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later
00005583 ccid_usb.c:499:OpenUSBByName() USB device 001/007 already in use. Checking next one.
00193432 ifdhandler.c:118:IFDHCreateChannelByName() failed
00000898 readerfactory.c:972:RFInitializeReader() Open Port 0x200001 Failed (usb:072f/223b:libudev:1:/dev/bus/usb/001/007)
00000950 readerfactory.c:279:RFAddReader() ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader SAM] init failed.
00000970 readerfactory.c:992:RFUnInitializeReader() Attempting shutdown of ACS ACR1252U Dual PICC-SAM Reader [ACR1252 Dual Reader SAM] 01 00.
00002736 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
Thanks again!

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Mon Aug 03, 2015 4:18 pm

When connecting to PCSC you will get a list (array) of available reader names, you just have to use the correct name when trying to establish connection to a card.

pieterjandc
Posts: 12
Joined: Tue Feb 16, 2016 1:24 pm

Re: Raspberry Pi and the ACS ACR1252U USB NFC Card reader

Tue Feb 16, 2016 1:32 pm

I think you still need to install the card-reader's driver using apt-get.
I had the same issue so I did research for a long time and finally came to http://androidraspberryarduino.blogspot.be/.
I executed

Code: Select all

sudo apt-get install libacr38u
and everything started working.
Run

Code: Select all

pcsc_scan
in the command prompt and you'll get all the info

Code: Select all

PC/SC device scanner
V 1.4.23 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.11
Using reader plug'n play mechanism
Scanning present readers...
0: ACS ACR38U 00 00

Sat Feb 13 02:11:11 2016
Reader 0: ACS ACR38U 00 00
  Card state: Card inserted,
  ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11

ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11
+ TS = 3B --> Direct Convention
+ T0 = 98, Y(1): 1001, K: 8 (historical bytes)
  TA(1) = 13 --> Fi=372, Di=4, 93 cycles/ETU
    43010 bits/s at 4 MHz, fMax for Fi = 5 MHz => 53763 bits/s
  TD(1) = 40 --> Y(i+1) = 0100, Protocol T = 0
-----
  TC(2) = 0A --> Work waiting time: 960 x 10 x (Fi/F)
+ Historical bytes: A5 03 01 01 01 AD 13 11
  Category indicator byte: A5 (proprietary format)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):	
3B 98 13 40 0A A5 03 01 01 01 AD 13 11
        Belgium Electronic ID card

Return to “Python”