hmatuschek / qdmr

A GUI application for configuring and programming cheap DMR radios under Linux and MacOS X.
https://dm3mat.darc.de/qdmr/
GNU General Public License v3.0
216 stars 45 forks source link

anytone uv868 #90

Closed ZeroChaos- closed 3 years ago

ZeroChaos- commented 3 years ago

when I try to detect my anytone 868, the program says the radio doesn't respond. I realize such a thing is difficult to troubleshoot remotely, do you have any desire to do so? It would be great to support this extremely similar radio.

hmatuschek commented 3 years ago

To figure out what went wrong, can you send me some information. I guess that you are running some Linux.

1.) Does the radio show up in the list of USB devices? That is, can you see it when you run lsusb on the command line? 2.) Have you reloaded the udev rules. Normal users are not allowed to access USB devices directly. qdmr installs the udev rules it needs to access the device, but they must be loaded before running qdmr.

just call

$ sudo udevadm control --reload-rules

Whether or not the radio may work with qdmr, depends on the firmware version. Which fimrware version are you running?

hmatuschek commented 3 years ago

Please note, please first try to read the current code-plug from the device and check if it is ok before writing back to the device.

ZeroChaos- commented 3 years ago

From dmesg at plug in

[506002.347588] usb 1-1.1.4: new full-speed USB device number 11 using xhci_hcd
[506002.438930] usb 1-1.1.4: New USB device found, idVendor=28e9, idProduct=018a, bcdDevice= 1.00
[506002.438933] usb 1-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[506002.438934] usb 1-1.1.4: Product: GD32 Virtual ComPort in FS Mode
[506002.438936] usb 1-1.1.4: Manufacturer: GD32Microelectronics
[506002.438937] usb 1-1.1.4: SerialNumber: 000000010000
[506002.449567] cdc_acm 1-1.1.4:1.0: ttyACM0: USB ACM device

While I refuse to 666 things, you can see that my user is in the right group, and has rw permissions on the device

zero@theprophet ~ % ls -al /dev/ttyACM0 
crw-rw---- 1 root uucp 166, 0 Apr  6 12:46 /dev/ttyACM0
zero@theprophet ~ % id
uid=1000(zero) gid=100(users) groups=100(users),6(disk),10(wheel),11(floppy),14(uucp),18(audio),19(cdrom),27(video),48(docker),80(cdrw),85(usb),97(input),208(vboxusers),209(bumblebee),211(wireshark),217(kismet),221(android),238(plugdev),250(portage)

It shows in lsusb as well

Bus 001 Device 011: ID 28e9:018a GDMicroelectronics GD32 Virtual ComPort in FS Mode

Of course, after I gather all this debug info for you, when I go to replicate the problem it works perfectly :-P So um, thanks for the troubleshooting, and thanks for the great product too. I've added it to Gentoo (users can simply "emerge qdmr"), and all of my radio nerd friends are going to love having this available to them. I really appreciate you allowing me to talk to my radio without a windows VM.

ZeroChaos- commented 3 years ago

If you happen to need a place to hang out with a bunch of linux ham and sdr nerds, you would be most welcome to join us. https://discordapp.com/invite/JjPQhKy

hmatuschek commented 3 years ago

Thanks a lot for the invitation. However, I am still not sure if the uv868 is actually supported (I do not own one, so I cannot test it). For now, I treat it like a 878 and there might be some differences between these radios. Moreover, these radios are somewhat moving targets, if there is a firmware update, the radio may refuse to take the codeplug. So, if you can confirm that everything works with the uv868 for now, I would branch the codeplug implementation. To my knowledge, the uv868 is discontinued and there will likely be no firmware update for it. So the current 878 implementation will become the 868 implementation and the newer 878 will only implement any differences that may appear in future firmware updates.

ZeroChaos- commented 3 years ago

The recent firmware versions of the 868 is almost identical to the 878 except that the 868 does not support roaming or analog aprs

It can read the codeplug and update the userdb. My settings all appear correct, except for gibberish in place of the unsupported features. I haven't tried to write into the unsupported features yet, nor push a new codeplug (didn't need any changes). Happy to grab you whatever info you like.

hmatuschek commented 3 years ago

Ok, perfect. Do not write yet. If you like, you can download the binary code-plug from the device. Using the command line tool

$ dmrconfig read codeplug.dfu

Can you send me that file if it does not contain any sensitve data (best to dm3mat at darc dot de). I would like to verify that everything is at the place I expect it to be. If you want to have a look yourself, you can view the codeplug with

$ dmrconfig info codeplug.dfu | less

and compare it with the reverse engineering of @reald (https://github.com/reald/anytone-flash-tools/blob/master/at-d878uv_memory.md) his reverse engineering is more complete then mine and I am currently comparing his results with mine (https://dm3mat.darc.de/qdmr/libdmrconf/classD878UVCodeplug.html).

hmatuschek commented 3 years ago

I'll open a new issue #91, to outline the d868uv codeplug implementation.

ZeroChaos- commented 3 years ago

I have sent the requested file