×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    272

    Red face Connection failed while using bluetoothAPI

    Dear friends,

    I am using JSR82 for bluetooth connection.

    According to the application requirement,

    I have to get the remote device address and have to connect to it send the data.

    I am getting the bluetooth address of the remote device and getting the url of the remote device using
    ServiceRecord.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);

    Here I am using uuid value as 0x0001.


    I am getting the url as :
    btl2cap://001dbec20fd0:1;authenticate=false;master=true


    and when I am using this url to establish connection with remote device,

    it is giving the exception as
    BluetoothConnectionException:SymbianOS error = -5: General:

    I dont know why I am getting this error.

    so which uuid value I need to use to make a connection with remotedevice.

    Actually I tested it on E61I device. and the remote device is MotorolaRazr. ( its service is btl2cap).

    How do I need to do to make a connection with this device.
    please help me.

  2. #2
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    272

    Re: Connection failed while using bluetoothAPI

    and for the above application,
    ServiceRecord.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);

    when I supply true as second arg to the above function,

    I opened a connection like:
    StreamConnection conn = (StreamConnection)Connector.open(url);

    then it is giving an exception as
    java.lang.IllegalArgumentException.


    I dont know why it is giving like this. For the Connector.open() function, I am supplying the arg as output of
    sr.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);


    its urgent. please help me.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    9

    Re: Connection failed while using bluetoothAPI

    Hi manoj,

    I am here not to help you with some information, since am new to java, but to take some help from you.

    I am given a task to send a file from mobile to pc throught bluetooth. Am very new to this field and dont even know where i should start. how to write client and server applications seperately and how to access mobile device from pc through bluetooth.
    Am very much lost in getting the API's and Methods, which i should use....

    It seems you have worked a lot on this kind of issues.... so pls provide me some info.

    Regards,
    Sowmithrii.

  4. #4
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    272

    Re: Connection failed while using bluetoothAPI

    Hi sowmitri,

    I am sorry to say that I cant help you in that particular task ( sending file from mobile to pc using bluetooth) because I never tried that. I can help you from mobile to mobile.

  5. #5
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    272

    Re: Connection failed while using bluetoothAPI

    dear friends,

    Now I can able to establish the connection with the remote device.

    But I dont know how to send a file (I need to send all types of files).

    can you please help?

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    manojkumar_m and sowmithrii, does this discussion help?

    By the way if you are new to J2ME, MIDlets and Bluetooth, I recommend to start with a book or tutorials rather than code examples as you will have to debug a lot on your own. There are a lot of bugs, tweaks and lessons to be learnt. Bluetooth is complicated. I do not have a good J2ME book at hand right now, however, start with the references of this one for JSR-82 (perhaps your library has its previous edition) or read at least the PDF coming with the specification. If you like to start with tutorials, continue here…

Similar Threads

  1. GPRS connection status---urgent, please
    By fanyulong in forum Symbian
    Replies: 3
    Last Post: 2008-07-15, 07:54
  2. S60 2nd to 3rd/ PlatformSecurity / Capabilities
    By jarkoos in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2007-04-14, 14:08
  3. socket connection to localhost failed
    By xzhang36 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-12-06, 06:47
  4. Nokia 5110 connection failed
    By henryhu in forum PC Suite API and PC Connectivity SDK
    Replies: 3
    Last Post: 2003-04-30, 13:11
  5. Replies: 5
    Last Post: 2003-02-07, 11:25

Posting Permissions

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