Closed slimpdev closed 10 months ago
Can't reproduce on Ubuntu 22.04 x86_64, kernel 6.5.6, RC-102 fw 4.0.8, and this module v0.2.2
My OS 6.1.0-rpi6-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.58-1+rpt2 (2023-10-27) aarch64 And log when i try use bluetooth connect:
python3 -m radiacode-examples.webserver --bluetooth-mac 52:43:06:50:00:6F
will use Bluetooth connection
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<process() done, defined at /home/SlimpDev/.local/lib/python3.11/site-packages/radiacode-examples/webserver.py:48> exception=Exception('seq jump, expect:58, got:46')>
Traceback (most recent call last):
File "/home/SlimpDev/.local/lib/python3.11/site-packages/radiacode-examples/webserver.py", line 52, in process
databuf = app.rc_conn.data_buf()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/SlimpDev/.local/lib/python3.11/site-packages/radiacode/radiacode.py", line 133, in data_buf
return decode_VS_DATA_BUF(r, self._base_time)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/SlimpDev/.local/lib/python3.11/site-packages/radiacode/decoders/databuf.py", line 18, in decode_VS_DATA_BUF
raise Exception(f'seq jump, expect:{next_seq}, got:{seq}')
Exception: seq jump, expect:58, got:46
======== Running on http://0.0.0.0:8080 ========
Server was started, but no data updates.
I can confirm the bug after upgrading to the new firmware - looks like authors break the compatibility and replace some message types, I will take a look to it and new version of radiacode library will be released, compatible with new firmware.
Try v0.3.0 - it's compatible only with new firmware (for older FW you can use v0.2.x) radiacode API is also slightly changed (see git diff in examples/) to reflect changes in API of the new firmware
I've got another detector on the way, so I can revert one of them to 4.07 and maybe find a way to keep support for older firmwares too.
At least over USB, v0.2.2 is able to poll the version from fw4.07 and fw4.08.
I don't think it's reasonable to support old firmware in the v0.3.x. Of course, it's possible, but it will add unnecessary complexity and make the code less clean. Anyone who can't upgrade to the new firmware can continue using 0.2.x versions.
That's the reason why I changed the API of this radiacode package and didn't try to split RealTimeData into existing CountRate & DoseRate types, just to avoid breaking compatibility at any cost.
I can confirm that data transfer is now working on the new firmware. Thank you. P.S. Now I will think how to update mqttpub.py so that it would also work with the new firmware.
Hello.
After update FW of Device when i start "sudo python3 -m radiacode-examples.basic" i see error:
Bluetooth connect not worked too. Try on other RPi with same error. FW number 04.08 Any ideas how to fix it?