Bluetooth - the list of pre know devices for discovery

Hello,

Here's my problem:

My application is a 1 waiter - 1 caller program where the waiter sends its BLUETOOTH ADDRESS to the database. Then the caller checks the database for the BLUETOOTH ADDRESS of the waiter. After that the caller connects to the waiter do trade messages (strings).

So the thing is, I already did the "waiter" getting its own "address" and sending it to the database. I can also get it back from the database to the "caller".

But now in the "caller" the code must search for devices and services... so I think it would be nice to use the "PRE KNOWN" (since he already knows the bluetooth address) to get the service list from the "waiter".

Is this "pre known" a good approach for this problem?

How can I set the "pre know" addresses for pre know discovery - is it doable by code or only manually by the user ?

Thanks for your comments.

Message was edited by:

ZeroOneZeroOneOne

[962 byte] By [ZeroOneZeroOneOnea] at [2007-11-27 10:55:09]
# 1

Hi ZeroOneZeroOneOne

I've been watching this topic hoping to learn something I might want to use later, but nobody seems to be responding.

So I went through the javadoc for the BT API, and it appears that "A device can be set as a pre-known device in the Bluetooth Control Center." i.e. cannot be added programatically. From the point of view of security, this seems reasonable, I wouldn't want a free download to add BT devices to my preknown list !!

Have you considered doing the search just once, when your app is first run, and storing the (now known) address in a RecordStore? Then on following runs you could getRecord() the address instead of searching for devices.

Do post on whether this was useful, and whether you found a way to add a preknown address in code.

Regards, Darryl

Darryl.Burkea at 2007-7-29 11:54:32 > top of Java-index,Java Mobility Forums,Java ME Technologies...