Skip to main content
Associate III
August 15, 2024
Solved

st25r3916B NFC card emulation

  • August 15, 2024
  • 1 reply
  • 3007 views

Hi,

I have been working with the st25r3916 in my reader. My idea is to use a mobile to communicate with the reader in card emulation mode. I have been using the demo code for st (ST25NFCEmbeddedLibSrc_ST25R3916(B)_1.6.0).

With IOS it is working fine, and with a samsung with android 14, works the 70% of the times, but I am trying with a Redmi with Android version 13, and it works the 20% of the times.

I have the discovery demo board of st25r3916, and both mobiles were working fine, but as the library used in this board was too old, I have purchased the demo board "X-nucle-nfc08A1" with the Nucleao board, to check the behaviour with your code and your library, and in this case, the IOS works 100% of the times, the samsung works 100% of the times, but the Redmi NEVER works.

Is there any solution to make the Redmi working?

Many thanks,

 

Sandra

This topic has been closed for replies.
Best answer by Brian TIDAL

Hi,

so, the Redmi is entering in Card Emulation mode. As both devices support Reader mode and CE mode, you will face this kind of issue. I would suggest that your application has 2 different working modes i.e. to disable the Reader mode  and keep only CE mode on ST25R3916 when you plan to communicate with a phone.

Rgds

BT

1 reply

Brian TIDAL
Technical Moderator
August 22, 2024

Hi,

can you try to enable the DEMO_CARD_EMULATION_ONLY compilation flag? If it is still failing, can you connect a logic analyzer on the SPI (CLK/MOSI/MISO/CS) + ST25R3916_IRQ, and send the trace with Samsung and a second trace with Redmi?

Which model is being used and which Android version?

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.
SG3Author
Associate III
August 23, 2024

Hi Brian,

 

Thanks for the answer. Enabling the DEMO_CARD_EMULATION_ONLY compilation flag, it is working with that android 13 phone.

Why is this happening? Because as far as i have reasearch in the code it is just removing the reading of cards, what I also need in my reader.

So how can I have both modes, card emulation and card reading enabled??

Thank you very much!

 

Sandra

Brian TIDAL
Technical Moderator
August 23, 2024

Hi,

smartphones can support both Reader mode and Card Emulation mode (in particular for payment). If the ST25R3916 is also configured as Reader and Card Emulation, you will face random behavior (i.e. sometime smartphone acting as reader and 3916 as CE and vice versa). Phones can also support active Peer to Peer mode.

I would suggest to first disable the Peer to Peer (just set the RFAL_FEATURE_NFC_DEP to false in the rfal_platform.h). Is this solving the issue?

Then disable unneeded technologies (for example if NFCF is not used in your application, just set RFAL_FEATURE_NFCF to false in rfal_platform.h). Keep only the needed technologies.

Then try to enlarge the discParam.totalDuration. 

Which Redmi model is being used? I can give a try on my side if I have this model.

 

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.