Learning BLE from Scratch: Controlling Devices

Previously, we introduced the process of discovering services and characteristics. Today, let’s take a look at what happens next.In the software, we click to control the light to turn it on and off. The data sent by the host is as follows:Learning BLE from Scratch: Controlling DevicesCaptured dataLearning BLE from Scratch: Controlling DevicesOperation codeOperation code 0x12: write request.Learning BLE from Scratch: Controlling DevicesWrite requestWriting the value 0x0001 to the attribute with handle 0x000eLearning BLE from Scratch: Controlling DevicesWrite responseLearning BLE from Scratch: Controlling DevicesThrough this operation, we achieved control over the LED light’s on and off states.How this characteristic is related to the LED light is the custom part.This concludes the article. Whether it is simple or not depends on the foundational knowledge acquired earlier.

Leave a Comment