Light_BLE - a practical APP tool to develop Bluetooth LE device

Light BLE APP


Table of Contents

  • What is Light BLE APP?
  • The Advantage of this APP
  • Why I make above improvement?
  • Source Code

1 What is Light BLE APP?

It is an enhanced android app to communicate with Bluetooth LE peripheral.

This app may be useful in Bluetooth Low Energy peripheral equipment development. It is based on an example in Android's SDK source code sample which located in sdk/samples/android-19/connectivity/BluetoothLeGatt/ , but that example sucks(yeah, Light BLE  sucks too, but much better than that sample).

2 The Advantage of this APP

Following is what I improved based on that sample.
  1. Change the LocalService and Activity communication mechanism from broadcast intent into callback hooks.
  2. Add RSSI signal detects.
  3. Add write characteristic dialog(still need to improve).

3 Why I make above improvement?

  1. Broadcast Intents was not dependable, I guess that's the reason that I missed a lot of messages. So I studied the communication between Service and Activity and decided to use callback hooks to send feedback or messages to the foreground Activity.
  2. Since I wanna develop a Loss-Resistant device, the silliest implementation is to detect the RSSI signal strength and write a characteristic value back to BLE devices back to inform whether it is lost or not. So I add an RSSI signal detection function into that APP.
  3. Sometimes, we just need to write a characteristic value into the BLE database to operating the peripheral device. That's a practical function in BLE device development. There are an ios APP named LightBlue, I referred its function to add above functions. Actually, that's another reason why I develop this app, I can't found any available APP in android platform.

4 Source Code

https://github.com/suzp1984/Light_BLE
How to compile it? please refer the android studio's document, I guess you just need to import the source code into Android Studio, It should work.

Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp