×

Discussion Board

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

    Bluetooth connection from 6682

    Hello there,
    This must be a simple question..

    I have a server application running on the PC waits on a RFCOMM socket.
    I can connect/communicate to that server with another PC with a BT
    RFCOMM client application.

    I also have a midlet, running on a nokia 6682. This midlet attempts to
    make a Bluetooth RFCOMM connection to the server application, but it
    never works . This is a test application., so I hardcoded the connection
    URL as follows.

    SocketConnection sc = (SocketConnection) Connector.open("btspp://000D18012325:1");

    I know tha the server app waits on port 1 and the address is also correct.
    But this call never returns !!, no exception, no errors.. !!

    Bluetooth is enabled on the handset.
    I found a simimar question in the forum (http://discussion.forum.nokia.com/fo...ad.php?t=75576)
    but that did not really help.

    I'm very new to BT and handset programming.
    Please help

  2. #2
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    Well.. I'm sorry it does throw a permission exception.
    I wasn't noticing it because it was in an infinite loop !!

    This is what is being thrown
    javax.microedition.io.Connector.bluetooth.client

    So the question is how to set the "bluetooth client" permission ?

    thanks

  3. #3
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Bluetooth connection from 6682


  4. #4
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    Wang,
    Thanks for the post. Now I managed to create a jar file with permission for BT client and server classes. Now the next problem is I cannot install that application.
    Application manager on 6682 says "Authorization Failed". I went thru the user manual and it looks like we have to update the application settings (User manual page 95) to allow it to access network.
    It says there is a menu "Suite settings" and I should change settings from there. Unfortunately my handset does not have such a menu item. It has only "Settings".
    I'm wondering why !?? My service provider is Cingular and my phone is "locked". Do you think this menu is missing because my handset is "locked" ? I'm sure this is not a certificate issue. Because before adding the permissions I was able to install the application.

    Any idea ?
    thanks

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Well, think about it again. It is a trust thing. Now, your MIDlet tells your Nokia, it requires Java Bluetooth API success. However, as untrusted third party, your phone seems not to allow it and rejects the MIDlet on installation Before, you are able to install and then this issue rises, when you use the Java Bluetooth API actually. Therfore you were able to install it – at least.

    So it looks very much like a certificate issue. Play around in the Carbide.J SDKs (emulator) and test your MIDlet there. Make sure not to rely on more than one Bluetooth connection because the emulator is much more Bluetooth capable than a real device. Then install a self signed certificate there via its internal browser and sign your MIDlet to get it into an emulated trusted-third party. This makes sure, you get the siging process correct. If everything works, you can try the same on your real phone. Some Nokia Series 60 2nd Editon phones allow this.

    If everything works, you can go for a paid certificate like Java Verfied or another certificate authority. Or, well, throw away that Cingular crappy phone (or its firmware and flash another operator firmware version). Because this behaviour is quite unique. Never read of that, however, with a US operator version you do not know.

    Additionally, please go for the service discovery or if that is too complicated in your case, go at least for javax.bluetooth.DiscoveryAgent.selectService(…). This makes sure, we have no issue on that site. You should never hard code RFCOMM channels and/or Bluetooth devices addresses.

  6. #6
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    Hi traud,
    Thanks for the clarification. As I mentioned earlier, this is the first time I work with
    handset programming - hence never been aware of the security model. After attending
    a j2me session last week at java one, and after reading your posting, things started
    making sence to me.
    I guess I have to to buy a certificate, because I have to get this working on a real
    h/w. Luckly I can see a number of root CA's has already been installed on the hadset.( some of them are pretty expensive!!)
    About the BT discovery, yes I am planning to do that at some point. But now I'm at the "hello world" phase. So I just want to get get the connectivity working first.

    thanks again for comments.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Talking

    I think I can bet the number of your JavaOne session, should I…

    Again, the best you can do, is going for Java Verified. If you go for any other authority, make sure the certificate is allowed for (Java) MIDlet signing and not for SSL (Internet) only. Additionally, even as 3rd party you might not be able to use that permission. Ask Cingular if you can – if you have the money for JavaOne sessions, I guess you manage that – how they done the permissions. Normal non-"Java Verified" code signing certs are not so expensive, especially because you can reuse them for all your other products. Or am I wrong?

  8. #8
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    hmm.... where did my last comment go ??
    I replied to traud's posting yesterday and it just vanished into thin air !?

    Anyway.. what I was saying was :
    I think the only way I can get around this is to buy a code signing certificate.
    I spoke to thawte yesterday and that sounds lot cheaper than buying a new
    "raw" phone where I can install root CA's.

    I quickly went thru "java verified" site. It sounded to me like they will verify our
    application. But how can I let them do that before I make sure my app runs
    at least ?

    ~b

  9. #9
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Bluetooth connection from 6682

    Hi brown,

    Here is a signing tutorial for signing ur application for free.
    http://www.spindriftpages.net/pebble...275880301.html



    Wang

  10. #10
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    thanks Wang, that is definitly helpful.
    I have not tried that yet. But I'm just wondering... how is it possible ..
    That article says we should generate a certificate(self-signed) and sign the midlet with that.
    But the whole idea of code signing is to make sure the application is signed by a root CA !? But if the phone can accept a self-signed midlet, what is the security ?

    may be I got the wrong picture !?

  11. #11
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    As I wrote earlier, some Nokia allow self-signed certificates - you read my answers, do you? Perhaps they are too much compressed…

    Well, what is the reason behind MIDP 2 not allowing to trust myself? Does not make much sense either. Anyway, this self-signed trick is quite complicated and hard to deploy. Nice for testing, nothing for real market. Moreover, on my device, there were no additional permissions granted except FileConnection & PIM API (JSR-75) ones. Could be different for your phone. Could be the same.
    However, it is no Cingular and allows Bluetooth API (JSR-82) even as untrusted third party.

    Anyway as far as I know, this self-signed trick is a bug rather than a feature and was removed in later Nokia Series Editions.

  12. #12
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    I'm sorry I'm a little confused

    >>Moreover, on my device, there were no additional permissions granted except FileConnection & PIM API (JSR-75) ones.
    What do you mean by this ? Your midlet is self-signed and it allows only FileConnection ? Or do you have a CA cert and still it aoows only FileConnection ?


    >> However, it is no Cingular and allows Bluetooth API (JSR-82) even as untrusted third party.
    I did not quite understood this statemet either.


    The bottom line is : I'm okay with buying a code signing cert from a CA.
    But I just want to make sure that will allow me to use Bluetooth and File.

  13. #13
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    My phone allows Bluetooth (JSR-82) and File (JSR-75) even as untrusted 3rd party. This is the normal behavior, actually. However, to avoid security questions in JSR-75 (every time), trusted 3rd party level (in my case self-signed worked) and changing the permissions manually is needed.

    So, first try in the Nokia S60 Platform SDK (2nd Edition, Feature Pack 2 = Nokia 6682), there you are able to adjust security levels as within a normal phone. Then there try the steps for a self-signed certificate. When it works there, try the self-signed process on your real phone. When it works, you have trusted 3rd party level and you know if a paid certificate will help. When the MIDlet install and there are still security problems, you have to go for a higher security domain (Cingular or Nokia). When the self-signed certification process failed somewhere and your MIDlet does not install, you know nothing and either ask Cingular or go for thawte, VeriSign or Java Verified and pray.

  14. #14
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Bluetooth connection from 6682

    browndrf, Check the Java Signing Requirements for Cingular devices at http://developer.cingular.com/developer/index.jhtml
    Unfortunately Cingular has different security policy for midlets, and you need to sign your midlet with either Verisign or Thawte certificate for the Bluetooth connection to work. That is the message I got from Cingular reps.

    Hartti

  15. #15
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    124

    Re: Bluetooth connection from 6682

    Hartti,
    Thanks for the information, I was looking for such a site.

    Well, it looks like if I go with java, then I have to get a certificate, which can take
    long time becuase our company is at the very earliy stage. I'm trying to develop
    something very simple. Just a proof of concept

    So.. plan B ?
    What if I go with C++ development ? Do I still need code signing to get BT working ?
    What are all other pre-requisites needed ??

Similar Threads

  1. Bluetooth serial connection timeout
    By martin.ericsson in forum General Development Questions
    Replies: 0
    Last Post: 2005-06-13, 02:00
  2. Bluetooth connection slow to close
    By scole96 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-10-22, 16:26
  3. Replies: 0
    Last Post: 2003-07-06, 11:58
  4. Suggestion for resolving PC suite connection via bluetooth
    By Kazi in forum Bluetooth Technology
    Replies: 0
    Last Post: 2003-03-14, 19:35
  5. 6310 bluetooth connection with PCsuite fails
    By Nokia_Archive in forum Bluetooth Technology
    Replies: 1
    Last Post: 2002-05-28, 15:14

Posting Permissions

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