06-14-2012 01:16 PM
I saw you just released a complete article about NFC SNEP, this is too fast ! ![]()
Thanks a lot.
06-14-2012 01:23 PM
we aim to please :-)
And there will be more!
06-14-2012 02:43 PM
Cool ![]()
But i noticed that the "Read mode" in NFC Tool can't detect the SNEP mode :/
06-15-2012 03:30 AM
06-15-2012 04:08 AM
Okay, so i have to tweak the code of the SNEP part in order to send a T, U or Sp message ?
06-15-2012 04:26 AM
Yes, a class like the following may help:
public class SnepMsgBuilder implements NDEFMessageBuilder {
private String the_text="";
public SnepMsgBuilder(String text) {
the_text = text;
}
public NDEFMessage[] buildNDEFMessages() {
NDEFMessage[] ndefMessages = null;
NDEFMessage textNdefMessage;
try {
textNdefMessage = NDEFMessageUtils.createTextNDEFMessage(the_text, "en-US");
ndefMessages = new NDEFMessage[] { textNdefMessage };
return ndefMessages;
} catch(NFCException e) {
return new NDEFMessage [0];
}
}
}
06-15-2012 05:26 AM
I duplicated the "Send vCard (SNEP)" part and tweaked it in order to send a Text record instead of a Media record,
But the other Dev Aplha in "Read" mode don't detect anything...
06-15-2012 05:33 AM
OK, I see what you're doing now. The read function in Nfc Tool will not receive SNEP messages sent by the same device. You need two devices to play with peer to peer. You can't be both sender and receiver of the same data in the same device.
So I used a BlackBerry Bold 9900 as the other device. The Java I pasted was from an app I wrote for BB7 which served an NDEF T messages via SNEP. This was received by the Read function running on the Dev Alpha.
Hope that makes sense and you have access to another device which supports NFC peer to peer mode.
06-15-2012 05:52 AM
I got it, that's why i'm testing that with two Dev Alpha, but the logs says that there's absolutely no BPS events for both sender device and receiver device :/
06-15-2012 06:02 AM
Ah OK, thanks for clarifying. You have *two* Dev Alphas?! Who do you work for?
I'll do some investigation now I understand this.
Cheers