×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    24

    How to get remote device for Bluetooth server

    Hi,

    When a MIDP application wants to initiate a bluetooth connection with a server, it can initiate a device inquiry, and obtain a list of remote bluetooth devices in the area. The software that I'm currently developing needs to keep track of all the devices that my program has connected to in the recent past.
    When I initiate a client connection, this is easily done, because I can just store all the RemoteDevices that are returned in the deviceDiscovered() method. However, a problem arises when I need to do the same at the server side.
    When a server waits for a connection, it makes a call to
    Code:
    conn = server.acceptAndOpen()
    After the connection has been established, is it possible to retrieve the RemoteDevice somehow so that I can add these devices to my software's recently-connected device list? Please do let me know if there is a way. Thanks!

    Ram

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    5
    Sure, just do it like this:
    Code:
    RemoteDevice rd = RemoteDevice.getRemoteDevice(conn);

Posting Permissions

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