Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 11 months ago.
Send buffer through NFC
Hello everyone,
I'm trying to use this PN532 Chip to send data (buffer) on another NFC chip. I saw PN532_COMMAND_INCOMMUNICATETHRU that could be able to send a buffer with my reader.
I wrote this function :
Send buffer
uint8_t PN532::SIC4310_WriteSingleData (uint8_t *data) { /* Prepare the first command */ pn532_packetbuffer[0] = PN532_COMMAND_INCOMMUNICATETHRU; memcpy (pn532_packetbuffer + 1, data, 64); /* Data Payload */ /* Send the command */ if (HAL(writeCommand)(pn532_packetbuffer, 65)) { return 0; } /* Read the responce packet */ return (0 < HAL(readResponse)(pn532_packetbuffer, sizeof(pn532_packetbuffer))); }
This function works for just one Byte but when i try to send an entire 64byte buffer of "0x00" I receive some 'random' byte. Did someone ever use this INCOMMUNICATETHRU or PN532_COMMAND_INDATAEXCHANGE ?
Thanks a lot for your help and best regards.