perjantai 28. marraskuuta 2014

Bluetooth link

Bluetooth as method to communicate between devices has fairly big stigma of being unreliable. This is not completely undeserved, but based on my observations it is (slowly) getting better. Unfortunately there's still a long way to go.

In my case the link is typically RFCOMM (serial emulation over bluetooth) where a device communicates with PDA or phone. On device side I've used BlueGiga's modules (not the cheapest option) but so far they have never failed me, working perfectly. Not to mention the their iWRAP firmware/command system that is simply pleasure to work with as it does all the hard work for you.

Phones, on the other hand, have been pretty much hopeless. The major issue seems to be their operating systems' bluetooth stack (and/or chipset). After some connect/disconnect cycles (like phone being moved out of range, temporary power losses at device end resetting links and so on) phones traditionally always crap out, requiring at best manual disconnect/reconnect, or at worst power cycling the phone. Not something that I'd like to tell customers to do.

The older Windows Mobile devices are the worst, and unfortunately I still have to deal with them. Daily reboots all the time. Older Nokias (Symbian) were unpredictable. Some models worked fine, others less so. I would have expected them to have common chipset/BT stack but apparently this wasn't the case.
So far I have no experience on Windows Phone so I can't comment on them and Apple's devices still don't support RFCOMM at all (or so I've been told) so they're already lost cause for my use.

Then there's Android. Like Symbian it seems to be hit-or-miss. Older Samsung phone I had (with Android 2.3) was hopeless - connect() would just block forever if it couldn't connect to remote device immediately (and I do mean forever - even if device became available it would never connect and never fail, just block until process was killed). Newer ones seem to be better, for example I surprisingly haven't been able to get Trend Plus (Android 4.1.x if my memory serves) to fail even once (and trust me, I've been abusing it a lot while testing, just like the customers would abuse the link).  I don't have much experience on other manufacturers' devices, but unfortunately the conclusion here still is this:

For BlueTooth use every single phone must be tested and "certified" as usable in our systems. I wish I wouldn't have to do that but until situation on phone end gets better that's just how it must be.



Ei kommentteja:

Lähetä kommentti