Moin,
Am Mon, 13 Feb 2006 15:58:18 +0000 schrieb John:
> Is it possible to broadcast a bluetooth message to any device within a
> certain range?
From a technical standpoint: no. The usual protocols for sending things
with Bluetooth all work with one-to-one connections and not
one-to-many. (If I recall correctly then the underlying Bluetooth
transport protocols do indeed allow for broadcast, but it's not used.)
However, for your application that doesn't really matter, because you
will be fine when you simply connect to each device in range one after
the other.
Note though that in order to connect to a device you must know its
Bluetooth address. In Bluetooth these are acquired though a process
called inquiry, but in order for that to succeed the other device must
be in inquiry scan mode (usually called "visible" in layman's terms).
Due to the tremendous amount of Bluetooth related security
vulnerabilities these days most Bluetooth devices can be expected to be
switched to 'invisible', which will make them virtually inaccessible to
you.
> Or do you have to pair with a device before you can send a message
> which they can choose to accept or reject?
That really depends on what you are trying to do with which target
device. "Pairing" is the process of establishing authentication keys
which allow for secure (authenticated and/or encrypted) connections,
and thus is mostly only necessary for connections that require such
security (synchronizing your address book, etc.).
What you want to do can usually be accomplished by OBEX push, which
usually is possible anonymously and unauthenticated/unencrypted
(typical use case: if you want to push your business card to a random
acquaintance you just met you won't want to go through the pairing
procedure). However: The security policy is determined and enforced by
both devices, and I did see mobile phones that required a pairing just
for OBEX push (which is broken behavior, if you ask me).
If the other device doesn't want to play along with you, you really
can't do anything about it. (Well, some of the time you can, because
mobile phone Bluetooth stacks tend to have security vulnerabilities
more often than not, but that's a different story.)
> Is it possible to send the message even if you're not paired with a
> device and for them to choose to accept or reject?
That is precisely what OBEX push is for. It allows you to send
arbitrary objects (business cards typically, but audio files etc. might
be possible, depending on the phone at the other side) and have the
recipient chose to accept them or not. Again: there are countless
variations on this theme: some phones simply accept everything and
store it temporarily in an inbox for the owner to chose from; most
phones ask their owner for permission, but the amount of detail in that
question varies greatly (typical information that is given in the
question includes the remote device's name, the file's name and the
file's size, though some phones do not show some or all of these
infos.) And some devices, Windows PCs using Microsoft's Bluetooth stack
for example, will require their owner to initiate the receive procedure
on his side of the connection first (again: broken behavior if you ask
me).
> I am also interested in what the average range is for a bluetooth
> device before it gets out of range?
Depends (again) on your device and the other device. Below 10 meters is
a fairly safe bet. There are devices spec'd for up to 100 meters, but
these typically aren't mobile phones but rather PC dongles. Normally
you won't get the range advantage if not both devices are of the 100
meter variety ("class 1" in Bluetooth terminology), but it has been
shown that you can greatly increase your range if you just use a huge
directional antenna, see
http://trifinite.org/trifinite_stuff_lds.html
> Thanks very much for your insight on this.
I'd recommend you read some more on Bluetooth basics. The wikipedia
might not be the worst place to start:
http://en.wikipedia.org/wiki/Bluetooth
http://en.wikipedia.org/wiki/OBEX
--
Henryk Plötz
Grüße aus Berlin
~~~~~~~ Un-CDs, nein danke!
http://www.heise.de/ct/cd-register/ ~~~~~~~
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~