markqvist/rnodeconfigutil

Problem with firmware configuration

Closed this issue · 3 comments

M0IGA commented

Any attempt to write configuration shows... I included the whole process printed on the screen. Original one Rnode board.

~$ rnodeconf /dev/ttyUSB0 -T
[2022-04-30 11:32:50] Opening serial port /dev/ttyUSB0...
[2022-04-30 11:32:53] Device connected
[2022-04-30 11:32:53] Current firmware version: 1.27
[2022-04-30 11:32:53] Reading EEPROM...
[2022-04-30 11:32:53] EEPROM checksum correct
[2022-04-30 11:32:53] Device signature validated
[2022-04-30 11:32:53] Please input startup configuration:

Frequency in Hz: 4399125000
Bandwidth in Hz: 125000
TX Power in dBm: 17
Spreading factor: 9
Coding rate: 7

Traceback (most recent call last):
File "/usr/local/bin/rnodeconf", line 8, in sys.exit(main())
File "/home/agee/.local/lib/python3.9/site-packages/rnodeconf/rnodeconf.py", line 1926, in main rnode.initRadio()
File "/home/agee/.local/lib/python3.9/site-packages/rnodeconf/rnodeconf.py", line 477, in initRadio self.setFrequency()
File "/home/agee/.local/lib/python3.9/site-packages/rnodeconf/rnodeconf.py", line 489, in setFrequency data = KISS.escape(bytes([c1])+bytes([c2])+bytes([c3])+bytes([c4]))
ValueError: bytes must be in range(0, 256)

The board stays unconfigured.

Frequency in Hz: 4399125000

You have a zero too much in there, unless you have actually build an RNode for 4.3 GHz :)

In any case, I should probably add some kind of limit to the range that can be entered into the utility.

M0IGA commented

Hahaha sorry, there was no issue, my fault.

No worries ;) I'll leave this open though, so I remember to put in an error message if the frequency is totally out of bounds.