marcelm / radonwave

Read radon levels from Airthings Wave
MIT License
26 stars 8 forks source link

Service not found #6

Open teald4347 opened 3 years ago

teald4347 commented 3 years ago

I recently purchased an AirThings Wave mini and can connect to it with my phone, and some of the temperature & humidity Python scripts that I've found on Github. However, using radonwave.py (https://github.com/marcelm/radonwave/blob/master/radonwave.py) I get "service not found": Bluetooth error: Service b42e1f6e-ade7-11e4-89d3-123b93f75cba not found I'm thinking that the UUID specified (on line 41) has changed over the years since the code was posted by Marcel. Any ideas about what the UUID should be?

Regards, Dave T

marcelm commented 3 years ago

The code in the radonwave.py script has only been tested on the "regular" AirThings Wave. I know that it doesn’t work for the AirThings Wave Plus (see issue #4) because the way in which one needs to talk to the device has changed a lot.

I do not have access to the Wave mini and no one has contributed a patch to make it work so far (but perhaps you find some code somewhere else). If it is similar to the regular Wave, it should be possible to get it to work with just a couple of changes to the source code (changing the UUID and leaving out the sensors that the mini doesn’t support). If it is similar to the Plus, it’s harder.

You may want to have a look at the Notes, where I describe how I found out the necessary UUIDs. You could try it yourself by connecting to the mini using the nRF connect app.

teald4347 commented 3 years ago

Thanks for that feedback Marcel. It is very much appreciated!

I decided to do a little more investigating and I removed the "if False" on line 32 and got these services and characteristics back from the unit using your code:

$ python3 radonwave.py 18:04:ED:61:D4:74 Services Service Service Service Service Service Characteristics 3 00002a00-0000-1000-8000-00805f9b34fb READ 5 00002a01-0000-1000-8000-00805f9b34fb READ 7 00002a04-0000-1000-8000-00805f9b34fb READ 10 00002a05-0000-1000-8000-00805f9b34fb INDICATE 14 b42e3b98-ade7-11e4-89d3-123b93f75cba READ 18 b42e3ef4-ade7-11e4-89d3-123b93f75cba WRITE NO RESPONSE WRITE INDICATE 22 b42e41c4-ade7-11e4-89d3-123b93f75cba NOTIFY 27 f000ffc1-0451-4000-b000-000000000000 WRITE NO RESPONSE WRITE NOTIFY 31 f000ffc2-0451-4000-b000-000000000000 WRITE NO RESPONSE WRITE NOTIFY 35 f000ffc5-0451-4000-b000-000000000000 WRITE NO RESPONSE NOTIFY 40 00002a23-0000-1000-8000-00805f9b34fb READ 42 00002a24-0000-1000-8000-00805f9b34fb READ 44 00002a25-0000-1000-8000-00805f9b34fb READ 46 00002a26-0000-1000-8000-00805f9b34fb READ 48 00002a27-0000-1000-8000-00805f9b34fb READ 50 00002a29-0000-1000-8000-00805f9b34fb READ Bluetooth error: Service b42e1f6e-ade7-11e4-89d3-123b93f75cba not found

I'll use nRF Connect to poke around some more and see what else I can find. Regards, Dave T