×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    May 2007
    Location
    Luleå, Sweden
    Posts
    36

    Communication between 2 Nokia 6131 NFC

    Hi

    I have 2 Nokia 6131 NFC Mobile Phones. I am trying to transfer Text message, Bookmark, Business Card and Call request that are under Transmit to tag option in NFC menu, but it doesn't work.

    I set Secure Element to Always Active in both mobile sets and I Transmit one of 4 options under Transmit to tag, but other mobile doesn't receive it.

    If I set Secure Element to Ask First then on detect, it ask permission to make Secure Element to Active, it means they are detecting each other's tag.

    what kind of problem it could be or is it possible to do so or not?

  2. #2
    Registered User
    Join Date
    Apr 2007
    Posts
    14

    Re: Communication between 2 Nokia 6131 NFC

    It might be because there arn't specifications for peer2peer comunications yet so p2p functionality isn't included on the 6131. That's just my assumption.

  3. #3
    Registered User
    Join Date
    May 2007
    Location
    Luleå, Sweden
    Posts
    36

    Re: Communication between 2 Nokia 6131 NFC

    Two Nokia 6131 NFC mobile phones can communicate with eachother by using their Peer to Peer functionality. They communicate through NFCIP-1(NFC Interface and Protocol), in which, one mobile has to act as Initiator and other as Target. They open connection with eachother, after that Initiator sends data and Target recieves it and acknowledge to Initiator.

    If you want to know more about it, I can explain you with code examples.

  4. #4
    Registered User
    Join Date
    Apr 2007
    Posts
    11

    Re: Communication between 2 Nokia 6131 NFC

    Please, I need an example of this!!..

    A simple application to send and receive information between 2 nokia 6131 phones.

    Thanks!!

  5. #5
    Registered User
    Join Date
    May 2007
    Location
    Luleå, Sweden
    Posts
    36

    Re: Communication between 2 Nokia 6131 NFC

    As I mentioned, one mobile should be Initiator and other as Target.

    You put this code for Initiator:
    // Create Connection and wait for other NFC phone for detection
    NFCIPConnection p2pConn = (NFCIPConnection) Connector.open("nfc:rf;type=nfcip;mode=initiator");
    // Send Data as soon as connection established
    p2pConn.send("Hello".getBytes());

    Target phone code:
    // Create Connection and wait for Initiator phone for connection
    p2pConn = (NFCIPConnection) Connector.open("nfc:rf;type=nfcip;mode=target");
    // Recieve data from initiator phone and put into String data
    String data = new String(p2pConn.receive());

    Hope you will enjoy code!

  6. #6
    Registered User
    Join Date
    Apr 2007
    Posts
    11

    Re: Communication between 2 Nokia 6131 NFC

    ok. thanks bravo!

    But, these urls' (iniciator & target) don't work with the push registry. I don't lunch an application simply touching another device??. With ndef urls' I can write the urls' in push registry!

    ¿?

  7. #7
    Registered User
    Join Date
    May 2007
    Location
    Luleå, Sweden
    Posts
    36

    Re: Communication between 2 Nokia 6131 NFC

    I have not worked with Push Registry.

    I think, it will not launch with push registery, because without opening a connection, you cannot make a Nokia 6131 NFC Mobile to accept other connection. So, when application is not launched or its not waiting for other connection, it will not work.

    Turn off Tag Detection on both mobiles, even then this application will work!

  8. #8
    Regular Contributor
    Join Date
    May 2007
    Posts
    63

    Re: Communication between 2 Nokia 6131 NFC

    Hi,

    Anyone have implemented this peer 2 peer?

    I tried to but it return a ClassNotFoundException and IOException.

    Anyone have solved the problem?

    Thanks

  9. #9
    Registered User
    Join Date
    Mar 2007
    Posts
    130

    Re: Communication between 2 Nokia 6131 NFC

    Quote Originally Posted by lovercjs
    Hi,

    Anyone have implemented this peer 2 peer?

    I tried to but it return a ClassNotFoundException and IOException.

    Anyone have solved the problem?

    Thanks

    Code works fine. Only Exception throws "Send failed" though data is received by other phone.
    Is anybody got the same problem?

    Are you using Nokia 6131 NFC SDK? If yes it should not be a problem.

  10. #10
    Regular Contributor
    Join Date
    May 2007
    Posts
    63

    Re: Communication between 2 Nokia 6131 NFC

    Quote Originally Posted by Alex_Polt
    Code works fine. Only Exception throws "Send failed" though data is received by other phone.
    Is anybody got the same problem?

    Are you using Nokia 6131 NFC SDK? If yes it should not be a problem.
    I am using Nokia 6131 NFC SDK. But when i drag one phone to another after both midlet is started, it throw this exception.

    Do you mind copying your code here?

  11. #11
    Registered User
    Join Date
    Mar 2007
    Posts
    130

    Re: Communication between 2 Nokia 6131 NFC

    Quote Originally Posted by lovercjs
    I am using Nokia 6131 NFC SDK. But when i drag one phone to another after both midlet is started, it throw this exception.

    Do you mind copying your code here?
    I am using exactly the same code as mentioned above.
    One part at one MIDlet second in another.
    Send Failed exception is thrown, but I still receive "Hello" string.
    Check data value: String data = new String(p2pConn.receive());

    You put this code for Initiator:
    // Create Connection and wait for other NFC phone for detection
    NFCIPConnection p2pConn = (NFCIPConnection) Connector.open("nfc:rf;type=nfcip;mode=initiator");
    // Send Data as soon as connection established
    p2pConn.send("Hello".getBytes());

    Target phone code:
    // Create Connection and wait for Initiator phone for connection
    p2pConn = (NFCIPConnection) Connector.open("nfc:rf;type=nfcip;mode=target");
    // Recieve data from initiator phone and put into String data
    String data = new String(p2pConn.receive());

  12. #12
    Registered User
    Join Date
    Apr 2007
    Posts
    11

    Re: Communication between 2 Nokia 6131 NFC

    Hi,

    Witch is the limit in bytes for sending data between 2 mobiles with p2p connection?

    I can make:

    connection.send(byte_data_part1);

    connection.send(byte_data_part2);

    ¿?¿?

    Thanks.

  13. #13
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Sri Lanka, Colombo
    Posts
    204

    Thumbs up Re: Communication between 2 Nokia 6131 NFC

    i have develop a application and it works fine but the issue is application should be run in both phones in order to work the application.


    i have tried to apply the pushRegistry then it doesn't work. i think we have to figure out the parameters and the other thing is i think you cant have two applications which rely on push registry.


    so if any body knows hw to apply push registry just let me know....
    mikehassel@hotmail.com

  14. #14
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    113

    Re: Communication between 2 Nokia 6131 NFC

    AFAIK the Push Registry cannot be applied on P2P comms on 6131nfc, simply because the NFCIP1Connection does not know what it is transporting (= it does not support NDEF. You can, of course, transport NDEF on it, but the firmware of the phone does not know that it is NDEF).

    This NDEF transfer exists on the 6212 classic, where you can push an NDEF message to LLCP channel 5 when you detect a connection. This NDEF message is handled just as if the NDEF was read from a tag, so Push Registry works too.

Similar Threads

  1. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×