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

Implement an optional more manual device/interface selection. #435

Closed hmatuschek closed 6 months ago

hmatuschek commented 6 months ago

As frequently requested and needed for some very cheap devices (DR-1801), a proper interface and device selection mechanism is needed. The majority of the work is already present.

There are a few things to be done:

DH1PK commented 6 months ago

Looking forward to testing this ;-) Thanks, Patrick

hmatuschek commented 6 months ago

Enabled device selection for DR-1801UV, also have a look at the settings dialog. There, you can disable the auto-detection, if you want to.

DH1PK commented 6 months ago

Hi! I built qdmr-435-implement-manual-device-interface-selection.

In settings I deactivated auto-detect. Then clicked "download codeplug".

Debug in src/application.cc@1001: Set icon theme to 'light'. Debug in src/application.cc@81: Search for translation in '/usr/local/share/locale/de_DE/LC_MESSAGES'. Debug in src/application.cc@81: Search for translation in '/usr/local/share/locale/de/LC_MESSAGES'. Debug in src/application.cc@84: Installed translator for locale 'de_DE'. Debug in src/repeaterbookcompleter.cc@328: Loaded repeater cache of 0 entries. Debug in lib/userdatabase.cc@132: Loaded user database with 259618 entries from /home/pk/.local/share/DM3MAT/qdmr/user.json. Debug in lib/talkgroupdatabase.cc@140: Loaded talk group database with 1675 entries from /home/pk/.local/share/DM3MAT/qdmr/talkgroups.json. serialnmea: No known GPS device found. Specify the COM port via QT_NMEA_SERIAL_PORT. Debug in src/application.cc@137: Last known position: Debug in src/application.cc@189: Create main window using icon theme 'light'. serialnmea: No known GPS device found. Specify the COM port via QT_NMEA_SERIAL_PORT. qt.positioning.geoclue2: Already stopped Debug in src/application.cc@554: Last device is invalid, search for new one. Debug in lib/usbserial.cc@118: Search for serial port with matching VID:PID 28e9:18a. Debug in lib/usbserial.cc@118: Search for serial port with matching VID:PID 1fc9:94. Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73. Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11. Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227. Debug in src/application.cc@558: No save device found, continue searching for unsave ones. Debug in lib/usbserial.cc@118: Search for serial port with matching VID:PID 28e9:18a. Debug in lib/usbserial.cc@118: Search for serial port with matching VID:PID 1fc9:94. Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73. Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11. Debug in lib/usbserial.cc@118: Search for serial port with matching VID:PID 67b:23a3. Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227. ERROR in src/application.cc@562: Kein passendes Gerät gefunden.

I see no way to select the tty or to select DR1801UV. Maybe I am looking in the wrong places? Should I select DR1801UV before pressing download? Or should I be asked after pressing download? And switching off auto-detection doesnt seem to change anything for me.

I tried two different cables, both with the same result. Both cables report: idVendor=1a86, idProduct=7523

And I found my second DR1801UV which has a working codeplug installed, no difference.

Maybe the zip-file is not yet updated? md5sum qdmr-435-implement-manual-device-interface-selection.zip 537806a85dc9b21566ef380c24a8a7c5 qdmr-435-implement-manual-device-interface-selection.zip

Regards, Patrick

hmatuschek commented 6 months ago

Opps, sorry my fault. Yes, I forgot to push the last changes. The interface and device selection dialog should appear, once you clicked download (also on detect and upload).

DH1PK commented 6 months ago

Hi! cloned the branch 435, compiled - and yes, I get the dialogue to pick the interface and trx. But the qdmr crashes while downloading:

Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73. Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11. Debug in lib/usbserial.cc@137: Search for serial ports. Debug in lib/usbserial.cc@143: Found ttyUSB1 (USB 1a86:7523). Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227. Debug in lib/usbdevice.cc@256: Check if serial port ttyUSB1 still exisist and has VID:PID 1a86:7523. Debug in lib/radio.cc@61: Try to detect radio at Serial interface 'ttyUSB1'. Debug in lib/usbserial.cc@28: Try to open Serial interface 'ttyUSB1'. Debug in lib/usbserial.cc@73: Opened serial port ttyUSB1 with 9600baud. Debug in lib/auctus_a6_interface.cc@23: Open interface to Auctus A6 based radio. Debug in lib/auctus_a6_interface.cc@90: Send aa06010403bb ERROR in lib/usbserial.cc@101: Serial port error: (12) Operation timed out. ERROR in lib/auctus_a6_interface.cc@173: QSerialPort: Operation timed out ERROR in lib/auctus_a6_interface.cc@114: Cannot read response 0h. ERROR in lib/auctus_a6_interface.cc@44: Cannot receive response. ERROR in lib/dr1801uv_interface.cc@352: Cannot enter programming mode. ERROR in lib/dr1801uv_interface.cc@85: Cannot connect to DR-1801UV. ERROR in lib/dr1801uv_interface.cc@129: Cannot read codeplug from device: Interface not in idle state. State=4. ERROR in lib/dr1801uv.cc@147: Cannot read codeplug from device. QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread Speicherzugriffsfehler (Speicherabzug geschrieben)

(trx is on and idle, cable is freshly plugged in)

Regards, Patrick

hmatuschek commented 6 months ago

Merged into devel.