Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2009

    Thumbs down Trigger application on incoming bluetooth connection

    I have a bluetooth device which once paired with mobile connects automatically to my phone (similar to a bluetooth headset).
    I want my application to be triggered when the connection request arrives.

    Currently using my application I manually trigger a bluetooth connection to the device to read/write data from the device.

    I tried out push registry but i could not figure out what should be specified in the Connection Url . I tried out btspp://localhost:device_bt_address and btspp://device_bt_address.But it did not work.

    Please let me know if there is a way to trigger my application when the auto connection request is received on my phone.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Does this help? To which service (profile) does your remote device connects to? That is the UUID you have to specify in the URL, instead of a BD_ADDR.

  3. #3
    Registered User
    Join Date
    Sep 2009

    Exclamation Re: Trigger application on incoming bluetooth connection

    Hi Traud,
    Thanks for your response , I am not sure to which profile my remote device connects to , it is a health monitoring device .

    Before my application gets hit, the device gets connected to my phone automatically.

    Once paired it auto connects to my phone when it is switched on.

    I had tried the connection for the following profiles but none of them worked.

    SDP 0x0001
    RFCOMM 0x0003
    OBEX 0x0008
    HTTP 0x000C
    L2CAP 0x0100
    BNEP 0x000F 16-bit
    Serial Port 0x1101
    ServiceDiscoveryServerServiceClassID 0x1000
    BrowseGroupDescriptorServiceClassID 0x1001
    PublicBrowseGroup 0x1002
    OBEX Object Push Profile 0x1105
    OBEX File Transfer Profile 0x1106
    Personal Area Networking User 0x1115
    Network Access Point 0x1116
    Group Network 0x1117

    As specified in the thread pointed by you , i tried out the 128 bit Profile UUID's

    I had used the following format (Eg. for Serial Port Profile)


    Let me know if there is anything else i could try.

    OR is it impossible to trigger my application unless i know to which service my device connects to .

  4. #4
    Registered User
    Join Date
    Mar 2003
    Currently, your remote device connects to a well-known UUID. There is no way to override that profile from within J2ME. Specifying that UUID in J2ME, you end up with two profiles with the same UUID. Which one is taken, gets pure luck – if you do not know for what your remote device is looking for.

    You have to know for which UUID your remote device is searching for. Period. You should not ‘try’. Period. You have to ‘know’. Period. If you really, really want to debug this, connect it to a computer and log that UUID with a protocol analyser.

    You should use a 128 byte UUID for private UUIDs, only.

Similar Threads

  1. start midlet by bluetooth on S40
    By peba25 in forum Mobile Java Networking & Messaging & Security
    Replies: 15
    Last Post: 2009-11-05, 09:35
  2. Replies: 10
    Last Post: 2009-10-29, 05:54
  3. Speedup Bluetooth Discovery to reach Connection (Bluetooth JSR-82)
    By amadcow in forum Mobile Java Networking & Messaging & Security
    Replies: 8
    Last Post: 2009-07-01, 20:26
  4. Bluetooth Connection from mobile to pc
    By Karthik Sudhir in forum Bluetooth Technology
    Replies: 7
    Last Post: 2008-04-24, 18:48
  5. how to open a bluetooth connection from J2ME application
    By santoshtn84 in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 1
    Last Post: 2007-05-16, 10:29

Posting Permissions

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