×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Bluetooth Communication old Nokia 6600 -> not so old N80

    Hi guys,
    I've developed a simple application that uses bluetooth (JSR 82) to send a photo from one phone to another. I've tried this application with two Nokia 6600 and it worked fine. When I tried the application with a Nokia 6600 and a Nokia N80,the applications throws the exception "Connection failed" when the phones try to connect each other. The connection is thrown in the following code is being executed:
    Code:
    url = ((ServiceRecord) records.elementAt(i)).getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
    conn = (StreamConnection) Connector.open(url);
    I can give you two aditional notes :
    - The phones can discover each other during the discovery process . They just can't connect.
    - The application in the Nokia 6600 is self-signed and the application in the N80 is unsigned.

    My questions:
    Can the problem be in the unsigned application in the N80? Not being certified, can the Symbian OS block the JSR Api? The other features of the application are all running very well.

    Can the problem be in the Bluetooth versions of the two mobile phones? I guess that they are different. Can we use JSR-82 with 2 different bluetooth versions?

    Can be the problem in the protocol? I am using RFCOMM.

    Cheers

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    If signing would be a problem, you should get a SecurityException. Bluetooth versions should be compatible between each other. RFComm/SPP should not be a problem either.

    Which UUID are you using? Perhaps you used the wrong channel ID?

    If you are new to programming Java+Bluetooth, I recommend to read more background information about JSR-82 (Bluetooth API) like a book or at least the PDF coming with the Javadoc.
    Last edited by traud; 2008-02-17 at 17:33.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Re: Bluetooth Communication old Nokia 6600 -> not so old N80

    Hi traud.

    Actually I'm not defining any channel ID. I just defined the same UUID (new UUID("F0E0D0C0B0A000808070605040302010", false) in both client and server. Then I just did the service finding and when the client tries to connect to the server it simply throws the "Connection Failed" Exception. Is there any way to automatically push the channel IDs? Can the problem be in the fact that Nokia N80 uses JSR82 with OBEX and Nokia 6600 doesn't? Im using "btspp" instead of "btgoep". Do you think this can be the root of the problem?
    The Channel Ids must be defined manually? Is there any manual implementation of the OBEX protocol and channel discovery over RFCOMM?

    As I've said, the application works with 2 Nokia 6600 but it doesn't work with Nokia 6600 - N80 commuincation.

    Cheers
    Last edited by lampz; 2008-02-17 at 21:41.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Is there a reason you mention OBEX? Do you use a btspp//: URL? I recommend to print your URL to the Form, Screen, Title or Ticker to debug that. Normally, you should not worry about channel IDs as getConnectionURL does that for you, however, the URL might be a problem (null or wrong protocol or wrong ID).

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Re: Bluetooth Communication old Nokia 6600 -> not so old N80

    Yes, I'm using btspp://URL. The funny thing is that I'm trying some of the bluetooth examples that come with Netbeans mobility pack and it happens exactly the same (I'm using BluetoothDemo example). When I connect two Nokia 6600 everything runs fine, when I connect Nokia 6600 to the N80 the services can discover themselves, they can even discover their servicerecord attributes but when they try to do the Connector.open(url) the application throw an exception.

    I've seen many examples and all of them implement the connection as I am doing. Do you know any simple example that works on recent S60 phones?


    Cheers
    Last edited by lampz; 2008-02-18 at 19:04.

  6. #6
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Re: Bluetooth Communication old Nokia 6600 -> not so old N80

    I've changed UUID from F0E0D0C0B0A000808070605040302010 to A55665EE9F9146109085C2055C888B39 and the Nokia N80 can work as server and 6600 as client. When I use 6600 as server and N80 as client the Exception appears again.

    After this experiment, I've changed the UUID again to A55665EE8F9146129285C2055C999B39 and everything works ok with nokia 6600 - N80 communication in both sides. After this, I tried the application in a Nokia N80 and another Nokia(6670) and, once again, the exception ocuured. I'm getting really crazy with this.

    This behavior is very strange... Any tip around this? It seems like the problem is with the UUID or something like that...

    How can I choose a suitable UUID for my application? I already tried to generate one with an automatic generator but it didn't work either.
    Last edited by lampz; 2008-02-18 at 23:54.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    I am unsure what is the problem in your scenario, too.

    If you are on a UNIX box use uuidgen and you get this for example:
    4C4C31CEDED711DCA97E0003937527D4

    However, I doubt it is related to your UUID. Does getConnectionURL always return a valid URL? Do you specify anything about ‘master’ in the server URL? Do you turn your devices off and one before these tests? Otherwise an old connection might got stuck. I am unsure either.

Similar Threads

  1. ###Upgrading Firmware###
    By zahid44 in forum General Development Questions
    Replies: 27
    Last Post: 2008-10-21, 07:17
  2. Known Issues In The Nokia 6600 MIDP 2.0 Implementation
    By jimgilmour1 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-06-15, 08:26

Posting Permissions

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