NFCpy

From air
Jump to: navigation, search

Bibliothèque Python pour la NFC

http://nfcpy.readthedocs.org/en/latest/overview.html


supporte ACS ACR 122 et SCL3711

Installation

sudo apt-get install bzr
mkdir nfcpy
cd nfcpy
bzr branch lp:nfcpy trunk
sudo apt-get install python-usb
pip install libusb1
cd trunk/
examples/tagtool.py show
examples/tagtool.py --device usb
lsusb
examples/tagtool.py --device usb:072f:2200

Exemples

  • examples/tagtool.py Read or write or format tags for NDEF use.
  • examples/ndeftool.py Generate or inspect or reorganize NDEF data.
  • examples/beam.py Exchange NDEF data with a smartphone.
~/nfcpy/nfcpy$ lsusb
...
Bus 002 Device 003: ID 04e6:5591 SCM Microsystems, Inc.
Bus 001 Device 006: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
...

~/nfcpy/nfcpy$ python examples/tagtool.py show
[nfc.clf] searching for reader with path 'usb'
[nfc.clf] using SCM Micro SCL3711-NFC&RW at usb:002:003
[main] touch a tag
[nfc.dev] Driver.set_communication_mode() should be implemented.
Type2Tag ATQ=4400 SAK=00 UID=040a82da4b2881
NDEF capabilities:
  version   = 1.0
  readable  = yes
  writeable = yes
  capacity  = 135 byte
  message   = 44 byte
NDEF record list:
record 1
  type   = 'urn:nfc:wkt:U'
  name   = ''
  data   = '\x03nfc.intel-software-academic-program.com'

~/nfcpy/nfcpy$ python examples/tagtool.py dump
[nfc.clf] searching for reader with path 'usb'
[nfc.clf] using SCM Micro SCL3711-NFC&RW at usb:002:003
[main] touch a tag
[nfc.dev] Driver.set_communication_mode() should be implemented.
d1012855036e66632e696e74656c2d736f6674776172652d61636164656d69632d70726f6772616d2e636f6d