PN7150 P2P send NDEFs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7150 P2P send NDEFs

2,528 Views
oleksandr
Contributor II

Hi guys.

Could someone explain me how can I send ndef messages in P2P mode? Here is only one thing what I see in the log:

WAITING FOR DEVICE DISCOVERY
- P2P INITIATOR MODE: Remote Target activated
PEER LOST

WAITING FOR DEVICE DISCOVERY
- P2P TARGET MODE: Activated from remote Initiator
PEER LOST

WAITING FOR DEVICE DISCOVERY
- P2P INITIATOR MODE: Remote Target activated
PEER LOST

WAITING FOR DEVICE DISCOVERY
- P2P TARGET MODE: Activated from remote Initiator
PEER LOST

WAITING FOR DEVICE DISCOVERY

I use:

  1. 2 sets of nRF52832+PN7150
  2. Segger IDE
  3. Examples and library from NXP

Defines P2P_SUPPORT and RW_SUPPORT are defined.

I am ready to answer any additional questions. Thank you in advance.

Regards, Alex.

Tags (3)
10 Replies

1,632 Views
bojanjovanovic
Contributor I

Hello, @oleksandr !

We want to connect OM5578 devkit to our nRF52840-DK board. I noticed you are using nRF52832-DK and Segger Embedded Studio. Can you share with me how did you import PN7150 libraries into your working environment?

Thanks in advance for your time and efforts!

Bojan.

0 Kudos

1,699 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

 Please look at  the Settings-Preprocessor

You could delete or uncomment the RW_SUPPORT and the CARDEMU_SUPPORT. Also, the P2P must be defined.

If you want to see the terminal commands, define the NDEBUG_SEMIHOST.

pastedImage_1.png

You should see the terminal information like this. The NDEF record sent

pastedImage_2.png

Regards,

Mario

0 Kudos

1,699 Views
oleksandr
Contributor II

Hello Mario.

Thanks for the answer. I checked all the tips mentioned above, but the error was in tml.c. That's my fault. This is fixed. But now I can observe the following behavior.

Here is a description of the experiment.
I have two devices. One of them does not have NDEF for transmission. Let's call it as Client. Another device has NDEF for transmission. I suggest to call it Server. So when I try to establish a connection, I have several bad connections, and then I have one correct connection. Here is an example of logs for both devices:


-----------------------------------------------

<info> app: Server started.

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P TARGET MODE: Activated from remote Initiator
<info> app: PEER LOST

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P TARGET MODE: Remote Target activated
<info> app: PEER LOST

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P TARGET MODE: Activated from remote Initiator
<info> app: --- NDEF Record sent


-----------------------------------------------

<info> app: Client started.

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P INITIATOR MODE: Remote Target activated
<info> app: PEER LOST

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P INITIATOR MODE: Activated from remote Initiator
<info> app: PEER LOST

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P INITIATOR MODE: Remote Target activated
<info> app: --- NDEF record received:

-----------------------------------------------

As you can see before successfully connecting, I have some bad connections. Their number varies from 0 to 5. What could be the reason for this behavior? What should I pay attention to? What additional information should I present to you in order to successfully solve the problem?

Thank you in advance!

Regards,

Alex.

0 Kudos

1,699 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Oleksandr,

The behavior that you are seeing depends on a lot of factors, the device that you are using, if the device is working in another task, etc.

I ran some test with two PN7150.

As you can see, the behavior is a little bit different than you are seeing.

pastedImage_1.png

Regards,

Mario

0 Kudos

1,668 Views
hkarthik97
Contributor I

What is the name of the app that I should you to send the ndef from phone to the antenna. Please give some information on the app. The document doesn't recommend any app for the data exchange.

0 Kudos

1,699 Views
oleksandr
Contributor II

Hello, Mario.

We still have problems with P2P mode. I attached a simple app with minimum source code. Please take a look on it. This project is very important for us and our customer.

It is so important that we would like to ask you, if it is possible, about Skype conversation or other messenger, if we are unable to resolve this issue on the forum.

Also I would like to add the next details about this.

When I set the boards at a distance in about 5-7 cm from each other in this case I will be getting constant log like this.

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P TARGET MODE: Activated from remote Initiator
<info> app: PEER LOST

 

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P TARGET MODE: Remote Target activated
<info> app: PEER LOST

.........

<info> app: WAITING FOR DEVICE DISCOVERY
<info> app: - P2P TARGET MODE: Activated from remote Initiator
<info> app: PEER LOST

The closer the boards are to each other, the faster the connection occurs and vice versa - as the distance increases, the connection establishes longer. Then there comes such a moment (approximately at a distance of 5-7 cm between them) when they still see the NFС field, but cannot establish a connection. But even if I try to establish a connection at a short distance, I observe the following behavior: when the antenna of one device approaches the antenna of another device, they manage to detect the NFC field at a long distance and try to establish a connection, but it will not be successfully, this will only result loss of a few seconds of precious time.

Here a video when I try to establish a connection at a short distance.

When I tap boards to each other it means that I am trying to start a connection and when I remove the board it means that a connection was established and data was exchanged successfully.

0 Kudos

1,699 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Oleksandr,

I was checking the video that you attached, you have a lot of interference because you are using a lot of cables, in this case, you have more antennas. Please connect the PN7150 direct to the MCU, using a shield.

What is the LPC that you are using?

Regards,

Mario

1,699 Views
oleksandr
Contributor II

Hello Mario.

I took a video as you recommended when NFC board is connected directly to the nRF52832 devboard.

Also I took a video using of our board which based on pn7150 chip and nRF52832:

What do you think about this behavior? Is it right? What is an average connection time you have with your equipment? I think we still have big connection time.

0 Kudos

1,699 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Oleksandr,

Unfortunately, I can not reproduce your issue using the nRF52832. I am not sure how is your implementation or how the RTOS is working on your device. We do not migrate the libraries, nonetheless, I can recommend you to check the NXP Professional Services|NXP for that request.

Please look at the Software License and Distribution Agreement

Disclaimer. THE LICENSED MATERIALS ARE PROVIDED ON AN “AS IS” AND “WITH ALL FAULTS” BASIS...

Sorry for any inconvenience. 

Regards,

Mario

0 Kudos

1,699 Views
oleksandr
Contributor II

I have to add a comment I hope it would be helpful: it works perfect with tags.
Problems appear only in P2P mode.