pn533 reader not found at usb

Asked by xiF

Hi,
I was following the Getting Started tutorial, running the example program, using "python examples/tagtool.py show" i get following output:

[nfc.clf] searching for reader with path 'usb'
[nfc.clf] no reader found at 'usb'
[main] no contactless reader found

Running again this:

[nfc.clf] searching for reader with path 'usb'
[nfc.dev.pn53x] missing ack frame from pn53x
[nfc.clf] no reader found at 'usb'
[main] no contactless reader found

It switches every time between this two versions.
I tried this on my kubuntu 12.04 LTS 32bit and an other (fresh installed) xubuntu 64bit (don't know which one) and its still the same. My reader is called ST-Ericsson NFC device (PN533). I can use the command line tools from libusb, like nfc-list, nfc-poll, etc.

Pleease give me a tip, I'm getting mad...
thx
xiF

EDIT:
Sometimes this message is produced, I don't get the condition creating the difference:

[sudo] password for xif:
[nfc.clf] searching for reader with path 'usb'
Traceback (most recent call last):
  File "examples/tagtool.py", line 434, in <module>
    TagTool().run()
  File "/home/xif/Projekte/nfcpy/nfcpy/examples/cli.py", line 284, in run
    while self.run_once() and self.options.loop:
  File "/home/xif/Projekte/nfcpy/nfcpy/examples/cli.py", line 231, in run_once
    try: clf = nfc.ContactlessFrontend(device)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 105, in __init__
    if path and not self.open(path):
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 156, in open
    self.dev = nfc.dev.connect(path)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/__init__.py", line 63, in connect
    usb = transport.USB(bus, dev)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 203, in __init__
    self.open(bus_id, dev_id)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 226, in _PYUSB0_open
    self.usb_dev.setConfiguration(dev.configurations[0])
IndexError: tuple index out of range

Question information

Language:
English Edit question
Status:
Solved
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Tiedemann
Solved:
Last query:
Last reply:
Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#1

Could you post a debug log of libnfc detecting and initializing the device? (I've never heard of an ST-Ericsson PN533 based reader, btw.)

Revision history for this message
xiF (girronimo) said :
#2

Hi,

first thanks for your reply. I'm very new on nfc (and pretty new on Linux) and don't know where to find the debug log of libnfc, but I would be glad to give you all information, if you tell me where to find it. I hope the following information can help you.....

lsusb
:
Bus 007 Device 015: ID 04cc:2533 ST-Ericsson NFC device (PN533)

Unfortunately, I couldn't find a non-german distributor of this dongle, but here is the link to where I got it (english): http://www.nfc-tag-shop.de/nfc-hardware/21/nfc-usb-stick-nxp-pn533-reader/writer

nfc-scan-device -v:
nfc-scan-device uses libnfc libnfc-1.7.0-40-g7e5257d
1 NFC device(s) found:
- NXP / PN533:
    pn53x_usb:007:015
chip: PN533 v2.7
initator mode modulations: ISO/IEC 14443A (106 kbps), FeliCa (424 kbps, 212 kbps), ISO/IEC 14443-4B (847 kbps, 424 kbps, 212 kbps, 106 kbps), Innovision Jewel (106 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)
target mode modulations: ISO/IEC 14443A (106 kbps), FeliCa (424 kbps, 212 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)

I also asked someone for some help and he “debugged” your code, building checkpoints (like “print “<X>”) on some places. He said your code seems to be ok and the error(s) seems to be in pyUSB. Here's your modified code (and after that the output):

nfcpy/nfc/dev/__init__.py: start at line 33

import transport

usb_device_map = {
# (0x054c, 0x0193) : "pn531", # PN531 (Sony VID/PID)
# (0x04cc, 0x0531) : "pn531", # PN531 (Philips VID/PID), SCM SCL3710
     (0x04cc, 0x2533) : "pn53x", # NXP PN533 demo board
# (0x04e6, 0x5591) : "pn53x", # SCM SCL3711
# (0x04e6, 0x5593) : "pn53x", # SCM SCL3712
# (0x054c, 0x02e1) : "rcs956", # Sony RC-S330/360/370
# (0x054c, 0x06c1) : "rcs380", # Sony RC-S380
# (0x054c, 0x06c3) : "rcs380", # Sony RC-S380
# (0x072f, 0x2200) : "acr122", # Arygon ACR122U
}

def connect(path):
    assert isinstance(path, str) and len(path) > 0

    def import_driver(name):
        name = "nfc.dev.{0}".format(name)
        print "<2>", name
        log.debug("import {0}".format(name))
        return importlib.import_module(name)

    found = transport.USB.find(path)
    found = [(1228L, 9523L, '007', '031')]
    print "<21>", found
    if found is not None:
        for vid, pid, bus, dev in found:
            module = usb_device_map.get((vid, pid))
            if module is not None:
                log.debug("trying usb:{0:04x}:{1:04x}".format(vid, pid))
                driver = import_driver(module)
                print "<1>", module, ">", driver
                try:
                    print "<3>", bus, dev
                    usb = transport.USB(bus, dev)
                    print "<4>", usb
                    device = driver.init(usb)
                    print "<5>", device
                except IOError:
                    print "<99>"
                    continue
                device._path = "usb:{0:03}:{1:03}".format(int(bus), int(dev))
                return device

/*************************************************************/

nfcpy/nfc/dev/pn53x.py: start at line 124

class Chipset(object):
    SOF = bytearray('\x00\x00\xFF')
    ACK = bytearray('\x00\x00\xFF\x00\xFF\x00')

    def __init__(self, transport):
        self.CMD = PN53X_CMD
        self.transport = transport

        ic, ver, rev, support = self.get_firmware_version()
        self.ic = "PN5{0:02x}".format(ic)
        self.fw = "{0}.{1}".format(ver, rev)
        log.debug("chipset is a {0} version {1}".format(self.ic, self.fw))

        print "<7>", self.ic

        if self.ic == 'PN531':
            self.set_parameters = self.pn531_set_parameters
            self.max_packet_data_size = 254
            self.pn531_sam_configuration("normal")
        elif self.ic == 'PN532':
            self.set_parameters = self.pn532_set_parameters
            self.max_packet_data_size = 264
            self.pn532_sam_configuration("normal")
        elif self.ic == 'PN533':
            self.set_parameters = self.pn533_set_parameters
            self.max_packet_data_size = 264

    def close(self):
        self.write_frame(Chipset.ACK)
        self.transport.close()
        self.transport = None

    def write_frame(self, frame):
        self.transport.write(frame)

    def read_frame(self, timeout):
        return self.transport.read(timeout)

    def command(self, cmd_code, cmd_data=None, timeout=100):
        """Send a chip command and return the chip response."""
        cmd_name = self.CMD.get(cmd_code, "PN53x 0x{0:02X}".format(cmd_code))
        log.debug("{0} command with timeout {1} ms".format(cmd_name, timeout))

        frame = bytearray([0, 0, 255])
        LEN = 2 + len(cmd_data) if cmd_data is not None else 2
        if LEN < 256:
            frame += bytearray([LEN, 256 - LEN, 0xd4, cmd_code])
        else:
            LENmsb = LEN / 256
            LENlsb = LEN % 256
            LCS = (256 - (LENmsb + LENlsb)) % 256
            frame += bytearray([255, 255, LENmsb, LENlsb, LCS, 0xd4, cmd_code])
        if cmd_data is not None:
            frame += bytearray(cmd_data)
        frame += bytearray([(256 - sum(frame[-LEN:])) % 256, 0])

        try:
            self.write_frame(frame)
            frame = self.read_frame(timeout=100)
        except IOError as error:
            log.error("timeout while waiting for ack")
            raise IOError(errno.EIO, os.strerror(errno.EIO))

        if frame[0:3] != Chipset.SOF:
            log.error("received invalid start of frame")
            raise IOError(errno.EIO, os.strerror(errno.EIO))
        print "<6>", baprint(frame), baprint(Chipset.ACK)
        if frame[0:len(Chipset.ACK)] != Chipset.ACK:
            log.warning("missing ack frame from pn53x")

        while frame == Chipset.ACK:
            # transport raises IOError if timed out
            try:
                frame = self.read_frame(timeout)
                print "<9>", frame
            except IOError as error:
                if error.errno == errno.ETIMEDOUT:
                    self.write_frame(Chipset.ACK)
                raise error
        print "<10>"

        if not frame.startswith(Chipset.SOF):
            log.debug("invalid start of frame")
            raise IOError(errno.EIO, os.strerror(errno.EIO))
        print "<11>"

        if frame[3] == 255 and frame[4] == 255:
            # extended information frame
            if sum(frame[5:8]) & 0xFF != 0:
                log.error("extended frame lenght checksum error")
                raise IOError(errno.EIO, os.strerror(errno.EIO))
            LEN, TFI, PD0 = frame[5]*256+frame[6], frame[8], frame[9]
        else:
            # normal information frame
            if sum(frame[3:5]) & 0xFF != 0:
                log.error("standard frame lenght checksum error")
                raise IOError(errno.EIO, os.strerror(errno.EIO))
            LEN, TFI, PD0 = frame[3], frame[5], frame[6]
        print "<12>"

        if not TFI == 0xd5:
            if TFI == 0x7f: raise ChipsetError(0x7f)
            log.error("invalid frame identifier value")
            raise IOError(errno.EIO, os.strerror(errno.EIO))
        if not PD0 == cmd_code + 1:
            log.error("response code does not match command code")
            raise IOError(errno.EIO, os.strerror(errno.EIO))

        if frame[3] == 255 and frame[4] == 255:
            # extended information frame
            if sum(frame[8:8+LEN+1]) % 256 == 0:
                print "<13>"
                return frame[10:8+LEN]
        else:
            # normal information frame
            print "<14>"
            if sum(frame[5:5+LEN+1]) % 256 == 0:
                print "<15>"
                return frame[7:5+LEN]

        log.error("frame payload checksum error")
        raise IOError(errno.EIO, os.strerror(errno.EIO))

/*************************************************************/

nfcpy/nfc/dev/transport.py: start at line 183

    def __init__(self, bus_id, dev_id):
        self.usb_out = None
        self.usb_inp = None

        print "<31>", self.pyusb_version

        if self.pyusb_version == 0:
            self.open = self._PYUSB0_open
            self.read = self._PYUSB0_read
            self.write = self._PYUSB0_write
            self.close = self._PYUSB0_close
            self.get_string = self._PYUSB0_get_string
        elif self.pyusb_version == 1:
            self.open = self._PYUSB1_open
            self.read = self._PYUSB1_read
            self.write = self._PYUSB1_write
            self.close = self._PYUSB1_close
            self.get_string = self._PYUSB1_get_string
        else:
            log.error("unexpected pyusb version")
            raise SystemExit

        print "<32>"
        self.open(bus_id, dev_id)
        print "<33>"

    @property
    def manufacturer_name(self):
        if self.manufacturer_name_id:
            return self.get_string(100, self.manufacturer_name_id)

    @property
    def product_name(self):
        if self.product_name_id:
            return self.get_string(100, self.product_name_id)

    def _PYUSB0_get_string(self, length, index, langid=-1):
        return self.usb_dev.getString(index, length, langid)

    def _PYUSB1_get_string(self, length, index, langid=None):
        return self.usb_util.get_string(self.usb_dev, length, index, langid)

    def _PYUSB0_open(self, bus_id, dev_id):
        bus = [b for b in self.usb.busses() if b.dirname == bus_id][0]
        dev = [d for d in bus.devices if d.filename == dev_id][0]
        self.usb_dev = dev.open()
        print "<41>", self.usb_dev, dev, dev.configurations[0]
        try:
            self.usb_dev.setConfiguration(dev.configurations[0])
            print "<41a>"
            self.usb_dev.claimInterface(0)
            print "<41b>"
        except self.usb.USBError:
            raise IOError("unusable device")
        print "<42>"
        if (dev.idVendor, dev.idProduct) in [(0x54c, 0x193), (0x4cc, 0x531)]:
            self.usb_dev.reset() # needed for PN531 only
        interface = dev.configurations[0].interfaces[0]
        endpoints = interface[0].endpoints
        bulk_inp = lambda ep: (\
            (ep.type == self.usb.ENDPOINT_TYPE_BULK) and
            (ep.address & self.usb.ENDPOINT_DIR_MASK == self.usb.ENDPOINT_IN))
        bulk_out = lambda ep: (\
            (ep.type == self.usb.ENDPOINT_TYPE_BULK) and
            (ep.address & self.usb.ENDPOINT_DIR_MASK == self.usb.ENDPOINT_OUT))
        print "<43>"
        self.usb_out = [ep for ep in endpoints if bulk_out(ep)].pop().address
        self.usb_inp = [ep for ep in endpoints if bulk_inp(ep)].pop().address
        self.manufacturer_name_id = dev.iManufacturer
        self.product_name_id = dev.iProduct

/***************************************************************************/

And here is my output:

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/tagtool.py show
[nfc.clf] searching for reader with path 'usb'
<21> [(1228L, 9523L, '007', '031')]
<2> nfc.dev.pn53x
<1> pn53x > <module 'nfc.dev.pn53x' from '/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/pn53x.pyc'>
<3> 007 031
<31> 0
<32>
Traceback (most recent call last):
  File "examples/tagtool.py", line 434, in <module>
    TagTool().run()
  File "/home/xif/Projekte/nfcpy/nfcpy/examples/cli.py", line 284, in run
    while self.run_once() and self.options.loop:
  File "/home/xif/Projekte/nfcpy/nfcpy/examples/cli.py", line 231, in run_once
    try: clf = nfc.ContactlessFrontend(device)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 105, in __init__
    if path and not self.open(path):
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 156, in open
    self.dev = nfc.dev.connect(path)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/__init__.py", line 68, in connect
    usb = transport.USB(bus, dev)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 206, in __init__
    self.open(bus_id, dev_id)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 227, in _PYUSB0_open
    dev = [d for d in bus.devices if d.filename == dev_id][0]
IndexError: list index out of range

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/helloworld.py
INFO:nfc.clf:searching for reader with path 'usb'
<21> [(1228L, 9523L, '007', '031')]
<2> nfc.dev.pn53x
<1> pn53x > <module 'nfc.dev.pn53x' from '/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/pn53x.pyc'>
<3> 007 031
<31> 0
<32>
Traceback (most recent call last):
  File "examples/helloworld.py", line 70, in <module>
    HelloWorld().main()
  File "examples/helloworld.py", line 58, in main
    with nfc.ContactlessFrontend('usb') as clf:
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 105, in __init__
    if path and not self.open(path):
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 156, in open
    self.dev = nfc.dev.connect(path)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/__init__.py", line 68, in connect
    usb = transport.USB(bus, dev)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 206, in __init__
    self.open(bus_id, dev_id)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 227, in _PYUSB0_open
    dev = [d for d in bus.devices if d.filename == dev_id][0]
IndexError: list index out of range

regards
xif

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#3

This is indeed a standard PN533 device (the USB Vendor ID 0x04CC was owned by Philips years back).
Please run "examples/tagtool.py -d nfc.dev" and post the output.

Revision history for this message
xiF (girronimo) said :
#4

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/tagtool.py -d nfc.dev
[main] enable debug output for module 'nfc.dev'
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
<21> [(1228L, 9523L, '007', '031')]
[nfc.dev] trying usb:04cc:2533
<2> nfc.dev.pn53x
[nfc.dev] import nfc.dev.pn53x
<1> pn53x > <module 'nfc.dev.pn53x' from '/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/pn53x.pyc'>
<3> 007 031
<31> 0
<32>
Traceback (most recent call last):
  File "examples/tagtool.py", line 438, in <module>
    TagTool().run()
  File "/home/xif/Projekte/nfcpy/nfcpy/examples/cli.py", line 284, in run
    while self.run_once() and self.options.loop:
  File "/home/xif/Projekte/nfcpy/nfcpy/examples/cli.py", line 231, in run_once
    try: clf = nfc.ContactlessFrontend(device)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 105, in __init__
    if path and not self.open(path):
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/clf.py", line 156, in open
    self.dev = nfc.dev.connect(path)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/__init__.py", line 68, in connect
    usb = transport.USB(bus, dev)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 206, in __init__
    self.open(bus_id, dev_id)
  File "/home/xif/Projekte/nfcpy/nfcpy/nfc/dev/transport.py", line 227, in _PYUSB0_open
    dev = [d for d in bus.devices if d.filename == dev_id][0]
IndexError: list index out of range

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#5

Please use an unmodified version of the library. The statement "found = [(1228L, 9523L, '007', '031')]" inserted in function connect(path) causes confusion when later iterating the usb devices (because the device id changes every time the device is plugged in)

Revision history for this message
xiF (girronimo) said :
#6

Ok, after a fresh download we get this:

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/tagtool.py -d nfc.dev
[main] enable debug output for module 'nfc.dev'
[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:04cc:2533
[nfc.dev] import nfc.dev.pn53x
[nfc.dev.transport] >>> 0000ff00ff00
[nfc.dev.pn53x] GetFirmwareVersion command with timeout 100 ms
[nfc.dev.transport] >>> 0000ff02fed4022a00
[nfc.dev.transport] <<< 0000ff00ff00
[nfc.dev.transport] <<< 0000ff06fad50333020707e500
[nfc.dev.pn53x] chipset is a PN533 version 2.7
[nfc.dev.pn53x] Diagnose command with timeout 100 ms
[nfc.dev.transport] >>> 0000ff08f8d400006e666370790c00
[nfc.dev.transport] <<< 0000ff00ff00
[nfc.dev.transport] <<< 0000ff08f8d501006e666370790a00
[nfc.dev.pn53x] ATR_RES timeout: 102.4 ms
[nfc.dev.pn53x] non-DEP timeout: 51.2 ms
[nfc.dev.pn53x] RFConfiguration command with timeout 100 ms
[nfc.dev.transport] >>> 0000ff06fad432020b0b0ad800
[nfc.dev.transport] <<< 0000ff00ff00
[nfc.dev.transport] <<< 0000ff02fed533f800
[nfc.dev.pn53x] set retries: ATR_REQ=2 PSL_REQ=1 PassiveTarget=3
[nfc.dev.pn53x] RFConfiguration command with timeout 100 ms
[nfc.dev.transport] >>> 0000ff06fad43205020103ef00
[nfc.dev.transport] <<< 0000ff00ff00
[nfc.dev.transport] <<< 0000ff02fed533f800
[nfc.dev.pn53x] ReadRegister command with timeout 100 ms
[nfc.dev.transport] >>> 0000ff22ded406a000a001a002a003a004a005a006a007a008a009a00aa00ba00ca00da00ea00fae00
[nfc.dev.transport] <<< 0000ff00ff00
[nfc.dev.transport] >>> 0000ff00ff00
[nfc.clf] no reader found at 'usb'
[main] no contactless reader found

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#7

It looks like the EEPROM is not accessible (or just not present for cost reasons). Though an appropriate error response I've would have expected from the chip. Anyway, I've ordered the same reader and will check that if it arrives. For the time being you could try to replace lines 639-650 in nfc/dev/pn53x.py with the following:

device._vendor_name = "NXP"
device._device_name = "PN533"

Revision history for this message
xiF (girronimo) said :
#8

Nice, I'm curious about your experience. That's what happened after replacing:

With Mifare Ultralaght tag

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/tagtool.py -d dev.py
[main] enable debug output for module 'dev.py'
[nfc.clf] searching for reader with path 'usb'
[nfc.clf] using NXP PN533 at usb:007:002
[main] touch a tag
<< waiting for tag, touching... >>
[nfc.dev] Driver.set_communication_mode() should be implemented.
Type2Tag ATQ=4400 SAK=00 UID=04413a1a092XXX

Yay! XD

With Mifare Classic 1K

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/tagtool.py -d dev.py
[main] enable debug output for module 'dev.py'
[nfc.clf] searching for reader with path 'usb'
[nfc.clf] using NXP PN533 at usb:007:002
[main] touch a tag
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
[nfc.dev.pn53x] [PN53x Error 0x13] Format error during RF communication
[nfc.dev] Driver.set_communication_mode() should be implemented.
^Cxif@xif-kub:~/Projekte/nfcpy/nfcpy$

The output seems to be infinite, stops when the tag was removed and continuous when touch again. Brake just with Ctrl+C.

Next days I should get Mifare Desfire tags. I will post what happen using them.

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#9

Mifare Classic tags are not supported by nfcpy, that's why you see the format error reported. Any NFC Forum compatible tag should do - that's Ulralight, Desfire and NTAG if just speaking about NXP.

Revision history for this message
Luís Silva (luis-m-silva99) said :
#10

Hello,

I have the same device and I have the same problem reported in the first post.
I did what Stephen sugested (replace the lines) but then I didn't have success as xiF running "python examples/tagtool.py -d dev.py".

Can you confirm if are these the lines to change please? http://imageshack.us/content_round.php?page=done&l=img853/7970/sld8.png

Revision history for this message
xiF (girronimo) said :
#11

Hi,

I replaced ALL the lines 639, 640, 641, .., 650. Just delete all (or comment) and copy the lines above.

Revision history for this message
Luís Silva (luis-m-silva99) said :
#12

xiF thank you for your reply. The device is being detected now! =D

For further reference, if someone has the same problem: http://i.imgur.com/P6sZIqh.png

Thank you guys

Revision history for this message
xiF (girronimo) said :
#13

Also, Desfire tags are recognised without problems. Great work!

xif@xif-kub:~/Projekte/nfcpy/nfcpy$ python examples/tagtool.py show
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.pn53x] missing ack frame from pn53x
[nfc.clf] using NXP PN533 at usb:007:002
[main] touch a tag
Type4Tag ATQ=4403 SAK=20 UID=041e7269b2XXXX ATS=06757781XXXX
NDEF capabilities:
  version = 2.0
  readable = yes
  writeable = yes
  capacity = 4094 byte
  message = 9 byte
NDEF record list:
record 1
  type = 'urn:nfc:wkt:T'
  name = ''
  data = '\x02enok'
xif@xif-kub:~/Projekte/nfcpy/nfcpy$

Revision history for this message
Best Stephen Tiedemann (stephen-tiedemann) said :
#14

The issue is now fixed since revision 202, the modification in pn53x.py is no longer needed.
You can use "bzr revert nfc/dev/pn53x.py && bzr pull" to upgrade.

Revision history for this message
xiF (girronimo) said :
#15

O W E S O M E

Thank You!

Revision history for this message
xiF (girronimo) said :
#16

Thanks Stephen Tiedemann, that solved my question.