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
Is it necessary to use Windows for your app, or is it just what's on hand? Is this mass-market or special-purpose?
You might have better luck using Apple's Bluetooth SDK which has been standardized and shipped with the OS since Jaguar.
If it's a special-purpose app, you'll have a better outcome in the long-run by picking a stable API.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
The stories of Bluetooth's feasibility are long over. Basically, standardization was knocked around for so long, WiFi maes and engulfed it. Market factors like the lack of US demand for linked devices from multiple vendors also spelled the end, much like a www.pizzain30minutesorless.com idea. No lack of shame, since it was the best idea at the time, but the increase in wireless bandwidth just isn't coming up to push XML fast enough for more than trivial apps. But that's only what I've heard, since I never used the stuff. I like RPCs way too much to get away from them.
Bluetooth is dead? Then how am I going to get all these pictures out of my phone? IR? Jeez. Get your hands on a Mac and install the Developer tools. In /Developer/Examples/Bluetooth you'll find:
m ple
/Developer/Utilities/Bluetooth you'll find:
OBEXSample
OBEXSampleSendVCard
RFCOMMClientSa
RFCOMMServerSample
In
BluetoothMonitor
PacketDecoder2
I never looked at these before, so I checked them out. BluetoothMonitor seems to watche Bluetooth traffic (snort without the data). PacketDecoder2 seems to let you snoop on CMD, EVENTS, RFCOMM, SDP, and other interesting packets.
I spent the day wrestling with XCode and I totally hate it, but it looks like there are tools in here you want, so go spend $129 on Panther.
Not too long and you won't even be able to find a bluetooth mouse.
Bluetooth was laid off a long time ago but due to a glitch it was never informed. We fixed the glitch... It will just work itself out.
Boredom's not a burden anyone should bear.
dead, I tell you!
<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.
So where to from here. If bluetooth is dead and WiFi is taking over then why are there no mobile WiFi devices like cellphones?
Will this make cellphone towers and monthly rates obsolete? How about IP Cellphony. I am quite sure everybody has pondered about this very thought. It would mean a truly global interconnected network where mobile wireless networks can provide anytime anywhere networks. So what's the downside? One word, bandwidth. WiFi currently requires the 802.11b standard which runs 11mbps. 802.11g runs 54mbps which would be a jump, however all should probably wait for 802.11n which should push the bandwidth to over 100mbits to somewhere around 150mbps.
The Matrix Approaches. V / XI / MMIII Can't wait.
Anyway back to reality, so the IEEE and ISO have got standards pretty much under wraps although these standards are a bit buggy and have security holes. Shall we jump on the bandwagon and push the IPv6 development? Definately. With a new IP version we can accomodate more IP's and provide better security(IPv6 currently has alot more security features).
Now the question is how long do we wait for mobile devices to actively support and promote WiFi standards. Many moons Man with Clenched Fists
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
Purely out of interest, why can you not simply use a low-power Wifi for a headset? I am no expert, just asking. I mean, if your IP telephony headset does not need to talk to an antenna in the next building but only in the cellphone 2 meters away whats there to stop it?
The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
Cisco makes a WiFi IP phone...but, it does have to be within range of a WiFi network, and somewhere on that network, has to be stuff to make VoIP work.
It's currently about the same price as a regular Cisco VoIP phone is, but it can move away from the desk (i.e. anywhere in the company, not just in the cube.)
The problem as I understand it is that the WiFi protocol requires much more contineous transmission, i.e. the transmitter must be turned on for much longer periods. This means bigger current-drain and hence lower time of usage for a given output power/battery size combination.
However, I'm no expert either so I may be wrong.
My opinion? See above.
Bluetooth IS NOT A WIRELESS TCP/IP Alternative! It's a CABLE replacement technology. That is all. Besides other issues with Bluetooth, I am convinced that companies aren't using it because tehy still want to charge you 50 bucks for about 10 bucks worth of cable. They also still want to use non-standard connectors to you have to buy from them and noone else. BT is just starting to take off now. How many times did someone try to kill USB with Firwire? BT complements WiFi. When WiFi is available, you use it. When there isn't WiFi, you use your BT enabled phone.
Gorkman
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_.
-
People do appreciate clutter reduction; this is why non-techs like LCD monitors, wireless keyboards and mice, wireless phone synchronisation, wireless car kits etc.
I appear to have a blog. Odd.
Tell me, do these alleged studies compare the different cancer rates for 900MHz, 1800MHz and 1900MHz cell phones? Analog or digital transmission? PCM, CDMA or TDMA? Maximum transmitter power, or varied transmitter power? 600mW or 3W? Internal or external antennae? Telephone brand? Average cell-tower density? Data from the 1980s, 1990s, or 2000? Statistics from control subjects living in the same household, or working in the same profession? Can you provide links to these studies? Are you referring to the single unpublished study by a Swiss researcher that has yet to be reproduced anywhere?
Or is it just simply possible that these mythical studies don't actually exist; it's just a couple of anecdotes along the lines of "Well, my friend's dad died of brain cancer and he used a cell phone a lot!" or "Oprah said on her show that cell phones cause brain cancer!" or "CellPhonesCauseCancer.com says that cell phones cause cancer!" Maybe, just maybe, it's because YOU THINK cell phones should cause cancer that therefore they MUST cause cancer, and the rest of us should believe you.
The ONLY evidence I've seen of the harm caused by cellphones are studies correlating an increase in traffic accidents with driver cell phone usage. Not that this is inconsequential, mind you, but it has everything to do with inattentive driving and nothing to do with RF emissions.
Go collect some facts. Not anecdotes, they don't mean jack without context or controls. And while I may come off as biased here, it's because nobody has ever proven real long term health risks associated with cell phones. If those risks exist, we should see spikes or data showing all kinds of correlation with transmitter power, antenna location, etc. Believe it or not, with real data I'd be happy to change my mind. And as far as bluetooth goes, I personally would rather have an ultra-low power bluetooth headset talking to a low power cell phone in my pocket rather than have the full cell transmitter located at my ear. But that doesn't excuse unsubstantiated claims that 1-in-9 have cancer, or "ignore it or not." When real facts emerge, then you can start ranting. Until then, you're just another tinfoil beanie wearing scare monger, a crank who won't be taken seriously.
John
Whoa, keep'em flames a bit lower, will you?
I never said any of those cellphonescausecancer.com or oprah things. Don't put words in my mouth. Thatcher once said she really likes having conversations go down to personal lines and name-calling. It means that the attacker is flat out of arguements. Consider revising the way you conduct a conversation.
I worked on radars, and there is one thing I know quite well - RF heats shit up. The stronger the transmission, the more heat. Strong RF very near tissue most definitely cause cancer. That's no conspiracy theory. It's what any electronics freshman will tell you.
The _big_ question here is not "Do strong RF transmissions cause cancer" but rather "Do cell phones (or, if you want it more scientific, GSM900/1800/1900/CDMA/TDMA/WCDMA/whathaveyou or Nokia/Motorolla/Samsung units) transmit STRONG ENOUGH to cause it?" as you quite well pointed out.
The simple answer is - we don't know.
Is there very scientific POSSIBILITY of such harm? absolutely YES. It's just a matter of determining if cell transmission falls above or below the red line of causing harm. But sure enough, that red line is there.
We will know, in a few decades time, when we will, in the least, have statistics on how the masses react to having a cell phone placed against their head for 70 years. We might also have different phones.
Now if you want to use the austrich approach and say "If we don't know that it causes harm = It doesn't cause harm" - fine by me. You can glue 10 1st-generation 4Watt "bannana" phones to your head and cook aumlets on it all day. I suggest you find a local electronics engineer you trust and ask him if placing a 4Watt transmitter to your head for an hour a day will hurt you. Don't mention cell phones.
I prefer to say "If we don't know, it MIGHT be harmful, and I prefer to minimize the chance I'll get cancer due to this, and as long as I have the possibility to use smaller transmitters (Bluetooth) or plastic-tube headsets which do not complicate use, I will use them."
Oh, and the 1-in-9 is an Israeli cancer statistic that has nothing to do with cell phones. It's just how many people die in Israel of cancer. Forgive the irrelevance, I just don't want to end up as a part of it.
-
He didn't say that you said one of "cellphonescausecancer.com or oprah things", but he asked if your claims are based on facts or not. So far you are the one taking it personal, and he is not.
And then, you are mixing up a few things. Heat doesn't cause cancer (k, heat does increase mutation - stop wearing clothes to stop that).
Today, we can tell if certain kinds and intensities of radiation are increasing the risk of cancer: it's if they can ionize. And cell phone radiation does not ionize. So, unless there is a yet undiscovered special effect for exactly the cell phone frequencies it is very, very unlikely.
(and I'm not saying it's impossible. But there are facts. I'm not going to believe that the basic laws of physics fail unless there are some really good studies proving it!)
Unix makes easy tasks hard and hard tasks possible. Windows makes easy tasks easy and hard tasks $29.95.
Yes, I know that RF heats tissue. I know that sufficiently strong RF causes cancer. I know the exposure limits set by the FCC for transmitters over 50 watts. I also know that the wavelengths involved in cellular telephony are very similar to the dimensions of the human skull, to the point where cell phones may be considered optimal for inducing standing waves in the skull. So yes, I agree that there is the possibility that there is the potential for harm. And yes, I see no harm in using Bluetooth or plastic soundwave guides to reduce the transmitted power (and/or shorten the wavelength) of the RF emitted next to my skull. I certainly won't be strapping my old Motorola banana to my head, although it did two things to minimize exposure: it cut the power from 3W to 600mW when used with the portable battery out of its car mount, and it used a rubber duckie antenna to move the signal to above the user's head, rather than next to the ear.)
But there is still no evidence for health risks associated with these very low power (no health risks associated with cell phones. (If unavailable, see this google cache.)
Feel free to keep monitioring the public's health, don't buy a cell phone, (commune via crystals :-) whatever you want to do to keep yourself feeling safe; but don't "sound alarms" to the public when there has been absolutely no evidence to even suggest trouble. If you want to hand out realistic and useful safety advice for cell phones, tell people not to drive while talking on them.
Again, I was just extremely annoyed when your argument tripped all my triggers all at once, and I flew off the handle. Sorry.
John
Sorta OT, but why don't they make mouspads and wrist pads that recharge Bluetooth mice and keyboards via induction while they're in their correct places? That would give you the juice to sit back with the keyboard in your lap as long as you put it back on the desk when you went to lunch.
-- stream of did I lock the front door consciousness
My intention was never to raise alarms, I view the entire crystal-industry (I think you should trademark that term) in the same light you do. I did, however, bury 3 close people of cancer below the age of 60 within the last year, and that does have me a bit worried. And no, cell phones are definitely not the primary cause of it. Pollution, Shitty industrial food and what not all contribute their share. In Israel that's a 1-in-9. I don't know how bad it is where you live.
:-).
Besides, I think this entire offspring of the initial discussion missed my main point and went into the obvious and redundant.
The initial thread attempted to claim that WiFi makes BT redundant, I just pointed out that given two similar wireless headsets (one of each tech) and a regular phone without a headset, BT boasts an advantage by using the smallest transmitter up to your head (not to mention smaller energy consumption hence smaller battery). Which is probbably why I use one
-
Why not? Because 11b is a bit tricky to set up.
Do you want a phone and headset combination that only works with an 11b access point around to arbitrate things?
Or a laptop that can't talk to the phone because it's set to the SSID of the LAN instead of the phone's own private LAN?
Exactly *how* are you supposed to configure your headset so it only works with your phone, and not your cubical neigbours? And vice versa - you don't really want your neighbours headset picking up your call.
Yes, you'd need a standard on top of it all to achieve this - but BlueTooth has all this specified already. There are chips out there you can buy that do most of the hard work already.
11b is overcompilcated to set up in this situation. (Program a SSID into a headset?) Bluetooth is "discover and pair" devices.
(grr, I wish the North American's would realise that bluetooth is already ubiqutious among cellphones. Right as I write, my boss uses a laptop-USB-bluetooth to GSM cellphone link for high-speed data access over GPRS. Which cellphone supported 11b access? But of course, it tends to only be GSM phones that support this kind of thing, and GSM isn't popular over there... heh.)