GL-Ble-SDK is developed and provided by GL-iNet Technology as a part of the iot solution. SDK encapsulates the operation interface of bluetooth modules from different manufacturers and provides users with bluetooth operation functions after abstraction. Users don't need to care what Bluetooth module they are using, just call the gl-ble-api in their application to control Bluetooth.
bletool is a cmd line tool for debug gl-ble module which bases on gl-ble-api. You can use it for quick controning and managing ble.
For information on how to use bletool, you can refer to the Bletool User Guide.
Before using the SDK, you need to install the Openwrt SDK environment.
Please set up the environment according to the following project documents:
https://github.com/gl-inet/sdk
$ git clone https://github.com/gl-inet/gl-ble-sdk.git
Place your package in openwrt-sdk/<version>/<target>/package/
, then run:
$ cd sdk/<version>/<target>/
$ make package/<package_name>/compile V=s
For example, to compile the ble SDK for the S1300
$ cd sdk/qsdk53/ipq806x/
$ make package/bletool/{clean,compile} V=s
If there is a problem with missing dependent libraries during compilation, follow these steps
$ ./scripts/feeds update -f
$ ./scripts/feeds install <dependency_name>
gl-ble-sdk
|
|- Doxyfile
|- LICENSE
|- Makefile
|- docs
|- src
| |
| |- bledriver # ble module driver
| |- components # sdk component
| |- example # example folder
| |- lib # gl-ble-api lib source code
| |- CMakeLists.txt
We provide a series of examples(src/example) to help users better understand and use the API.
bleScanner --------------------> A Ble scanner that can configure scan parameters
bleAdvertiser --------------------> A Ble advertiser with configurable parameters
bleService --------------------> A Ble server with configurable parameters
bleClient --------------------> A Ble client with configurable parameters
bletool --------------------> A tool that integrates all BLE API functions
We'll keep updating the example, so let us know if you have any good ideas :D
We will continue to update the online version of the API documentation.
Users can also use doxygen to generate documents locally.