Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current anytone-branch writes garbled user DB to radio (config is ok again!) #328

Closed
allesand opened this issue Apr 18, 2023 · 13 comments
Closed
Assignees
Labels
AT-D868UV Affects Anytone AT-D868UV devices bug Something isn't working

Comments

@allesand
Copy link

Just tested with my 868 with firmware 2.40: read the config from the radio and wrote it back without making any changes, 868 starts with "Program Error / Please Initialize The Radio! / Confirm" - then I am presented with the "Calibrate Date" screen as expected. What can I provide to debug that? Must have been introduced in the last weeks, the branch used to work.

No unexpected debug output:
Debug in lib/usbdevice.cc@247: Check if serial port ttyACM3 still exisist and has VID:PID 28e9:18a.
Debug in lib/usbdevice.cc@247: Check if serial port ttyACM3 still exisist and has VID:PID 28e9:18a.
Debug in lib/radio.cc@56: Try to detect radio at Serial interface 'ttyACM3'.
Debug in lib/usbserial.cc@90: Try to open Serial interface 'ttyACM3'.
Debug in lib/usbserial.cc@124: Opened serial port ttyACM3 with 115200baud.
Debug in lib/anytone_interface.cc@307: Anytone: In program-mode now.
Debug in lib/anytone_interface.cc@336: Found radio 'D868UVE', version 'V102'.
Debug in lib/anytone_interface.cc@356: Anytone: Left program-mode.
Debug in lib/usbserial.cc@155: Serial port will close now.
Debug in src/application.cc@736: Write complete.

Will test with my 878 when I have a working second radio again, hold on.. :-)

@allesand
Copy link
Author

If of any help: when writing the user db with the current anytone-branch to the 868 - which is working without problems! - there is the following output incl. three "FATAL":

Debug in lib/radio.cc@56: Try to detect radio at Serial interface 'ttyACM3'.
Debug in lib/usbserial.cc@90: Try to open Serial interface 'ttyACM3'.
Debug in lib/usbserial.cc@124: Opened serial port ttyACM3 with 115200baud.
Debug in lib/anytone_interface.cc@307: Anytone: In program-mode now.
Debug in lib/anytone_interface.cc@336: Found radio 'D868UVE', version 'V102'.
Debug in src/application.cc@680: Sort call-signs closest to ID=1234567.
FATAL in lib/dfufile.cc@665: Cannot resolve offset 4fd86a0h.
FATAL in lib/dfufile.cc@665: Cannot resolve offset 54986a0h.
FATAL in lib/dfufile.cc@665: Cannot resolve offset 5bd86a0h.
Debug in src/application.cc@708: Start call-sign DB write...
Debug in lib/anytone_interface.cc@356: Anytone: Left program-mode.
Debug in lib/usbserial.cc@155: Serial port will close now.
Debug in src/application.cc@736: Write complete.

Will try later with the 878, no recent CPS backup..

@allesand
Copy link
Author

This actually should be in #298 should it? Is there a way to join the two issues or close here and add there? Sorry about that..

@hmatuschek hmatuschek added bug Something isn't working AT-D868UV Affects Anytone AT-D868UV devices labels Apr 19, 2023
@hmatuschek
Copy link
Owner

A separate issue is ok. The other one is purely for the extension module. Not bugs introduced with it. This one, however, will be hard to find. It would help to find the commit, that broke the 868.

@allesand
Copy link
Author

allesand commented Apr 20, 2023

I can confirm that my 878 running 3.01 shows the same result - reading the current config and writing it back gives the above error, so it is not a problem with the 868, as it affects both of my radios. I will try some older branch versions and report back if I found what breaks my config.

Here is the chronological record:

Ok, f84a8ad - Mar 11, 2023
loads the config to the radio just fine

Next b87b3c8 - Mar 13, 2023
Works - writes config to 878 all ok

Next one to test is 32ed33d - Mar 14, 2023
qdmr crashes on writing the config

Next 6a0ce99 - Mar 15, 2023
That is not working, qdmr does not crash, but writes invalid config data

So the last working version is from end of Mar 13 - I will try to zoom in on the commits between Mar 15 and Mar 13, but that is what I could determine for now.

@allesand
Copy link
Author

b87b3c8 - Mar 13, 2023- Works - writes config to 878 all ok

32ed33d - Mar 14, 2023 - qdmr crashes on writing the config

f8478ca - Mar 15, 2023 - does not build

b1f0c05 - Mar 15, 2023 - crashes on write

6a0ce99 - Mar 15, 2023 - qdmr does not crash, but writes invalid config data

@hmatuschek
Copy link
Owner

Ok, thanks. This helps a lot.

@allesand
Copy link
Author

allesand commented Apr 21, 2023

Results for every commit in the mentioned time frame (for those with changes in the code):

b87b3c8 - Mar 13, 2023 - works - writes config to 878 all ok

b8d5a07 - Mar 14, 2023 - works - writes config to 878 all ok

32ed33d - Mar 14, 2023 - crashes on write

f8478ca - Mar 15, 2023 - does not build

b1f0c05 - Mar 15, 2023 - crashes on write

0c8cf8b - Mar 15, 2023 - crashes on write

fac9819 - Mar 15, 2023 - writes invalid config

6a0ce99 - Mar 15, 2023 - writes invalid config

@allesand
Copy link
Author

allesand commented Apr 21, 2023

Ok, thanks. This helps a lot.

Sure,you are welcome. "Zoomed in" above, hope that helps to find out which change causes the invalid config. Both the 868 and the 878 are affected, running 2.40 and 3.01

@allesand
Copy link
Author

Side note: as of

c50d361

the user DB write worked very fine, but I just wrote the user DB with the current version of the anytone-branch and got "garbled" output in the user field - empty fields or just a letter or two. I will double-check again in the next days, with above versions everything looks good again.

@hmatuschek hmatuschek self-assigned this May 14, 2023
@hmatuschek
Copy link
Owner

Fixed in the anytone-settings-extension branch (where else). Turns out, the AnyTone devices do not like empty zones.

@allesand
Copy link
Author

Yes! Current anytone-settings-extension is writing a valid config again, thanks! But: the user DB is still broken, as noted in #328 (comment)

Changes between c50d361 and now broke the user DB write - after the 16->15 city which is working fine with c50d361 there must have been changes that broke it again, all garbled output right now.

@allesand allesand changed the title Current anytone-branch writes invalid config to radio Current anytone-branch writes garbled user DB to radio May 15, 2023
@allesand allesand changed the title Current anytone-branch writes garbled user DB to radio Current anytone-branch writes garbled user DB to radio (config is ok again!) May 15, 2023
@hmatuschek
Copy link
Owner

Ok, this was an offset issue in the index of the DB. Should be fixed now. However, I cannot test it right now.

@allesand
Copy link
Author

Fixed. Since both issues mentioned in this thread are closed now, issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AT-D868UV Affects Anytone AT-D868UV devices bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants