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

Anytone 878: channel 65536 not found. #41

Open
myzinsky opened this issue Oct 12, 2019 · 8 comments
Open

Anytone 878: channel 65536 not found. #41

myzinsky opened this issue Oct 12, 2019 · 8 comments

Comments

@myzinsky
Copy link

myzinsky commented Oct 12, 2019

When I want to write back the data for the device.conf file I get many errors of this type:

Zone 5a 'XYZ': channel 65536 not found.

Firmware is the newest: 1.15

@nicolasjon
Copy link

I have been able to reproduce this issue and have a provisional fix. Not sure if this project is still active to accept a PR?

@davebdb
Copy link

davebdb commented Jul 12, 2020

I am having this issue with the BTECH-6x2 now after upgrading the firmware to 2.03 which was just released. I see nothing wrong with the config file itself. I can download a codeplug and write the img file that was read, but cannot apply a .conf script to either the img or directly to the radio.
This all was working fine on the previous firmware (which I do not recall which it was as I never did upgrade it at the time and now just did), but current firmware 2.03 failes. I figure I drop this in here even though its the BTECH 6x2 but if I recall correctly it is similar structure.
The codeplug seems to download with all the correct information and I don't see any extra characters when looking at the file with cat -A to look for any special hidden characters.

Actually the few times I did get it to write, the radio reported the program was corrupt after writing and had to initialize it and start over.

@davebdb
Copy link

davebdb commented Jul 12, 2020

@nicolasjon I tried your branch, it did stop the errors on "compile" but when I pushed the codeplug to the radio it then after restart of the radio came up with
"Program Error Please Initialize The Radio! ... [Confirm]
So it seems that this firmware version out now for at least the BTECH-6x2 doesn't like something about that codeplug text. I can use the base image downloaded and reuploaded

$ ls -l
total 3192
-rw-r--r-- 1 root root 1606528 Jul 11 20:00 backup.img
-rw-r--r-- 1 root root 23931 Jul 11 19:10 device.conf
-rw-r--r-- 1 root root 1606528 Jul 11 20:49 device.img

Same filesizes, I wonder what is different:
$ diff backup.img device.img
Binary files backup.img and device.img differ

The only thing which I did do was apply the config to the img file.
$ sudo dmrconfig41 -c device.img device.conf
(the dmfconfig41 is the compiled version of dmrconfig for issue 41 here from your branch Nicolas)

So I'm comparing the hex between the versions of the images. I notice something common among the channel listing.

This is from the backup.img which is working as my "recovery" right now.
00000050: cf09 0000 0000 0000 0000 0000 ff00 0000 ................

this is from the same line on the device.img which crashes the radio and requires initialization to restart
00000050: cf09 0000 ffff 0000 0000 0000 ff00 0000 ................

Byte 55 and 56 seem to be ffff (65535 / 377) instead of 0000 (0 / 0). (decimal / octal). cmp gave me some interesting output as well showing the same discrepancies for all channels it seems.

This difference appears for a bunch of the channel area in the image file.

$ cmp -l backup.img device.img | wc -l
842

842 of these bytes are different and a lot of these ffff vs 0000 cases. I'm not much of a programmer, but I have done my fair share of hacking game files in hex back in the late 80s early 90s. I can probably sanitize my codeplug a bit to make it more generic with the common simplex frequencies and do the same test and paste those files. Would that help in trying to figure out what is happening here?

@nicolasjon
Copy link

I think DMR config may be changing other parts of the channel info. I did notice that things behaved slightly differently for images placed on the radio by the OEM software as opposed to DMRCONFIG.
Unfortunately the firmware and CPS keeps changing which also does not help.
Sadly it seems this project has been abandoned. As no response to emails or pull requests. Which is a great shame.
I am considering producing a fork at least for the 868/878 series as the work done so far is of high quality and is a great alternative to the OEM CPS which will only ever be Windows. Thoughts?

@davebdb
Copy link

davebdb commented Jul 13, 2020

I'll be willing to work with you on this. I started a question up on this, I wonder if we could somehow find out the template for the codeplug from them since they do offer the software free, why not opensource the format/template.
I do have some C experience, done a little work in Linux kernel code help many years back, but mostly an operations/security IT person vs programmer. I am willing to pick it backup on the side to help out with this project as the 6x2 is essentially a 868/878 but different brand. The firmware upgrade is what "broke" things though. Not sure if Anytone is planning to do a similar firmware upgrade for the 868/878 as BTECH did for the 6x2.

@fmarier
Copy link
Contributor

fmarier commented Sep 20, 2020

@nicolasjon If you do end up forking this project for the 868/878, please let me know (GitHub or [email protected]). I will point the Debian package to your repository.

@nandub
Copy link

nandub commented Sep 29, 2020

I get this error using version DMR Config, Version 1.1.240, Copyright (C) 2018 Serge Vakulenko KK6ABQ when I run dmrconfig -v device.conf, the bug seems to affect any Zones specified, but reading and writing a codeplug works fine on my DMR-6x2 (Firmware 2.02), I'm using a MacOS so I don't have a way of upgrading the firmware.

So far I upload only a custom_device.conf to my device, the only time I upload a device.img if I want to reset my device to a clean state.

Error Log:

dmrconfig -v device.conf

Serial port: /dev/cu.usbmodemFD1211
Connect to BTECH DMR-6x2.
Read configuration from file 'device.conf'.
Zone 1a 'Local Zone': channel 65536 not found.
Zone 1a 'Local Zone': channel 65536 not found.
Zone 1a 'Local Zone': channel 65536 not found.
Zone 1a 'Local Zone': channel 65536 not found.
Zone 1a 'Local Zone': channel 65536 not found.
...

Reading Log:

dmrconfig -r
Serial port: /dev/cu.usbmodemFD1211
Connect to BTECH DMR-6x2.
Read device: ##### done.
Close device.
Write codeplug to file 'device.img'.
Print configuration to file 'device.conf'.

Write Log:

dmrconfig -c device.conf
Serial port: /dev/cu.usbmodemFD1211
Connect to BTECH DMR-6x2.
Read device: ##### done.
Write codeplug to file 'backup.img'.
Read configuration from file 'device.conf'.
Total 15 channels, 3 zones, 3 scanlists, 15 contacts, 11 grouplists.
Write device: ##### done.
Close device.

@nandub
Copy link

nandub commented Sep 29, 2020

I suggest someone fork this project and apply some of these PRs, so far this is the only software I can use to program my device because I don't have any Windows handy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants