To read FeliCa IDm on pasori RC-S320 here
Basically, it is exactly as described in Nfcpy official, but there were various stumbling points, so I summarized it. I did.
Hard: raspberrypi3 OS:raspbian Leader: pasori RC-S380
For version 0.10 of nfcpy, IDm could not be read properly when reading FeliCa of Osaifu-Keitai or driver's license, so 0.9 is installed below.
$ sudo apt-get install python-usb
$ sudo apt-get install bzr
$ mkdir nfcpy
$ cd nfcpy
$ bzr branch lp:nfcpy/0.9
Make "import nfc" available everywhere.
sudo ln -s /home/pi/nfcpy/0.9/nfc /usr/local/lib/python2.7/dist-packages/
Check the ID with lsusb.
$ lsusb
Bus 001 Device 004: ID 054c:06c3 Sony Corp.
...
If the confirmed ID is different from 054c: 06c3, change the idVendor and idProduct specifications of the following command and execute.
$ sudo sh -c 'echo SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"054c\", ATTRS{idProduct}==\"06c3\", GROUP=\"plugdev\" >> /etc/udev/rules.d/nfcdev.rules'
Reboot to reflect the settings.
sudo reboot -h now
idm_reader.py
import nfc
import binascii
def connected(tag):
idm = binascii.hexlify(tag.idm)
print(idm)
return idm
clf = nfc.ContactlessFrontend('usb')
clf.connect(rdwr={'on-connect': connected}) # now touch a tag
clf.close()