Hello
I'm using PN7150 with NXP library (SW4325). My task is to receive data via p2p (more than 1 kB), but when I'm doing it library can't receive full data packets (22 messages were sent, but only 6 were received, any messages were not recognized and after it, hard fault happened).
In experiments it was determined that the maximum message length that can be correctly received is 120 bytes, more bytes are not received in one communication loop and if it's several messages in one communication loop (like in the example screen) it does not receive more.
If you initiate loops with a small amount of data, all data comes in, but there is a big delay between loops (NxpNci_StopDiscovery, NxpNci_StartDiscovery)
How can I correctly receive for example 1 kB data via p2p without large time delay?
Hope for your help, thank you.
Hi Dzmitry,
Be sure that you are sending the NDEF message correctly.
Please look at the next link, it will help you with the NDEF format
NFC Data Exchange Format (NDEF)
Reards,
Mario
Yes, the NDEF message is completely correct
And first messages are true, but after receive buffer overflowed and the pointer goes beyond the memory allocated to the structure
In NdefRecord.recordPayload multiple messages from the phone all are in one structure. If I want to receive 22 messages of 16 bytes all messages pull in one NdefRecord.recordPayload
This is the first message
This is after the pointer goes beyond the memory allocated to the structure
All data that does not fit into the structure memory recordPayload is lost and library handles it how "Unsupported NDEF record, cannot parse", after this an HardFault error may occur due to improper memory access
And its structure overflow after several NDEF messages
Hi Dzmitry,
What is the board that you are using has a host?
Are you taking care of the flags?
-MB (Message Begin)
-ME (Message End)
-CF (Chunk Flag)
Regards,
Mario
Hi Dzmitry,
As you know, the libraries that we provide are for the NXP products so, I am not sure if you migrate it correctly.
However. can't receive large P2P message (NDEF), this NDEF is received from the other controller, so if the message is short or large the PN715 should receive the NDEF message.
Please look at the NFC Data Exchange Format (NDEF)Technical Specification
Regards,
Mario
Hi Dzmitry,
I already provided the workaround in the other secure channel that we have.
Regards,
Mario
I am sure that I migrated correctly because other functionality works well (NFC cards, etc.)
NDEF allows you to receive messages limited to a length of 258 bytes, so you need to break large messages into smaller ones and send multiple messages given the flags ME, MB, CF. And if the first message is received, then the next message in one data exchange session will be received outside the allocated memory NdefRecord.recordPayload
if the messages are small, then they can receive more until NdefRecord.recordPayload is filled
could you check it yourself to see that this problem is real or not?
I'm using STM32 nucleo with PN7150 board (cubeIDE, NFC library SW4325) and android phone with "Legic NFC P2P Example" app
It app works correctly with another phone, I tried it with somlabs board under Linux, it works too with example code for PN7150, in these cases the board receives large messages fast and correctly. I think with flags everything is OK. But the library SW4325 still can't receive large P2P message (NDEF)