Re: Simple Bluetooth Questions: Help!
Re: Simple Bluetooth Questions: Help!
- Subject: Re: Simple Bluetooth Questions: Help!
- From: Eric Brown <email@hidden>
- Date: Thu, 29 Sep 2005 16:25:35 -0700
On Sep 29, 2005, at 8:34 AM, Joseph Kelly wrote:
Greetings,
I am building a bluetooth device that basically records some kind
of simple periodic data in the field, and once it's within
proximity, uploads this data to a host computer.
I have developed a prototype application using the objective-C apis
which I've gotten up and running in a matter of days -- thanks
Apple! (The Windows Bluetooth implementation is something gawd
awful by comparison!)
I'm using the serial device protocol on an RFCOMM channel.
My questions:
(1) I am identifying my devices by their name. Basically, they are
called "CompanyPrefix:DeviceName", so I get back a list of devices
from IOBluetoothDeviceInquiry, I match the name against
CompanyPrefix; I display DeviceName to the user. Is this a decent
strategy, or is there a better approach to identifying my device?
As you've discovered, there isn't really a good way to identify a
specific device (or specific vendor's device). Your strategy seems
about as good as any. Another option is to look into using the
Bluetooth device class information to identify the device, but that
isn't really unique any may not apply very well in your situation.
That assumes you have control over the device and how it identifies
itself.
(2) Is there a way to get to a lower level public Bluetooth api?
I've looked through some of the top level IOKit headers w/ no luck.
I think if I could get an answer to this question, my following
question might be moot.
All of the public Bluetooth APIs are in Bluetooth.framework and
BluetoothUI.framework.
(3) How do I enumerate devices without the UI in absence of
IOBluetoothDeviceInquiry?
IOBlueotothDeviceInquiry is the only mechanism for performing
inquiries. Is there something specific you're trying to do?
(4) How do I specify the passcode for a device programatically? (If
you haven't figured out, I'm trying to prevent user intervention as
much as possible because I'd like the discover-connect-upload
process to be automatic) There's a chance I might downgrade the
security model to eliminate passcodes.
There isn't a way to do this currently. We are considering adding it
in the future as there have been several requests for it.
(5) Say I have 20 devices, and 5 host computers. I would like the
devices to be bound to only one host, such that when the device
disconnects (i.e. travels out to the field) and re-connects, only
that host is able to connect to it. I know that I can cache the
device address on the host, but can anyone suggest a strategy
whereby I can guarantee that only that one host can connect to a
particular device, w/o necessarily connecting to the device and
opening a channel? Once again, I'm thinking of resorting to placing
the Mac's bt address in the name field (i.e.
CompanyPrefix:Address:DeviceName).
The best solution to this would require changes to the device. The
device would remember the host that it is tied to (possibly paired
to). Then it would refuse connections from any other devices. You
would likely need to provide a means to reset the device so you could
set it up with another host.
- Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden