Hi! First of all, thanks to everyone contributing to this solution. The radon_reader script works great for me.
I got three RadonEye devices. Two are from 2022 – they are working fine. They get detected by the scanning function and the sensor data are transferred properly via MQTT.
I have a third device, probably from 2021 or earlier which I have an issue with though. It get’s detected by the scanning function, but then the script seems not to be able to connect to device and/or to retrieve the data. I do get the following output:
2022-08-25 20:28:27,094 - root - INFO - -a (mac address) and -t (device type 0|1 not specified, reverting to auto-scan)
2022-08-25 20:28:27,094 - root - DEBUG - Scanning for devices
2022-08-25 20:28:37,109 - root - DEBUG - Device name: FR:R20:SN0372
2022-08-25 20:28:37,109 - root - INFO - Found RD200 - x<2022 revision with address: xx:xx:xx:xx:xx:xx
2022-08-25 20:28:37,153 - root - DEBUG - Re-trying connections attempts: 1'
2022-08-25 20:28:41,916 - root - DEBUG - Re-trying connections attempts: 2'
2022-08-25 20:28:46,918 - root - DEBUG - Re-trying connections attempts: 3'
2022-08-25 20:28:51,917 - root - DEBUG - Re-trying connections attempts: 4'
2022-08-25 20:28:52,918 - root - DEBUG - Sending payload (byte): b'P' To handle (int): 11
Helper not started (did you call connect()?)
2022-08-25 20:28:52,919 - root - DEBUG - Failed, trying again (1)
...
FYI - I replaced the real MAC address with “xx:xx:xx:xx:xx:xx” in the snippet above.
If I run ‘bluetoothctl info’, I get the following output:
bluetoothctl info xx:xx:xx:xx:xx:xx
Device xx:xx:xx:xx:xx:xx (random)
Name: FR:R20:SN0372
Alias: FR:R20:SN0372
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Vendor specific (00001523-1212-efde-1523-785feabcd123)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
FYI - I ‘trusted’ and ‘paired’ the device with ‘bluetoothctl’, to see if this solves the problem. But it doesn’t work with both settings being “yes” or “no” for this device. The radon_reader script works well for the other two devices w/o either of them being trusted or paired.
Last but not least, I ran ‘gatttool’ to see if it returns anything, but it either returns an empty row or “Device or resource busy (16)”
echo $(timeout 5 gatttool -i hci0 -t public -b xx:xx:xx:xx:xx:xx --char-write-req --handle=0x002a --value=50 --mtu=507 --listen)
connect to xx:xx:xx:xx:xx:xx: Device or resource busy (16)
With the FTLabs App, I’m able to connect to the device and values show up as expected.
Does anyone have an idea how to debug this further? It might be an issue with the device or it is a new “version” of the device that doesn’t work with the current script. I’d be happy to update the GitHub repo to make it work also with this version, however I’m not a Bluetooth expert on the Linux terminal and could use some debugging support.
Thank you!