Bluetooth Application Programming?
Comatose51 asks: "I've been desperately trying to create an application that uses Bluetooth over the last month. I've been frustrated by the lack of good books and lack of hardware compatible with readily available Bluetooth APIs. While Microsoft added Bluetooth support into Windows XP since SP1, most hardware vendors do not use the Microsoft Bluetooth Stack. Instead, they use other proprietary stacks that costs money to obtain the SDKs and APIs for. I had to buy the Microsoft Bluetooth Mouse to get their Bluetooth Stack and a compliant adapter, which is still many times cheaper than what some companies charge for their APIs and SDKs. Java is the other (potentially better, easier) option but I haven't found any hardware vendors that state that they're Java (JSR-82) compliant. Is there really no easy way of developing Bluetooth applications for Windows? It is sad because Bluetooth holds so much promise. Thanks in advance." Might Bluetooth's problems stem from the fact that there is no consistent development platform for the technology?
I just think BlueTooth could've been great, but its complexity and the lack of certain levels of standards doomed it.
I actually looked at the specs once, thinking maybe it would be interesting. After getting through the actual modulation used, which I didn't care about, I got to the part about establishing connections and stuff. It's horribly complex, and everything seems to be overdone, like someone had a grand vision, but couldn't figure out exactly how to make it work.
My other main problem with it is that it is missing a certain level of standards, which is the set of standards that would define the services a device offers. It does have a mechanism for indicating the type of device to which you are connected, but it seems only enough to pick an icon, not to decide what to actually say.
What it needs is a set of protocols, preferably XML-based, since XML is 31337, that can transfer files, send/receive photos, take pictures, record audio, dial/talk on phone calls, etcetera. These would be organized into a menu on the device, like "Files", "Pictures", "Voice Recorder", "Phone", etcetera, so devices that do some or all of these would simply show a choice (tabs, maybe) for what feature to use.
Any ideas?
Tired of free iPod sigs? Subscribe to my blacklist
<sarcasm>
...which is why the market is now overflowing with WiFi-enabled mobile phones, WiFi headsets, WiFi-enabled GPS receivers etc. etc.
</sarcasm>
Bluetooth and WiFi are complementary technologies. Bluetooth headsets make perfect sense whereas a WiFi headset would have its battery life measured in minutes. Likewise, using Bluetooth for wireless networking is something you do only when you have no other alternative.
I usually carry the following devices with me:
- Ericsson R520m GSM mobile phone with Bluetooth
- Sony-Ericsson HBH-30 Bluetooth headset
- Fujitsu-Siemens Pocket Loox 600 Pocket PC with Bluetooth
- Fortuna GPSmart BT GPS receiver with Bluetooth
Yes, I can get a WiFi-enabled PDA. Show me where to get WiFi versions of the other devices.My opinion? See above.
Try the Widcomm API.
Yes, it has lots of problems, and you have to correspond API==SDK (that is, if you develop w 1.4 SDK it can only run in the 1.4 Stack). But it's fairly easy to program, an it has all that metters (RFCOMM and L2CAP)
I guess compatibility is good (never had any problems)
I've never used the WIndows XP one, but I reckon it's more difficult to use.
how long until
Take a look at my site www.javabluetooth.com, it has almost everything that you're looking for. For instance:
1. It has a list of hardware to get you started in Java Bluetooth development
2. A list of Java Bluetooth SDKs
3. Information on my book, "Bluetooth for Java"
4. A sample chapter from my book
5. All the source code from my book
The folks on Amazon like my book, so you might want to check it out. You don't have to buy the book, but the early chapters explain all the complexities of Bluetooth, and makes it easy for Java and J2ME programmers.
Bruce
A company called Rococo have a development kit which hides the complexity of bluetooth behind an API, they also have a simulation envirnoment so you can test your apps before deploying them on the target devices. As far as I know theres a free download for linux.
I worked on an application for about 4 months, using Bluetooth communication for communication between two Windows PCs (as proof of concept for future devices). The experience was less than stellar. The SDK I used was discontinued while I was coding, but too late to switch to a new one (before funding ran out).
So what's my advice? Have a backup plan. Isolate your network communication procedures so you can easily switch to a new protocol/stack when one comes along. My code has been re-used, ported over to 802.11, because they found a power solution that would allow them to use the more standard protocol.
Bluetooth programming was only marginally more complicated than working with proprietary data transfer protocols I worked with in 1994. But 8 years later, it should have been easier. Call me a cynic, but the OBEX implementation of the stack I worked with caused me too many sleepless nights.
Dan
Just for the record
A cell phone transmits up to a distance of a two to three kilometers, maybe more depending on technology, vendor etc.
A Wifi transmitter transmits up to a hundred meters or so.
A bluetooth transmitter transmits up to a distance of 10 meters.
But they're all still RF transmitters.
Which one do _you_ want to fry your brain with? (do you want to take part in the 1-in-9-have-cancer statistic?) Cuz ignore it or not, them brain cells do get fried and _die_.
-