【raspberry】nfcpy 1.0.1

 

raspberry piでpynfcを使う。

pythonは2.7

 

nfcpy

https://nfcpy.readthedocs.io/en/latest/topics/get-started.html#

 

1.0.1からnfcからndefが分離している。

ndef

https://ndeflib.readthedocs.io/en/latest/records/text.html

 

sudo apt install python-pip
pip install libusb1
pip install pyserial
pip install -U nfcpy
sudo apt-get install python-usb

python -m nfc
pip install ndef pip install ndeflib
This is the 1.0.1 version of nfcpy run in Python 2.7.16
on Linux-4.19.57-v7+-armv7l-with-debian-10.0
I'm now searching your system for contactless devices
** found usb:054c:06c3 at usb:001:006 but access is denied
-- the device is owned by 'root' but you are 'pi'
-- also members of the 'root' group would be permitted
-- you could use 'sudo' but this is not recommended
-- better assign the device to the 'plugdev' group
sudo sh -c 'echo SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"054c\", ATTRS{idProduct}==\"06c3\", GROUP=\"plugdev\" >> /etc/udev/rules.d/nfcdev.rules'
sudo udevadm control -R # then re-attach device
I'm not trying serial devices because you haven't told me
-- add the option '--search-tty' to have me looking
-- but beware that this may break other serial devs
Sorry, but I couldn't find any contactless device

sudo sh -c 'echo SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"054c\", ATTRS{idProduct}==\"06c3\", GROUP=\"plugdev\" >> /etc/udev/rules.d/nfcdev.rules'
sudo udevadm control -R

reboot


sudo apt-get install git
git clone git://github.com/nfcpy/nfcpy

python examples/tagtool.py show

 

 

format

 

read

 

write

 


OLD


sudo apt-get install bzr

bzr branch lp:nfcpy

sudo apt-get install python-usb

sudo python examples/tagtool.py show

nfcpy
http://nfcpy.readthedocs.org/en/latest/topics/get-started.html

 

Leave a Reply