Open richardperryman opened 7 years ago
It looks like HCE is what I'll need, this stackoverflow discussion explains pretty well why P2P won't work with PN532 shield: http://stackoverflow.com/questions/28862126/p2p-nfc-communication-between-android-and-adafruit-pn532 A library supporting HCE on the PN532 already exists on the Arduino side, which makes my life significantly easier! I'll bring the NFC module in to school tomorrow, if you're able to get a simple "Hello world" kind of message going on the app, we can give the sample reader program a try.
Alright, hopefully I can get something working by tomorrow! Thanks!
Ok, so from that stuff from before, the AID that I have randomly selected is "F7A539758AB0007F". I think you (@jessicamorris) will need to include that in a message that you send if this is going to work?
Noted, I'll replace the AID in the sample program with that one!
So, after further reading, I don't think there is anything built into the HCE protocols to end a transmission. I think what we have to do is have you stop sending information to the app. The android device will always respond so long as it receives a APDU from the other device. So I don't know how easy this will be to coordinate before tomorrow, but maybe just send some additional data to signal the first message, and then send back the data as a response and then if you get some magic bytes in the next one stop reading for like 5 seconds? Let me know if you want to Skype or whatever to set this up.
Some links to read:
Beaming seems to use this ndef suff, which I'm not sure how easy it is to use for our hardware. The other option seems to support multiple possible protocols, but I'm not sure if what is sent underneath still uses ndef.