Hello,
I have two OM5577 modules. One is connected to a beaglebone black which is running the NXP image with the sample NFC application. The other is connected to the LPX82x Xpresso development board, onto which I loaded the NXP-NCI sample application.
When running tag emulation function on the beaglebone, my Android phone picks up the tag successfully at about 1.5" away. However when running the tag emulation test on Xpresso board, I have to practically touch my phone to the antenna. Additionally, in the Xpresso board case, my Android app shows a toast message "Tag detect communication interrupted", even through the debug Console in Eclipse shows that the tag sent data to the phone successfully:
- LISTEN MODE: Activated from remote Reader
--- NDEF Record sent
Questions.
1. Why such a big discrepancy between in tag sensitivity between the two cases. The module is identical. Could it be my power supply (beaglebone uses 2A supply wheres the Xpresso board is hooked up by USB to my PC).
2. Why might my phone not ready the tag fully?
Thanks,
Also, do you have an Eagle version of the hardware design files?
Hi Oleg,
Yes, our web site provides the download link, please refer to the following for details.
Hope that helps,
Best Regards,
Kan
Hi Kan,
We've begun adapting the PN7210 to our control board. Where can I find the actual API specification for the commands and the contents of the messages, specifically for Mifare Classic? I can see some code examples of how to read/write to a card, but I need to see the details of available commands and description of the bytes in the request and responses. For example,
1. How do I get the UID of the card?
2. How do I know that the Write operation completed successfully?
Thanks again.
Oleg
I was able to fine the UID is the response to the NCISelectMIFARE command. Nonethless, I still need a spec document. Other commands needed:
ChangeKeys - need the ability to change the sector keys
Read/Write Value block - it would be nice to have a command that deals with value blocks.
Hi Oleg,
The NXP-NCI MCUXpresso example provides demo for Mifare Classic, but it acts as a reader in that demo, not the Mifare Classic card, does it meet your requirement? You may refer to https://www.nxp.com/docs/en/application-note/AN11990.pdf and https://www.nxp.com/webapp/Download?colCode=SW4325&appType=license for details.
Hope that helps,
Best Regards,
Kan
Hi Kan,
As I said in my message - I already have the Mifare example code. This was the only possible way I was able to get started. We're using the PN7120 as the reader to R/W Mifare Classic cards (We're using PN7120 to replace MFRC522).
I need to know the message details for the data sent and received back from PN7120 for the case of communicate with a Mifare classic card.
Here's a very specific question: What is the command for changing the sector KeyA in Mifare Classic? There's no example of this even. Please escalate this if you don't have the answer.
Thanks,
Hi Oleg,
I just checked with our expert team, the MCUXpresso example supports the Mifare classic read and write function, it is the similar process for changing the key, which is also a process of authenticate/read/write MIFARE classic card on the sector storing KeyA.
Hope that makes sense,
Best Regards,
Kan
OK thanks, it seems somewhat inconsistent, but I can try to move forward with the evaluation.
Next problem....
After a couple of instances of reading the emulated tag with my phone, the application gets stuck inside an inner loop and no longer works to emulate tags, R/W cards. Below is the screenshot of the top of the stack where it gets stuck. The Chip_I2CM_XferHandler() function always returns 0. This usually happens after an incomplete communication sequence with my phone. Note that we plan to use this demo example as our golden reference for this project. It has to work flawlessly.
Thanks for your help!
Hi Oleg,
Are you using the project I sent to you via the salesforce? Please kindly clarify.
Thanks for your patience!
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
yes
*Oleg Stepanov *| Mitech Integrated Systems Inc.
Direct: 416-605-4995 | Toll-Free: 1-866-602-4992
ostepanov@mitechisys.com
Hi Oleg,
I am sorry, after I checked with our expert team, I found the project I sent out is an old version, so there might be issue in it, recommend the SW4325,https://www.nxp.com/webapp/Download?colCode=SW4325&appType=license&location=null&fsrch=1&sr=... , I just make it work on my side, with LPC82X Xpresso V2.mbed REV B and OM5577 for Arduino, please refer to the NCI logs as below:
Running the NXP-NCI project.
NCI >> 20 00 01 01
NCI << 40 00 03 00 10 01
NCI >> 20 01 00
NCI << 40 01 17 00 03 0e 03 00 06 00 01 02 03 81 82 02 c8 00 ff 02 00 04 05 08 02 02
NCI >> 20 02 05 01 00 02 00 01
NCI << 40 02 02 00 00
NCI >> 20 02 0d 03 a0 40 01 00 a0 41 01 04 a0 43 01 00
NCI << 40 02 02 00 00
NCI >> 2f 00 01 01
NCI << 4f 00 01 00
NCI >> 20 02 05 01 a0 03 01 08
NCI << 40 02 02 00 00
NCI >> 20 02 05 01 a0 13 01 00
NCI << 40 02 02 00 00
NCI >> 20 02 38 07 a0 0d 06 06 42 01 00 f1 ff a0 0d 06 06 44 a3 90 03 00 a0 0d 06 34 2d dc 50 0c ...
NCI << 40 02 02 00 00
NCI >> 20 00 01 00
NCI << 40 00 03 00 10 00
NCI >> 20 01 00
NCI << 40 01 17 00 03 0e 03 00 06 00 01 02 03 81 82 02 c8 00 ff 02 00 04 05 08 02 02
NCI >> 21 00 04 01 04 02 02
NCI << 41 00 01 00
NCI >> 21 01 07 00 01 01 03 00 01 04
NCI << 41 01 01 00
NCI >> 20 02 04 01 32 01 20
NCI << 40 02 02 00 00
NCI >> 21 03 05 02 80 01 81 01
NCI << 41 03 01 00
WAITING FOR DEVICE DISCOVERY
NCI << 61 05 14 01 02 04 81 ff 01 00 81 00 00 09 08 00 00 00 00 00 08 01 00
- LISTEN MODE: Activated from remote Reader
NCI << 00 00 0d 00 a4 04 00 07 d2 76 00 00 85 01 01 00
NCI >> 00 00 02 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 00 0c 02 e1 03
NCI >> 00 00 02 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 b0 00 00 0f
NCI >> 00 00 11 00 0f 20 00 ff 00 ff 04 06 e1 04 00 ff 00 ff 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 00 0c 02 e1 04
NCI >> 00 00 02 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 b0 00 00 02
NCI >> 00 00 04 00 0b 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 b0 00 02 0b
--- NDEF Record sent
NCI >> 00 00 0d d1 01 07 54 02 65 6e 54 65 73 74 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 d2 76 00 00 85 01 01 00
NCI >> 00 00 02 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 00 0c 02 e1 03
NCI >> 00 00 02 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 b0 00 00 0f
NCI >> 00 00 11 00 0f 20 00 ff 00 ff 04 06 e1 04 00 ff 00 ff 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 00 0c 02 e1 04
NCI >> 00 00 02 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 b0 00 00 02
NCI >> 00 00 04 00 0b 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 b0 00 00 0d
--- NDEF Record sent
NCI >> 00 00 0f 00 0b d1 01 07 54 02 65 6e 54 65 73 74 90 00
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 00 07 d2 76 00 00 85 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 08 00 a4 02 00 02 2f 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 02 0c 02 2f 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 02 04 02 2f 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 08 00 a4 02 04 02 2f 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 00 0c 02 2f 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 07 00 a4 00 00 02 2f 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 08 00 a4 00 00 02 2f 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0a 00 b1 2f 00 04 54 02 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 03 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 00 08 a0 00 00 00 03 00 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 01 51 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 00 08 a0 00 00 00 18 43 4d 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 00 08 a0 00 00 00 04 00 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 05 80 ca 9f 7f 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 05 80 ca df 50 17
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 05 80 ca df 52 17
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 06 80 00 00 00 00 7f
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 14 00 a4 04 00 0e 32 50 41 59 2e 53 59 53 2e 44 44 46 30 31 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0f 00 a4 04 00 09 d2 76 00 00 22 00 00 00 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 00 06 a0 00 00 00 25 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 04 10 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 04 30 60 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 03 10 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 03 20 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 03 30 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 03 80 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 03 24 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 65 10 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 01 52 30 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 10 00 a4 04 00 0a a0 00 00 00 02 30 60 d1 58 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 04 76 20 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 00 42 10 10 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 00 08 d0 40 00 00 01 00 00 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 14 00 a4 04 00 0e 32 50 41 59 2e 53 59 53 2e 44 44 46 30 31 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 14 00 a4 04 00 0e 31 50 41 59 2e 53 59 53 2e 44 44 46 30 31 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0b 00 a4 04 c0 06 a0 00 00 00 69 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 00 07 d4 10 00 00 03 00 01
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 00 07 d4 10 00 00 14 00 01
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 04 76 30 30 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 11 00 a4 04 00 0b a0 00 00 03 96 4d 66 34 4d 00 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 0c 07 a0 00 00 02 47 10 01
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 0c 09 d2 76 00 00 25 45 50 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0f 00 a4 04 0c 0a a0 00 00 01 67 45 53 49 47 4e
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0b 00 a4 04 0c 06 d2 76 00 00 66 01
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 12 00 a4 04 00 0c d2 76 00 01 35 4b 41 4e 4d 30 31 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 11 00 a4 04 00 0b a0 00 00 02 16 49 54 53 4f 2d 31 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 11 00 a4 04 00 0b a0 00 00 02 91 d0 56 00 01 90 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 00 08 a0 00 00 05 27 20 01 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 05 27 10 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0e 00 a4 04 00 08 a0 00 00 06 47 2f 00 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 05 27 21 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0f 00 a4 04 00 09 a0 00 00 03 08 00 00 10 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 00 06 d2 76 00 01 24 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 12 00 a4 04 00 0c a0 00 00 00 63 50 4b 43 53 2d 31 35 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 00 06 a0 00 00 00 01 01 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0d 00 a4 04 00 07 a0 00 00 03 57 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 16 00 a4 04 00 10 a0 00 00 00 18 30 03 01 00 00 00 00 00 00 00 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 0c 07 a0 00 00 02 48 02 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 0c 00 a4 04 0c 07 a0 00 00 02 48 03 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 05 00 a4 04 00 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 04 00 a4 04 00
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
NCI << 00 00 01 2b
NCI >> 00 00 02 6a 82
NCI << 60 06 03 01 00 01
READER DISCONNECTED
The project settings on my side:
I also applied a hardware solution to improve the RF performance of the OM5577 for Arduino, like below:
This is because of the loop around the antenna created by the ground plane, which can generates eddy current impacting the RF performance. The recommendation is then to cut the loop by cutting the ground plane, just like above.
Please try on your side as well to see if it makes any difference.
Please also enable NCI_DEBUG like I did in the project setting for analyze when the issue happens.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks and the bug fix you sent fixes the tag reading error message I got on my Android phone. I am not even using the Arduino adapter board anymore because it looks like it has obvious problems. I soldered wires directly to OM5577.
I noticed that the OM5577's read distance is about 8cm. This is good. However, when acting as tag, I need to hold my phone very close (about 2cm) to scan it. This is a problem for us.
Is there any literature that discusses antenna and RF circuitry design for Tag mode, or better a dual mode where device acts as a reader and a tag?
Is there anything that could be tuned by software that will improve the Tag perfomance of the OM5577?
Thanks very much.
Hi Oleg,
From my understanding, when OM5577 acts as a TAG, it works in passive target mode, so it is the reader/phone provides the power for communication, and so that it determines the operating range,so I think the bottleneck is on reader side, not due to the RF design on OM5577.
Have a great day!
-Kan
Hi Kan,
Thanks for trying this. But very strange. I just tried another Android device and I get the same behavior.
1. Are you able to scan the tag with your phone being one inch away?
2. Are you running the application directly from MCUXpresso?
3. Are you using the debug probe IC on the board for debugging or an external debugger?
4. Are you running the NXP-NCI_LPC820x sample exactly as provided by NXP, or did you make any modifications?
Hi Oleg,
1. Are you able to scan the tag with your phone being one inch away?
- Yes.
2. Are you running the application directly from MCUXpresso?
- Yes.
3. Are you using the debug probe IC on the board for debugging or an external debugger?
- I used the debug probe IC on the board.
4. Are you running the NXP-NCI_LPC820x sample exactly as provided by NXP, or did you make any modifications?
- I used the original sample without any modification.
BTW, the following is the IDE info:
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
This is extremely odd! I have both boards in front of me now. I am applying the mobile device with NXP app to the Om5577 on the beaglebone and it's reading it at almost 2 inches away, but in Xpresso version I almost have to touch it!
I swapped the OM5577s and no change.
1. What else do you think it could be?
2. how can I run the application on the Xpresso board without launching it through eclipse and debug probe (i.e by just applying power to the USB). I tried setting JP1, but it doesn't seem to be running.
1. What else do you think it could be?
- Maybe the connection issue, you know, the LPX82x Xpresso development board has the arduino interface instead, please check the connection on your side.
2. how can I run the application on the Xpresso board without launching it through eclipse and debug probe (i.e by just applying power to the USB). I tried setting JP1, but it doesn't seem to be running.
- Try to disable the semihost feature of the lib.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kan,
I attached the Beaglebone cape to the Xpresso board, instead of the Arduino shield. Two things:
1. The tag detection sensitivity drastically improved. I can scan at about 1.5" away now. So, it seems that the Ardunio based shield as some serious RF limitations.
2. However, I my Nxp TagInfo app on my Galaxy S7 is still not able to capture the data without any errors. Here's the video:
Dropbox - TagEmulationFailure.MOV
In the MCUXpresso console I get this:
WAITING FOR DEVICE DISCOVERY
- LISTEN MODE: Activated from remote Reader
--- NDEF Record sent
READER DISCONNECTED
I see that in your screenshot, you have two lines with "NDEF Record sent", instead of one.
This is my only reference for this project, so it needs to be working 100%. Are you able to escalate to another support tier? Our hope is to add the PN7120 and supporting parts to our commercial laundry machine modules
Hi Oleg,
Please also check if you disable P2P and RW mode, please refer to the following for details.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Are you using LPC824 board? I see you have different symbols defined, including LPCU11. I think you might be running different code from me. I am running the LPC820X_example:
Please try using an LPC82x board with the LPC82X project.