7

I am trying to develop a BLE bluetooth (SMART) application for Android.

I managed to download the Broadcom BLE SDK, install through the Android SDK Manager as explained on the web site and download the projects examples.

When I tried to push one of the examples into my tests phones (HTC One S, HTC One X both with Bluetooth BLE feature), I am facing the following issue:

INSTALL_FAILED_MISSING_SHARED_LIBRARY

Is there any possibility to include the broadcom library described in the AndroidManifest.xml file ? <uses-library android:name="com.broadcom.bt.le" android:required="true"/>

Is someone managed to test the broadcom projects examples? And on which phone?

According to this post, a bug has been discovered on Samsung Galaxy S3, but I didn't find any information about HTC products.


UPDATE : What a great news!!!

Last Android version 4.3 (Jelly Bean) now support low-energy Bluetooth Smart accessories.

http://www.android.com/about/jelly-bean/

https://developer.bluetooth.org/Pages/Bluetooth-Android-Developers.aspx

Not sure that every phones will have an update (even the last HTC One M7 for example) but next phones will certainly embed this major release.

Community
  • 1
  • 1
sdespont
  • 13,915
  • 9
  • 56
  • 97
  • Just as suggestion, I used this API and worked well for me http://developer.motorola.com/docstools/library/bluetooth-low-energy-api/ – Fran Verona Jul 06 '12 at 12:37
  • Thank you for your advice, what kind of development kit do you use? I am using this one : http://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF8001. Any chance to drive a Nordic BLE chip with a Motorla library? – sdespont Jul 06 '12 at 12:55
  • I developed an Android application to my Motorola RAZR Droid that should communicate with an smartcard using Bluetooth LE. I don't know if Motorola's API works with your kit. Sorry if I can't help you too much in this line. – Fran Verona Jul 06 '12 at 12:57
  • Thanks for your reply. Last question : Do you think that the Motorla library could work on HTC phone? – sdespont Jul 06 '12 at 13:02
  • Maybe was optimized for Motorola's phones, but I think that it is independent of the phone. – Fran Verona Jul 06 '12 at 13:04

8 Answers8

11

The problem is that if your phone doesn't have the .so file installed, this isn't going to help.

And your device will only (as of this writing) have the .so file if Broadcom has blessed the device.

For example, the latest official build (4.0.4) for the reasonably-new Samsung Galaxy Nexus does not.

For those that don't know, there are two different (incompatible) APIs for LOW-ENERGY Bluetooth (BtLE, now apparently called BT Smart). One is from Broadcom, and the other is from Motorola. Unsurprisingly, each only works on a phone that has that vendor's chips in it.

This is a terrible, terrible situation, and Google REALLY needs to get moving on a solution or Android will become totally irrelevant in a little industry known as HEALTHCARE!!!!!

idarwin
  • 607
  • 4
  • 19
  • Good answer, thank you. Did you try to develop BLE app with IOS? I read on the net that Apple released a new version of thier "CoreBluetooth Framework" supporting BLE. An heartmonitor application (ANT) exists with source code, but I didn't find anybody able to drive a development kit like mine : nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF8001 – sdespont Jul 10 '12 at 06:11
  • 1
    End of the year, still no solution from google. So, I decided to close the topic. Thank for your answer and keep in touch for any update found in the web! – sdespont Dec 25 '12 at 08:27
  • 1
    so have you got something to make it work. I got this library source code and trying to write JNI layer to integrate this lib with Broadcomm stack – AAnkit Jan 21 '13 at 16:53
  • @AND_DEV : I'm very much interested to know about the same. I need to try the 'broadcom-ble' SDK for a project. So, if you have some guidelines for me, it will be very helpful. Thanks in advance. – Midhu Feb 27 '13 at 11:46
  • If you are writing a app depends on this SDK it never work, this SDK is incomplete, in discovery they call a method getDeviceType which is not defined anywhere hence it crashes there only. – AAnkit Feb 27 '13 at 12:31
6

The HTC One X and One S use a Qualcomm Bluetooth chip, not Broadcom. Therefore the Broadcom SDK would not be expected to work. There is an HTC BLE SDK that works with the HTC One X+, Droid DNA, and HTC One that you can sign up for the HTC BLE SDK here:
http://www.htcdev.com/devcenter/opensense-sdk/partner-apis/bluetooth-low-energy/

Lance Nanek
  • 6,377
  • 2
  • 24
  • 19
  • 1
    The International (european) version of HTC One X uses the TI Wilink chip. – Brad Werth Nov 09 '12 at 08:59
  • End of the year, still no solution from google. So, I decided to close the topic. Thank for your answer and keep in touch for any update found in the web! – sdespont Dec 25 '12 at 08:27
  • 1
    Sure, no problem. The HTC BLE SDK was since announced and is available to people who sign an NDA. Currently supported devices are the HTC One X+ and Droid DNA. – Lance Nanek Dec 28 '12 at 22:13
  • 1
    @LanceNanek Will the SDK support other devices(One X/One S) in the future? – reTs Mar 20 '13 at 08:44
3

Confirming BroadCom BLE stack works on HTC 1X+ and cooperates with standard TI KeyFob Demo.

Seems like I'm making a dumb post, but I thought someone might be encouraged to keep going by an unequivocal statement of at least a tiny success.

BleFindMeClient really does work on the HTC 1X+ in conjunction with the TI CC2540-mini Keyfob aka KeyFobDemo in the TI distro.

I've never written an Andoid app., or code for the TI keyfob, so it took me a frustratingly long while to figure out how all the tools worked and how to configure them, but there was no real magic. For me, some of the other Android demos don't compile out the gate without some code tweaks, but that could just be my inexperience.

http://youtu.be/cqWpjU7gJ2Q

On the other issue regarding getDeviceType(), here is a code fragment that works perfectly every time on the HTC 1x+. Hope this helps too.

BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if ( BleAdapter.getDeviceType(device) == BleAdapter.DEVICE_TYPE_BLE ) {
    ...
}
sdespont
  • 13,915
  • 9
  • 56
  • 97
2

Someone find the solution here.

The three steps to do are :

  1. Do not include in manifest file.

  2. In project PropertiesJava Build PathLibrariesAdd external jar, add broadcom ble jar.

  3. In project PropertiesJava Build PathOrder and Export, check the included jar in step 2.

Finally, the Broadcom samples projects run, but crash after few seconds due to an unknown virtual method not implemented on HTC (.getDeviceType(), ...)!

sdespont
  • 13,915
  • 9
  • 56
  • 97
  • Any progress to bypass the .getDeviceType pb ? ... I try to do the same thing but I'm blocked on the same issue... is there any more recent version of the SDK available ? – fvisticot Feb 22 '13 at 08:01
  • @sdespont: sorry if I comment on such an old post, but information according to BLE and android 4.2 is very hard to find. Do you know, where I can download the broadcom ble jar (maybe with some sample code)? Many links pointing to google with some information are ending up with error 403. Thank you very much for sharing your knowledge – Linard Arquint Dec 02 '13 at 20:41
  • @fvisticot Hi, Android 4.2 doesn't implement BLE. You need to use Android 4.3 and next versions. In other words, you can't use BLE with devices which don't support the 4.3 version. – sdespont Dec 03 '13 at 13:58
  • You can use BLE with Android 4.0 - 4.2 (possible with earlier versions). Hi guys, I am from the nearest future. There are still many new android devices on Android 4.1 and 4.2 which do not support BLE, but using some of the external libraries it is possible to connect. The main source of information is "Bluetooth Quick Start Kit v3" [https://developer.bluetooth.org/DevelopmentResources/Pages/Quick-Start-Kit.aspx]. It has all the docs and sources with library for earlier version of Andriod. HTC provides it's own library: "OpenSense BLE API Android SDK". Also check out Samsung BLE SDK. – Vladislav Mar 06 '15 at 06:34
1

It seems that something might be missing on the HTC phones as well. This error means that there is probably a layer of software missing (or malfunctioning) between the BLE hardware and the API. As for today I have only seen BLE kind of working on an the Motorola Razr but it seems to be limited to the heart rate profile (and it does not use the Broadcom API).

Franck
  • 86
  • 1
  • In fact, you think that at this time there is no way to develop Android application with Bluetooth BLE? – sdespont Jul 03 '12 at 16:42
  • I would love to be told otherwise but at this point it does not seem to be ready. We have tested the Motorola Razr and the Galaxy S3 and decided to wait for the next updates before continuing the development of our android apps. Hopefully it will come very soon! – Franck Jul 03 '12 at 22:38
  • Someone reply on my question with a good suggestion here : http://code.google.com/p/broadcom-ble/issues/detail?id=1 I don’t have my tests phones todays, so I will test tomorrow morning and post my feedback! Have a nice day – sdespont Jul 04 '12 at 06:47
  • I was also trying to do the same. I tried using the broadcom API with my Samsung Galaxy S3 Mini but it doesnt seem to work. \ I wonder if we can write code in C/C++ for BLE device communication and write a wrapper and access that code from android? Would it be possible? Has any one tried? – Shraddha Shravagi Apr 15 '13 at 06:50
1

If any body writing a app depending on this SDK, there is one line I want to tell

in DeviceDiscovery they call a method getDeviceType which is not defined anywhere in the entire Android JB codebase hence it crashes there only. so if are trying hard to remove the crash, just keep in mind you can not do it if it is crashing in device Discovery event.

AAnkit
  • 27,299
  • 12
  • 60
  • 71
  • Then how can we make it work? Is there any other ways to solve the issue? From where I can get some start-up guidelines for BLE-Android implementation? Thanks in Advance. – Midhu Mar 02 '13 at 03:54
  • 1
    I dont do this untill u get public APIS to do so, wait for Android next release, Google/BRDCM working on it. Or if you want to implement this on OS level, you need to write your own GATT APIS for the same. – AAnkit Mar 02 '13 at 07:57
0

Just to clarify, only starting with these currently available HTC devices will you find BLE support: the HTC One X+, the HTC Droid DNA, and of course the HTC One and upcoming flagship devices. Note that as of 4.3, you should migrate to use the standard official Android BLE API, to support devices pre-4.3 you can use the HTC BLE API. See https://www.htcdev.com/devcenter/opensense-sdk/bluetooth-smart for more info and sample code supporting both APIs.

dljava
  • 1,825
  • 17
  • 14
0

What a great news!!!

Last Android version 4.3 (Jelly Bean) now support low-energy Bluetooth Smart accessories.

http://www.android.com/about/jelly-bean/

https://developer.bluetooth.org/Pages/Bluetooth-Android-Developers.aspx

Not sure that every phones will have an update (even the last HTC One M7 for example) but next phones will certainly embed this major release.

sdespont
  • 13,915
  • 9
  • 56
  • 97