Re: Collaborative Bluetooth.app Effort? (Was 'Re: New 2 All')
Re: Collaborative Bluetooth.app Effort? (Was 'Re: New 2 All')
- Subject: Re: Collaborative Bluetooth.app Effort? (Was 'Re: New 2 All')
- From: Eric Brown <email@hidden>
- Date: Thu, 30 Jan 2003 10:18:06 -0800
On Monday, January 27, 2003, at 11:55 AM, Craig Pugsley wrote:
I too am new to the listserv and the Jaguar dev tools.
Hussain, would you like to try and do something together? My
background is Java programming, so I'm really interested in
Cocoa-Java. However, as far as I can see, there aren't any Bluetooth
APIs written is Java.
I would really like to write something along the lines of the Address
Book.app (using the system-side address book API) functionality, but
try to address some of the niggling issues I have with it:
- If you have linked your mobile phone with Address Book.app (using
the bluetooth button on the interface), everything is fine. The
problems start if you move you phone out of range - at which point you
have to re-connect your phone.
--> I would have the app check for devices every couple of seconds if
something was connected, should be connected, but for some reason
isn't (i.e. the mobile has moved out of range).
Unfortunately you won't be able to get anywhere near the time
granularity that you want here. Bluetooth doesn't really provide a
mechanism for proximity detection. To simulate that, you essentially
have to page the device (either with a connect or name request command)
over and over. The problem there is that while paging a device, no
other Bluetooth connections can be created and existing connections
will be slowed down to some extent. The paging process typically has a
timeout of 15 seconds (long enough to more or less guarantee that if
the device is in range that it will see the page). Additionally,
because of lower layer timeouts in the hardware, in some cases its
possible for the timeout to be even longer. So you end up with a
period of at least 15 seconds (worst case - i.e. when the desired
device is not present) where performance is degraded and no other
connections can be created. There's also the lesser consideration of
the power usage during paging. If you're on a laptop running on
battery, its possible that could affect overall batter life (I do not
have any hard data to support this however). In general its probably a
bad idea to continuously look for a device when you don't expect it to
be there. In practice, you'd only be able to look for the device every
minute or so which wouldn't really give you the immediate behavior you
want.
In theory, the periodic inquiry functionality may be better suited to
proximity detection, but typically cell phones don't support being
discoverable all of the time. And even if they did, it would have a
definite negative impact on batter life.
Now given all of that, you're still welcome to try it out. I just
wanted to warn you ahead of time so you know some of the pitfalls going
in.
- Eric
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.