android BLE Series:
android Bluetooth BLE (a) - Scan
android the BLE Bluetooth (II) - Communication
android Bluetooth BLE (three) - Broadcast
android Bluetooth BLE (Four) - Real
prologue
android ble series will be at the end of this chapter, the first three chapters of his own personal blog and official website read over and over again that he summarized hands-on demo of the final form of presentation and further consolidate master ble knowledge. The demo version of android imitation nRF to write, but relatively simple function complete, mainly related to: scanning , connecting communications , broadcasting , Gatt Service and a Bluetooth packet interpretation .
The demo comes to the knowledge of the full summarize described in the first three chapters, this chapter will not be described.
First, scan
Scan for nearby Bluetooth devices, tap to show the basic information that came with its broadcast.
Click on RAW, see the complete broadcast messages and message details.
Second, broadcasting
And broadcast connection operation performed after printing, the specific broadcast content code can be adjusted. Of course, you can also be used to scan the contents of the previous broadcast for viewing!
Want to find out the best communications and broadcasting also learn a Bluetooth packet, it sends a good grasp imitate ibeacon beacon data.
Third, the connection
Peripherals to be connected. After successful connection, description of the features and peripherals to perform read and write communicate ble.
Fourth, and finally
Finally, the two mobile phones may be mounted to Demo, a ble for broadcasting, a broadcast station connected to the mobile phone, and a read operation.
Source: pan.baidu.com/s/167I3wCDb... extraction code: 5a0a
Reproduced in: https: //juejin.im/post/5d08b07651882565e833fedb