Closed ckuethe closed 1 year ago
I'm using an old firmware on my radiacode-101 which only supports 256 channels in spectrum:
>>> rc.fw_version()
'Boot version: 3.60 Apr 6 2021 15:32:24 | Target version: 3.1 Feb 16 2023 13:19:41\x00'
>>> len(rc.spectrum().counts)
256
1024 channels were added in 1.05.00 (Apr 27, 2023) - Firmware version 4.00, probably communication protocol was changed with the major firmware version bump.
My 3.1 firmware doesn't have a SpecFormatVersion
, but your 4.x firmware does.
>>> rc.configuration().find('SpecFormatVersion')
-1
Yeah, I figured there were some major changes both in the protocol and the hardware. I'm still trying to understand the protocol
I've understand the new spectrum protocol in firmware 4.x, it will be easy to make this library work with both firmware 3.x and 4.x - I will try to make fix soon.
Please check the latest release - v0.2.0, everything should works now
Thank you! That works!
Placeholder bug report while I investigate more thoroughly...
So I just got an RC-102, and it works to some extent:
I can read other things like events and rates:
Unfortunately reading the spectrum is quite unreliable. Sometimes it works:
I haven't looked at the counts-to-channels conversion yet but it seems like maybe there's some data missing? Like, if there is a 10-bit ADC which produces 1024 channels, then there should be more than 382 counts?
But most of the time I get short reads.
I did see the USB timeout mentioned in #7 while polling in a loop - that req/resp mismatch looks interesting - but was not able to clear it by naively poking stuff in the USB internals to reset it, clear stalls, etc. If I find a way to clear the timeout I'll post it there.
Other large reads seem to work though: