cancel
Showing results for 
Search instead for 
Did you mean: 

Peer to Peer Communications between ST25R3916B and ST25R3918

ELTE-Suraj
Associate

I have two Nucleo boards, both NUCLEO-L476RG. The first board is equipped with the X-NUCLEO-NFC08A1 (ST25R3916B), while the second board has the NFC 5 Click board (ST25R3918).

I am trying to establish peer-to-peer (P2P) communication between these boards, with the ST25R3916B configured as the initiator and the ST25R3918 as the target.

Both boards successfully detect NFC tags, confirming that the basic hardware setup is functioning correctly. However, I have not been able to achieve P2P communication.

Any guidance or assistance in resolving this issue would be greatly appreciated. I have attached the initiator and target codes for reference. 

3 REPLIES 3
Brian TIDAL
ST Employee

Hi,

a P2P demo is available in the ST25 embedded NFC library (ap2p_proprietary folder). I would suggest to have a look to this demo. 

I had a look on your C files: both tech2Find are set to RFAL_NFC_POLL_TECH_AP2P. Make sure to have one in RFAL_NFC_POLL_TECH_AP2P and the second one in RFAL_NFC_LISTEN_TECH_AP2P and to have RFAL_FEATURE_LISTEN_MODE being set to true in rfal_platform.h.

Rgds

BT

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ELTE-Suraj
Associate

Thank you for your response. The ST25 Embedded NFC Library is this available for Arduino IDE ? and we are currently using Arduino IDE for programming. Could you please assist us with this? If you could provide some sample snippets for both the initiator and target, it would be greatly helpful.

Additionally, we have referred to https://github.com/stm32duino/X-NUCLEO-NFC08A1 , which contains a P2P demo. However, we are unsure how to configure it properly for the initiator and target roles. We are not certain about the necessary changes required to accomplish this as we have one board with ST25R3916(supports active p2p) and other board with ST25R3918(passive p2p)

Could you kindly provide us with some documentation or sample code snippets to help us configure the target and initiator settings correctly?

Looking forward to your guidance.

Brian TIDAL
ST Employee

Hi, 

The ST25 Embedded NFC Library is natively for NUCLEO-L476RG bare metal. Anyway, the discovery parameters (discParam) for the RFAL are the same when running on the NUCLEO-L476RG bare metal or on Arduino. In the peer to peer demo from the library, both devices are configured as follow:

discParam.techs2Find = (RFAL_NFC_POLL_TECH_AP2P | RFAL_NFC_LISTEN_TECH_AP2P);

Thus, they can both act as initiator or target.

If you want to force a given role, one device should be RFAL_NFC_POLL_TECH_AP2P and the second should be RFAL_NFC_LISTEN_TECH_AP2P. 

Rgds

BT

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.