Being really alien to BLE Characteristic, Service UUIDs and all the other BT alphabet soup. I wanted to quickly wrap up a BLE “Hello World” to read some temperature data from my Silicon Labs X24G dev board below ..

… with a C++ temperature monitoring program running in the development board. As usual, I started sussing around Stack Overflow, Hackster.io, Medium and ended up using bluetoothctl to scan and connect to the remote BLE device from our Debian IMX8PLUS gateway.
[bluetooth] scan on # to locate BT/BLE devices (WIFI adaptor dependant)

Bingo!

[bluetooth] pair MAC of our chosen device i.e. the BLE dev board

[bluetooth] info MAC to list/check some of the properties of the BLE device

Now, time to “code”. Tried all kinds methods, testing with sockets etc and settled with Bleak Python library which I liked the available methods and well supported from Python 3.7 to 3.11! By total rock-stars!
As said, I have zero prior experience working with Bluetooth or worse, BLE. Therefore, I ‘kick-started’ my development with our “friendly assistant” ..

I was happily “advising” ChatGPT of errors that popped out, what methods I wanted to use and format of variables etc .. it learned quick along the way …

I could get use to this!!! OK … it was an interesting experience, the bot pumps out pretty efficient codes, well commented but it does “hallucinate” and uses non-existing methods, e.g. BleakClient.get_service which does not exist. It’s even well versed in asyncio chops which today still trips me up once a while.
Are we all going to lose out job? Nah .. the bot still needs someone to plug in the USB console cable, press the hardware reset button and of course power up and down my laptop. My job is safe for now …
Related posts
Latest posts
- Complete Step by Step : Image Classification with TensorFlow and CNN
- Voice recognition using Tensorflow Lite in nRFS52840 development board
- Tested Bard vs ChatGPT to write a Python script for MNIST digit prediction!
- Edge TPU vs CPU for OpenCV Object Detection on IMX8
- Tensorflow Lite CPU vs TPU. Take Two!