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
223 stars 46 forks source link

Add support for Alinco DJ-MD5(XT) #201

Open AbortRetryFail opened 2 years ago

AbortRetryFail commented 2 years ago

Yes, another New Device issue!

This radio looks similar to the AnyTone 878UV and friends. http://members.optuszoo.com.au/jason.reilly1/868mods.htm#MD5similarities Right now qdmr detects it as an unsupported AnyTone model, then crashes. Here's the output from my box:

Debug in application.cc@390: Last device is invalid, search for new one.
Debug in usbserial.cc@162: Search for serial port with matching VID:PID 28e9:18a.
Debug in usbserial.cc@169: Found ttyACM0 (USB 28e9:18a).
Debug in usbserial.cc@162: Search for serial port with matching VID:PID 1fc9:94.
Debug in hid_libusb.cc@162: Search for HID interfaces matching VID:PID 15a2:73.
Debug in dfu_libusb.cc@196: Search for DFU devices matching VID:PID 483:df11.
Debug in usbdevice.cc@242: Check if serial port ttyACM0 still exisist and has VID:PID 28e9:18a.
Debug in radio.cc@389: Try to detect radio at Serial interface 'ttyACM0'.
Debug in usbserial.cc@90: Try to open Serial interface 'ttyACM0'.
Debug in usbserial.cc@124: Openend serial port ttyACM0 with 115200baud.
Debug in anytone_interface.cc@326: Anytone: In program-mode now.
Debug in anytone_interface.cc@355: Found radio 'DJMD5X', version 'V100'.
ERROR in anytone_interface.cc@176: Unsupported AnyTone radio 'DJMD5X'.
Debug in anytone_interface.cc@375: Anytone: Left program-mode.
Debug in usbserial.cc@155: Serial port will close now.
Segmentation fault (core dumped)

From what I've read in other issues it looks like USB captures might be needed, so I'll have to see about setting up a Windows box with Wireshark and all that...

hmatuschek commented 2 years ago

I will likely need a capture to figure out how the device identifies itself to the CPS. Once I've got that, I can use an emulator to check for any differences between the codeplugs of the D878UV and DJ-MD5. The latter takes a long time as there are a huge amount of settings in these devices.

hmatuschek commented 2 years ago

A similar undertaking is currently on the way concerning the AT-D578UVIII (see #196) by @BoomerET.

AbortRetryFail commented 2 years ago

I've got a capture of a sample codeplug being sent to the radio then being retrieved. Want me to send it someplace? My C++ is terrible, but I'll be happy to try whatever test code on my radio and see what happens. :)

hmatuschek commented 2 years ago

Thanks, just attach it to a comment here if there is nothing secret in the codeplug. Otherwise send it per mail to me.

AbortRetryFail commented 2 years ago

Test_DJMD5XT.zip Here's the test codeplug I used and the resulting USB capture. Sorry about the delay.

hmatuschek commented 2 years ago

Ok, thanks for the capture. With this, I was able to update the emulation script and the CPS now happily writes to it. I'll implement the DJ-MD5X support in the djmd5x branch. There you can also find the emulator (under doc/reveng/alinco/jd-md5x/). This will take some time as there are a huge amount of setting for these devices and I have to check every one of them. Once I know all differences between the the DJ-MD5X and the D878UV, I can implement the support easily.

So, if you want to speedup things, feel free to reverse engineer the codeplug yourself. The documentation of the D878UV codeplug can be found under https://dm3mat.darc.de/qdmr/libdmrconf/classD878UVCodeplug.html. You may also get in contact with @BoomerET, he is working on a similar device, the AT-D578UVIII.

allesand commented 1 year ago

Also mentioned in " Offering Captures for Alinco DJ-MD5 & Radioddity GD-73A #371 "

https://github.com/hmatuschek/qdmr/discussions/371