×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    socket communication over Bluetooth

    I'm trying to write a J2ME Midlet that can communicate to a server over TCP/IP sockets. The media between the handset and the server will be bluetooth.


    Correct me if I'm wrong here:-
    I believe The midlet has to discover (bluetooth) the server and join its PAN. Then it can use the standard TCP/IP sockets to communicate to the server ?
    I have seen sample j2me code to discover bluetooth. I have seen j2me socket samples as well. I'm just wondering can I just start calling socket functions right after bluetooth discovery/connect ? Or should I do something in between to initialize TCP/IP over bluetooth ?

    Is there a sample client code that you guys can pointme to ?
    Or the sequence of client side calls also would help.
    I'm using J2ME on my client side.

    thanks
    ~b

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,104
    No, it is not that easy.

    Although the MIDP 2.0 specification does not state which transport should be used for sockets, in Nokia world not Bluetooth but CDMA, GSM or UMTS are meant. PAN has its own protocol: BNEP which is based on JSR-82 (Bluetooth API for Java) L2CAP layer. Above this, you will have to implement IP and TCP, too, because I think there is no way to reuse the TCP/IP layers (Java class SocketConnection or Connector string socket) of the current MIDP 2.0.

    To make it clear, you get L2CAP, however, you have to implement all the rest yourself: L2CAP > BNEP > IP > TCP > your application.

    I highly recommend to skip the PAN profile if possible and go for a normal RFComm connection only. There, you only have to implement your application layer. Otherwise you have a lot of, a lot of, I repeat, a lot of work. Good you did not request the LAN profile…would be even more work to do (PPP).

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    27

    Re: socket communication over Bluetooth

    Quote Originally Posted by traud View Post

    I highly recommend to skip the PAN profile if possible and go for a normal RFComm connection only. There, you only have to implement your application layer. Otherwise you have a lot of, a lot of, I repeat, a lot of work. Good you did not request the LAN profile…would be even more work to do (PPP).

    Hi, we are going to go for the "lot of work" option. Nokia is supporting the effort so we are confident of success. Please check out and support the project, in the planning / organization stage.


    BluSPAN (Blu_etooth S_ymbian PAN)
    https://blogs.forum.nokia.com/view_entry.html?id=674

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    14

    Re: socket communication over Bluetooth

    Hi,

    take a look at Project Marge (http://marge.dev.java.net) as well . It contains a framework on the top os JSR 82, so you can easily inquiry for devices, search for services and then connect.

    Cheers,
    Bruno

Similar Threads

  1. Replies: 10
    Last Post: 2006-08-08, 17:08
  2. bluetooth socket and regisry it
    By Serhio in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-02-15, 08:03
  3. Replies: 1
    Last Post: 2004-04-21, 13:05
  4. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  5. Nokia DTL-4 and Socket Bluetooth Card - What is the real story?
    By cansana in forum Bluetooth Technology
    Replies: 0
    Last Post: 2002-07-29, 04:33

Posting Permissions

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