Giter VIP home page Giter VIP logo

Comments (30)

zelig2 avatar zelig2 commented on August 20, 2024

Did you run trust 44:17:XX.... in the bluetoothctl command?

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

Hi!
Thanks for your answer. I've done it right now. But still the same issue.

bluetoothctl trust 44:17:XX:XX:XX:XX
[CHG] Device 44:17:XX:XX:XX:XX Trusted: yes
Changing 44:17:XX:XX:XX:XX trust succeeded
:# ls
radon_reader.py
:
# python radon_reader.py -a 44:17:XX:XX:XX:XX -v
Connecting...
Failed to connect to peripheral 44:17:XX:XX:XX:XX, addr type: random
Failed, trying again (1)...
Connecting...
Failed to connect to peripheral 44:17:XX:XX:XX:XX, addr type: random
Failed, trying again (2)...
Connecting...

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

Hi,

I'm facing the same issue on RD200 (Firmware 2.0.2)
$ bluetoothctl trust E8:31:XX:XX:XX:XX
Changing E8:31:XX:XX:XX:XX trust succeeded

$ bluetoothctl connect E8:31:XX:XX:XX:XX
Attempting to connect to E8:31:XX:XX:XX:XX
[CHG] Device E8:31:XX:XX:XX:XX Connected: yes
Connection successful
--> bluetooth symbol on RD200s display is on. So it seems to work.

But when running the script it fails to connect.

from radonreader.

dicer avatar dicer commented on August 20, 2024

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

Hi dicer,

  • python version 3.9.2
  • bluepy version 1.3.0

It's running on a raspberry pi 3B, if this means something.

EDIT: I've installed additionally python 2.7. Same behaviour:

$ python2.7 radon_reader.py -a E8:31:XX:XX:XX:XX -v
Connecting...
Failed to connect to peripheral E8:31:XX:XX:XX:XX, addr type: random
Failed, trying again (1)...
Connecting...
Failed to connect to peripheral E8:31:XX:XX:XX:XX, addr type: random
Failed, trying again (2)...
Connecting...

from radonreader.

dicer avatar dicer commented on August 20, 2024

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

Thanks for taking a look on this. Yesterday I edited my last post. I've tried python 2.7.18 too, sadly with the same result.

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

The smartphone app shows firmware version 2.0.2. Which version do you have?

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

I also still have the same problem. Also tried with python 2.7 and 3.7. Any ideas?

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

It seems that something has changed in the device.

  1. I removed "random" in the line DevBT = btle.Peripheral(args.address). after that the script connects to the radoneye
  2. I changed the uuids to 00001523-0000-1000-8000-00805f9b34fb, 00001524-0000-1000-8000-00805f9b34fb and 00001525-0000-1000-8000-00805f9b34fb. After that the script does something...
    But the result is always 0 so there needs something to be changed, maybe the \x50 is wrong?

from radonreader.

dicer avatar dicer commented on August 20, 2024

The smartphone app shows firmware version 2.0.2. Which version do you have?

I don't use the app, but 1.2.4 is showing when the device boots up.
I guess that fits with what @AdminGithubAxiansAT found out. No idea what needs to be changed though. One of you could dump the BLE traffic the official app generates and have a look there. I guess some other IDs or commands might be needed?

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

I have the app but can‘t find the version.
how can I do the ble traffic dump from the app?

from radonreader.

dicer avatar dicer commented on August 20, 2024

Android can write all bluetooth packets to a file if you have the developer settings enabled. It's called "Enable Bluetooth HCI snoop log" on my device. The resulting file can be analyzed in wireshark afterwards.

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

I have the app but can‘t find the version.

If you connect with the RadonEye App the firmware version is shown at the bottom screen as 'F/W: V2.0.2'.

I'm also able to find out the same UUIDS 00001523-0000-1000-8000-00805f9b34fb, 00001524-0000-1000-8000-00805f9b34fb and 00001525-0000-1000-8000-00805f9b34fb with the help of nRF Connect app.

I've loaded the bluetooth log to wireshark and can see, that there are connections between smartphone and RadonEye (both as source and destination). But I've no idea how to step further. How to read out the lots of information wireshark offers?

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

I have only ios devices, no android. Seems that there is no app to trace that with ios. Is it possible that you upload the trace?

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

btsnoop_hci_20220816.log

I've uploaded the trace. I filtered only the traffic between smartphone and RadonEye and could export it without IP or mac addresses. Wireshark shows the smartphone as localhost and the RadonEye as remote. Do you know how to read this log?

from radonreader.

grahamck avatar grahamck commented on August 20, 2024

This used to work for me - my pi died about a month ago and i just got around to re-installing it and I have this same issue. Tried it with 2.7 and now with the 3.9 with the one line code fix. bluetooothctl trusts and connects - the only difference i see might be this org.bluez error?

/home/grahamk/radon $ bluetoothctl connect F4:9F:38:88:88:6E
Attempting to connect to F4:9F:38:88:88:6E
[CHG] Device F4:9F:38:88:88:6E Connected: yes
Failed to connect: org.bluez.Error.Failed

from radonreader.

Tofnet avatar Tofnet commented on August 20, 2024

I have the same problem.
When testing with Bluetooth LE Explorer (Windows app) with Firmware 2.0.1 :
As AdminGithubAxiansAT says, the UUIDs have changed to 0000152*-0000-1000-8000-00805f9b34fb
The value to write to get the measurement seems to be again 0x50.
However, the reading gives a result which does not seem to be IEEE 754 anymore.
Some correspondences that I do not decode... except 0x50>Request function ; 0x0A>Data length
pCi/l | Bytes read
1.30 | 50-0A-30-00-44-00-00-00-04-00-06-00
1.35 | 50-0A-32-00-44-00-00-00-00-00-06-00
1.41 | 50-0A-34-00-44-00-00-00-00-00-0C-00
1.51 | 50-0A-38-00-44-00-00-00-04-00-08-00
1.65 | 50-0A-3D-00-44-00-00-00-02-00-09-00
1.86 | 50-0A-45-00-40-00-00-00-02-00-08-00
2.14 | 50-0A-4F-00-40-00-00-00-05-00-05-00
2.92 | 50-0A-6C-00-40-00-00-00-08-00-09-00
3.24 | 50-0A-78-00-40-00-00-00-04-00-0D-00

from radonreader.

dicer avatar dicer commented on August 20, 2024

from radonreader.

Tofnet avatar Tofnet commented on August 20, 2024

Of course, it's in my not very clear table just above.
1.30 pCi/l displayed with trame 50-0A-30-00-44-00-00-00-04-00-06-00
For the test I use the unit pCi/l rather than Bq/m3 to avoid dividing my displayed value by 37.
Here 1.30 in IEEE 754 = 0x3FA66666 in big-endian. These bytes aren't in my result.

from radonreader.

Tofnet avatar Tofnet commented on August 20, 2024

Well it's actually quite simple, the first word in payload (byte 3 and 4) contains the measurement directly in Bq/m3 written in Little-Endian order.
69 | 50-0A-45-00-81-00-00-00-04-00-05-00
72 | 50-0A-48-00-81-00-00-00-01-00-08-00
87 | 50-0A-57-00-81-00-00-00-04-00-0D-00
258 | 50-0A-02-01-81-00-00-00-19-00-1C-00
Now we have to find the firmware version so that the program can work with both.

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

Thanks a lot, Tofnet! With the help of nRF Connect app I can read out the value in Bq/m³. But why radon_reader.py reads zero Bq/m³ at UUID 00001525-0000-1000-8000-00805f9b34fb?

uuidRead  = btle.UUID("00001525-0000-1000-8000-00805f9b34fb")
RadonEyeValue = RadonEyeService.getCharacteristics(uuidRead)[0]
RadonValue = RadonEyeValue.read()
print (RadonValue)

Output:
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

Hi!
Can someone help me what I have to change now? I changed the uuids but I always get \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 as result

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

When I write the handle I get the current value back
[LE]> char-write-req 0x002a 50
Characteristic value was written successfully
Notification handle = 0x002c value: 50 0a 7d 00 6e 00 00 00 0b 00 1a 00

and then, if I reade the handle the information is gone
[LE]> char-read-hnd 0x002c
Characteristic value/descriptor: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

it seems that this is the problem, why the script has no output
Maybe the new firmware is using a kind of notification?

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

Yes, I guess the same. So I experiment with this code example: https://ianharvey.github.io/bluepy-doc/notifications.html#notifications

However, I lack the knowledge and experience :-(

from radonreader.

Tofnet avatar Tofnet commented on August 20, 2024

Hi,
I have just successfully tested this fork:
EtoTen radonreader

from radonreader.

Loretomes avatar Loretomes commented on August 20, 2024

Hi Tofnet,
glad you found this. Thanks, it works.

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

Thanks Tofnet for sharing this link!
But I get an error --> ModuleNotFoundError: No module named 'radon_reader_by_handle'. Did someone also had this message? Where can I find this module?

from radonreader.

AdminGithubAxiansAT avatar AdminGithubAxiansAT commented on August 20, 2024

sorry my fault. Its in the git...
Thanks again for the link!

from radonreader.

Ndolam avatar Ndolam commented on August 20, 2024

Hi, I have a device which reports
FR:GL05RE000997
which is not matched by EtoTen's scanning code.

If I explicitly give the addr with -a, and try -t 0 or -t 1, it doesn't work,
with messages as follows:

2023-07-02 10:34:52,380 - root - DEBUG - Re-trying connections attempts: 1'
2023-07-02 10:35:35,388 - root - DEBUG - Re-trying connections attempts: 2'
2023-07-02 10:36:18,396 - root - DEBUG - Re-trying connections attempts: 3'
2023-07-02 10:37:01,406 - root - DEBUG - Re-trying connections attempts: 4'
2023-07-02 10:37:02,408 - root - DEBUG - Sending payload (byte): b'P' To handle (int): 42
Helper not started (did you call connect()?)

Any thoughts? Is this Yet Another hardware version which needs some more code?

Thanks.

from radonreader.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.