Hello, masters, good evening. Today we will introduce a low power Bluetooth tool. Before that, let’s briefly introduce low power Bluetooth (BLE).
Here is the address | Welcome masters to star
https://github.com/nian-hua/Litchi
Bluetooth started supporting low power from version 4.0. During the interaction with BLE, the most important concepts are Characteristic, Descriptor, and Service:
Characteristic: It can be understood as a data type, which includes a value and zero or more descriptors (Descriptor) for this characteristic.
Descriptor: A description of the Characteristic, such as range, unit, etc.
Service: A collection of Characteristics, which can contain multiple Characteristics.
Key Point: A BLE terminal can contain multiple Services, a Service can contain multiple Characteristics, a Characteristic contains a value and multiple Descriptors, and a Descriptor contains a value (where Characteristic is relatively important and used more often).
Now let’s take a look at the image description.
The right image in the above figure is an instance of a BLE device. You can see that there are 4 services in the image, the first two are Unknown services, and the last two are Battery Service and Current Time Service. In the second Unknown service, there is an Unknown Characteristic. It is worth mentioning that Service and Characteristic each have a UUID for identification. In the related functions of the BluetoothGatt class, these UUIDs are used to find the required service and characteristic, which is equivalent to ports in TCP communication. Fat Monkey Laboratory
According to the article previously published by Fat Monkey Laboratory, we found the same bulb with an unauthorized control vulnerability. This bulb can be controlled by sending Bluetooth data directly without binding, as shown in the figure below:
Here we use litchi to scan nearby BLE devices, select services, Characteristics, and send data.
Of course, you can also specify Device, Service, and Characteristic when starting, and send data directly.
Everyone can use the -h command to view help.
Let’s take a look at the effect.
Welcome masters to star.
https://github.com/nian-hua/Litchi
Click me to leave a message.