$ bluetoothctl
[bluetooth] power on
$ python3 -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt
set MAC
in .env
file according to example in .env.example
MAC=AA:AA:AA:AA:AA:AA
python3 main.py
Cable Replacement Service - 0bd51666-e7cb-469b-8e4d-2742f1ba77cc
Cable Replacement Char. - e7add780-b042-4876-aae1-112855353cc1
Configuration Desc. - 00002902-0000-1000-8000-00805f9b34fb
- Write 1 byte
0x02
to Configuration Desc. (i guess this tells device to enable sending data via bluetooth) - Enable indicaitions for Cable Replacement Char.
- Every time you need to read data from the device, you have to write 14 bytes
0x12, 0x12, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
to Cable Replacement Char. - and wait for notification from Cable Replacement Char.
- Read the value you got, penultimate byte is a radiation value
apparently you are able to request data not more than 1 time in 30 seconds