Monday, July 29, 2013

Android Application Bluetooth Low Energy Scanner

After installing the Android 4.3 on Nexus-4, one can write the Bluetooth Low Energy (BLE) programs on Android platform. As still no official samples are available from LG/Google on the SDK samples, I tried to dig through available the Java-docs for new SDK and write  an Android-App for scanning all BLE devices available in vicinity.

To use this application, we need following:

  • Any Android with 4.3 installed and have BLE HW support ( that means the mobile phone should support Bluetooth 4.0)
  • For getting list of scanned devices, we have two options:
    • Have real BLE devices (like BLE dongles, chips, SoC, etc)
      • We need to have a firmware image that allows us to start the discoverability on the device.
    • Have another Android 4.3 phone with BLE enabled and discovery enabled

I have TI's CC2540DK-MINI development kit  and NordicSemi's   nRF51822 Development kit. TI's kit comes with a KeyFrob and USB-based-BLE-devices and USB-based firmware loader.  For current project, I am using TI's kit's KeyFrob as my BLE device (that I am scanning from Android phone).

I have loaded the project code to the  project site.
You can try the same application using the Android application download link

Here is screen shot



20 comments:

  1. Excellent. Will try it on a on a Galaxy S4 with Android 4.3 tomorrow.

    ReplyDelete
  2. But keep in mind that Android phones might not reply to BLE-scanning. If you have BLE devices and are discoverable, that is more preferable. Today I tried with iPhone-5 today, can't disvover it (even though that iPhone was made discoverable). Will do more trials and keep posted here

    ReplyDelete
  3. Nice, on your comment about trying on an iPhone-5, I presume you used the sample application that makes the iPhone act as a BLE device, because turning ON bluetooth in Settings does not make it a BLE beacon.

    ReplyDelete
  4. @MohanDoss
    Thanks for your comment. Most probably all smart phones may/maynot respond BLE-scanning requests. I will try the BLE-scanning for HTC-One today.

    @Jomar,
    Thanks for trying on S4/Android 4.3. I will keep updating this app over the coming weeks for more on GATT/etc.

    ReplyDelete
  5. Thanks for the excellent information about android apps.the setting on bluetooth i really want to know about that.Thanks for sharing this valuable post.

    android apps

    ReplyDelete
  6. I can't get enough apps, I'm always downloading the newest ones and experimenting with making my own. I've had an idea for an app in my head for the longest time but I had no idea where to even start. I am very inexperienced in android application development, so I've been researching online what the best methods are. would you use a mobile based social network, where you meet up with strangers who have something in common with you and make connections?

    ReplyDelete
  7. I installed JB 4.3 on my Nexus 10, and patched with the BLE enabler.
    http://forum.xda-developers.com/showthread.php?t=2387107

    This works, I am testing with a TI BLE Sensortag and the nRF51822-EK.

    ReplyDelete
  8. HI Mahadev,

    Do you have any luck scanning the ios device.. Alos please check the below link which talks something similar to this..

    https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=58725#makechanges

    ReplyDelete
  9. Hi Mahadevan,

    We are an Australian company. Just wondering how could we get in touch with you reg an interesting project with BLE. You can write to us sensar [ at ] gmail dot com. Thanks in advance.. Senti.

    ReplyDelete
  10. Can you give BLE android project?
    do reference!
    thanks! from Taiwan!

    my email is komlllcf@hotmail.com
    your link is OK,but apk install error!

    ReplyDelete
  11. Can you please send project code for reference
    My email id is saurabhathavale02@gmail.com

    ReplyDelete
  12. I have just downloaded your app and installed on my nexus 4 phone But when i click on scan device it does not scan another nexus 4 phone.

    ReplyDelete
  13. hi Mahadevan,

    Can u able end source code to my mail id srinivas4a2@gmail.com

    ReplyDelete
  14. Hi,

    Right now I am going to do my masters project which is related with ble scanning and It would be very helpful if you can send me your source code. I now it is private but I an stuck that is why asking you if you could help me.

    My email is jgarach9@gmail.com

    ReplyDelete
    Replies
    1. You can use this app for scanning BLE Devices.
      Here is Link :: https://play.google.com/store/apps/details?id=com.macdom.ble.blescanner

      Delete
  15. i m not able to get any device .

    there is no device available in ble device list.
    i m using samsung s3 with 4.3 and htc one with 4.3.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Is there a way to get the source code for this? would love to have this as as template.

    ReplyDelete

  18. videocon Recharge Rs.83 ,get Talktime Rs. 63 & 10 Local V2V Mins. Mins Valid for 28 days.

    ReplyDelete