cancel
Showing results for 
Search instead for 
Did you mean: 

Peer to Peer Communications between ST25R3916B and ST25R3918

ELTE-Suraj
Associate II

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. 

8 REPLIES 8
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 II

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.

We have tested the ST25 Embedded NFC Library in STM CUBE IDE, and it is working with the ST25R3916 chip. Our project requires the ST25R3916 as the initiator and the ST25R3918 as the listener.

We recognzise that ST25R3916 and ST25R3918 have similar chipset registers and thus we tried using the same library(ST25R3916) for ST25R3918, as mentioned in the datasheet we changed the identity register to match ST25R3918 settings. However, we cannot communicate with ST25R3916 in p2p.

Could you provide the necessary libraries to support the ST25R3918 implementation? If no standard library is available, could you guide us on the functions or registers that need to be modified to make our current ST25R3916-based project compatible with the ST25R3918?

Hi,

Can you confirm that your application is based on ST25R3916on initiator side and ST25R3918 on target side?

For the ST25R3916B device, projects from the X-NUCLEO-NFC08A1 folder of the ST25 Embedded NFC Library has to be used i.e. the application has to be compiled with ST25R3916B compilation switch. In STM32CubeIDE, open the project properties, C/C++ build/Setting :

BrianTIDAL_0-1739953247579.png

 

For the ST25R3918 device, it is supported as a ST25R3916 device (non-B version of the ST25R3916).  Projects from the X-NUCLEO-NFC06A1 folder of the ST25 Embedded NFC Library has to be used i.e. the application has to be compiled with ST25R3916 compilation switch. When compiled with the proper define (i.e. ST25R3916), the identity register of the ST25R3918 is properly managed and it not needed to make changes in the st25r3916CheckChipID().

BrianTIDAL_1-1739953481721.png

The analog settings for ST25R3916/18 (non-B versions) and for ST25R3916B are different. Using the wrong analog settings will cause  RF communication issues.

When using ST25R3916 (non B version) or ST25R3918, make sure to add analogConfigTbl_NFC06A1.c in your build and to define RFAL_ANALOG_CONFIG_CUSTOM in the rfal_platform.h for this project.

When using ST25R3916B, make sure to add analogConfigTbl_NFC08A1.c in your build and to define RFAL_ANALOG_CONFIG_CUSTOM in the rfal_platform.h for this project.

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-TakeC
Visitor

Hello. We checked the P2P communication and was successful in communicating between ST25R3918 and ST25R3916B.

Is it possible to measure the P2P RSSI in the same way using rfalGetTransceiveRSSI()?

In the case of NFC tags, we can get the RSSI based on the call back timing, but with P2P, we can't get it, so please let me confirm.

 

Brian TIDAL
ST Employee

Hi,

well done. I would suggest to mark this topic as answered and to enter your new question in a new topic. 

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.

Hi,

In AP2P both sides are doing reader-style modulation of their own field. To my knowledge the card-style receiver (to decode reader modulation) does not contain RSSI feature.

BR, Ulysses