0

I am using PN532 with Raspberry Pi OS. I am able to communicate with Nexus 4. But PN532 reader is able to read max 134 bytes from the Nexus 4 phone. I am expecting to read more than 10k bytes. Please help me how to read so much bytes in one shot. PN532 reader has limitation of Max. 256 bytes in normal frame in one shot. This is possible with Extended Frame format. How to use Extended Frame in PN532 or are there any other possibilities.

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
  • 1
    Please include the code you are using now. – dwitvliet Jul 24 '14 at 13:21
  • Sending following command :0x8c,0x00,0x08, 0x00, 0x12, 0x34, 0x56, 0x40,0x01, 0xFE, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,0xC0, 0xC1,0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,0xFF, 0xFF,0xAA, 0x99, 0x88, 0x77,0x66, 0x55, 0x44, 0x33, 0x22, 0x11,0x06, 0x46, 0x66, 0x6D, 0x01, 0x01, 0x10, 0x00 to configure peer as target. – user3873033 Aug 13 '14 at 09:14
  • Then i am sending TgGetData command 0x86 to phone. I am able to receive only 134 byte max. – user3873033 Aug 13 '14 at 09:21

1 Answers1

1

Neither the PN532 nor the Nexus 4 seem to support ISO-DEP payloads (or APDUs) with lengths of more than 262 bytes. Specifically, they do not seem to support exchange of extended length APDUs (as defined by ISO/IEC 7816-4). You should keep in mind that sending a single payload of 10 kBytes would typically also require the NFC chips' send/receive buffers to have that size. Which is currently not the case.

Usually, there is no need to transmit such huge payloads within one frame/one APDU. The application protocol defined in ISO/IEC 7816-4 (APDUs) defines ways on how to split data across several command/reponse pairs (e.g. the READ BINARY command supports offset+length to read large files as multiple chunks of data.

Note that, in case you refer to NFC-DEP payloads, these payloads are limited to 254 bytes by design (see the NFC Forum's Digital Protocol specification). However, protocols on top of the NFC Forum's LLCP protocol (e.g. the Simple NDEF Exchange Protocol, SNEP) may support message structures that span across multiple LLCP I-PDUs.

Michael Roland
  • 39,663
  • 10
  • 99
  • 206