Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bluetooth connection with Android

In my App I need to connect a smartphone with an 4.0 low power Bluetooth-module. Then the module sends frequenly data to the phone.

  • Do you know some good tutorials for programming Bluetooth connection with Android?
  • Can you give me some links where the basics of Bluetooth are explained? (german if possible)
  • How can I test it? (I have to programm the Bluetooth device too and it's not finished jet)
like image 962
Julian M. Avatar asked Jan 14 '23 13:01

Julian M.


1 Answers

Google havn't understood that sometimes they have to actually create and DRIVE something themselves, not just piggybacking on open source stuff and marketing it as their own.

Unfortunately there are no standardised BT 4.0. Low Energy API's for Android yet. Maybe Google just decided to only go for NFC for Google Wallet or something and then let BLE die. (We really need BOTH!)

Broadcom tried to make an open source API but somehow (maybe Broadcom wanted money from them?) no phones included the ".so" file in their Android build so this API is useless.

TI and Motorola made another API for the RAZR series running on old Android 2.3.3 or something. This actually works but Motorola removed the documentation and source-code from their site.

HTC ONE X+ and newer HTC phones will support a new API "soon" with special HTC libraries according to HTC. (At least it seems they are doing something)

Samsung Galaxy S3 have some "secret" API's that some people can use for discovering devices, scanning services and characteristics (there is an app in google play "semilink Bluetooth Smart Scanner" which on the Galaxy S3 can do those things).

Google asked Broadcom to make a replacement for Bluez in Android 4.2. Unfortunately this release broke a lot of functionality and peripheral compatibility. Maybe because one or more of Wifi/GPS/Bluetooth Classic/Bluetooth Low Energy shares the same HW resources but the drivers doesn't handle that very well. Lot's of people got problems with the newest Android Bluetooth functionality.

So I would expect Broadcom to focus on fixing the mess and THEN with Google move on to add Bluetooth 4.0. Low Energy. Google have said "Low Energy is the next BIG thing we will integrate". At least 1 year too late.

Personally I had to buy an iPhone4S and iPad retina to get platforms which supports low energy. With those we could finish the BLE peripheral sw and get the protocols working. Now we are waiting for Google and Broadcom to clean up the mess. Hopefully with some backwards compatibility so all the old phones with BT4.0. capable chipsets will also open up to the wonderful world of coincell battery driven peripherals ;-) (got to dream).

In reality we must wait for HTC to release their APIs and for Google to choose/drive the standard API.

Windows Phone 8 was supposed to get BLE but it has been postponed for an update. (Lumia 920 is certified but without API's (AGAIN!!) we developers are helpless)

There are nice GATT API's for Windows 8 as well as for MAC "OS"x.

You really should invest in the TI BLE development kit which costs like $50-$100 for a dongle which can be used for BLE sniffing. It comes SOOO handy when you develop your BLE Peripheral SW.

like image 193
henrik Avatar answered Jan 23 '23 19:01

henrik