$ sudo python tagtool.py -d nfc, I get the follow dump
[main] enable debug output for module 'nfc'
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.dev.transport] >>> 6f050000000000000000ff00480000
[nfc.dev.transport] <<< 800a000000000002810041435231323255323034
Traceback (most recent call last):
File "tagtool.py", line 479, in <module>
TagTool().run()
File "/lhome/kasper/temp/pynfc/nfcpy/examples/cli.py", line 283, in run
while self.run_once() and self.options.loop:
File "/lhome/kasper/temp/pynfc/nfcpy/examples/cli.py", line 230, in run_once
try: clf = nfc.ContactlessFrontend(device)
File "/lhome/kasper/temp/pynfc/nfcpy/nfc/clf.py", line 105, in __init__
if path and not self.open(path):
File "/lhome/kasper/temp/pynfc/nfcpy/nfc/clf.py", line 156, in open
self.dev = nfc.dev.connect(path)
File "/lhome/kasper/temp/pynfc/nfcpy/nfc/dev/__init__.py", line 64, in connect
device = driver.init(usb)
File "/lhome/kasper/temp/pynfc/nfcpy/nfc/dev/acr122.py", line 121, in init
chipset = Chipset(transport)
File "/lhome/kasper/temp/pynfc/nfcpy/nfc/dev/acr122.py", line 40, in __init__
reader_version = self.ccid_xfr_block(bytearray.fromhex("FF00480000"))
File "/lhome/kasper/temp/pynfc/nfcpy/nfc/dev/acr122.py", line 81, in ccid_xfr_block
if len(frame) != 10 + struct.unpack("<I", frame[1:5])[0]:
struct.error: unpack requires a string argument of length 4
I've tried the commands
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> struct.unpack("<I", "\x0A\x00\x00\x00")
(10,)
>>> struct.unpack("<I", bytearray("\x0A\x00\x00\x00"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: unpack requires a string argument of length 4
>>>
Hello everyone.
When running :
$ sudo python tagtool.py -d nfc, I get the follow dump
[main] enable debug output for module 'nfc' 00000ff00480000 281004143523132 3255323034 kasper/ temp/pynfc/ nfcpy/examples/ cli.py" , line 283, in run kasper/ temp/pynfc/ nfcpy/examples/ cli.py" , line 230, in run_once Frontend( device) kasper/ temp/pynfc/ nfcpy/nfc/ clf.py" , line 105, in __init__ kasper/ temp/pynfc/ nfcpy/nfc/ clf.py" , line 156, in open connect( path) kasper/ temp/pynfc/ nfcpy/nfc/ dev/__init_ _.py", line 64, in connect kasper/ temp/pynfc/ nfcpy/nfc/ dev/acr122. py", line 121, in init kasper/ temp/pynfc/ nfcpy/nfc/ dev/acr122. py", line 40, in __init__ xfr_block( bytearray. fromhex( "FF00480000" )) kasper/ temp/pynfc/ nfcpy/nfc/ dev/acr122. py", line 81, in ccid_xfr_block
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.dev.transport] >>> 6f0500000000000
[nfc.dev.transport] <<< 800a00000000000
Traceback (most recent call last):
File "tagtool.py", line 479, in <module>
TagTool().run()
File "/lhome/
while self.run_once() and self.options.loop:
File "/lhome/
try: clf = nfc.Contactless
File "/lhome/
if path and not self.open(path):
File "/lhome/
self.dev = nfc.dev.
File "/lhome/
device = driver.init(usb)
File "/lhome/
chipset = Chipset(transport)
File "/lhome/
reader_version = self.ccid_
File "/lhome/
if len(frame) != 10 + struct.unpack("<I", frame[1:5])[0]:
struct.error: unpack requires a string argument of length 4
I've tried the commands
Python 2.7.3 (default, Sep 26 2013, 20:03:06) "\x0A\x00\ x00\x00" ))
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> struct.unpack("<I", "\x0A\x00\x00\x00")
(10,)
>>> struct.unpack("<I", bytearray(
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: unpack requires a string argument of length 4
>>>
So have I got a wrong python version ?
Thanks in advance