I'm working with the PN7160, my setup is as follows:
They are connected over I2C.
I have the 'basic' setup working. I'm using the libnfc-nci library, with the nfcDemoApp. I can successfully poll and detect an NFC tag and also I can put it into share mode, so that I can share for example a weblink, so that when I put my phone to the controller, I get a popup to go to that link.
There is one thing I can't get to work, which is storing Wi-Fi credentials into the NFC controller. I tried:
./nfcDemoApp share --type=mime -m "application/vnd.wfa.wsc" -d "<wsc_payload>"
This seems to - kind of - work. When I run this command on the Karo QS93 and tap my phone to the NFC controller with the NXP TagInfo application open, I see that it correctly received my WiFi SSID and Password.
Something else I tried:
./nfcDemoApp share --type=URI -u "wifi:<SSID>?T=WPA2&P=<password>"
This also gives me results in the NXP TagInfo application.
However, what I am trying to achieve, is that when I tap my phone to the NFC controller, I get a prompt on my phone asking if I want to connect to that Wi-Fi network. Is this possible with the PN7160, and if yes am I missing some configuration? Or am I just doing it wrong now?
Any help is appreciated!
Solved! Go to Solution.
Hi kowalski:
Do you use Android phone or Apple phone?
Regards
Daniel
Hi,
I got it working now, by using the ndef_emulation_example from the libnfc-nci_examples GitHub and modifying that to store Wi-Fi credentials.
But now that you mention this Android/Apple thing: I noticed that it seems that only Android phones are capable of scanning the PN7160 acting as a tag, and they get the prompt to connect to the network. One person with an Apple has tried it, and it didn't work for him.
What did work for the Apple person, was when we programmed Wi-Fi credentials into the NFC Sample Card (NTAG) that was provided with the PN7160 devkit. In that case, both Android and Apple could scan the card.
Do you have any explanation for this? Can the PN7160 even work with Apple?
could you please be more detail about the test with Apple phone? no prompt confirmation or not work at all? the ios version, or some logs?
I'm sorry for the confusion, but I am actually using the PN7161, not the PN7160 as I said before.
Hi Daniel,
The Apple Phone has IOS 17.4.1. It doesn't get the prompt to connect to Wi-Fi at all. Also when using the app NXP TagInfo, nothing is received in there.
We didn't try it yet with just storing plain text in the NFC controller (acting as tag), and trying to read that with the Apple Phone (in order to check: is the issue the phone itself, or the type of data stored in the tag).
In the attachment, there are the configuration files libnfc-nci.conf & libnfc-nxp.conf with the settings we use right now.
I have two questions:
1. Is it possible that some wrong settings in these configuration files, result in Apple Phone not working with NFC controller?
2. Will the PN7160 even work with Apple at all? I read something about PN7161 having ECP (Enhanced Contactless Polling), which PN7160 does not have. Is that needed to be able to work with Apple Phone?
I look forward to your answers!
The PN7161 supports all features of PN7160 plus "Enhanced Contactless Polling. For the card emulation demo, they behave the same. I guess it is compatibility issue for IOS. this demo is only a reference code, customer can modify it according to their needs. I created an internal ticket for this. but I can not get an exact time for it.
You are right. This is a known issue as far as I know, I have already reported it to our software team. But I can not guarantee the time.
Regards
Daniel