Upload with mono or python / Fedora30

OH1KH
Posts: 14
Joined: Wed Dec 18, 2019 6:54 pm
Location: Pori, Finland
Contact:

Upload with mono or python / Fedora30

Post by OH1KH » Thu Dec 19, 2019 1:14 pm

Hi!
Just tried to upload OpenGD77_latest.sql with Fedora 30. No success yet, and bit confused what to choose.



With mono:
installed udev rules. How ever GD77 does not appear as any ttyACM so the rule can not work. This seems to be because of unbind fails:

Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: new full-speed USB device number 12 using ehci-pci
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: New USB device found, idVendor=15a2, idProduct=0073, bcdDevice= 0.02
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: Product: MCU MOUSE DEMO
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: Manufacturer: FREESCALE SEMICONDUCTOR INC.
Dec 19 14:55:27 hamtpad kernel: hid-generic 0003:15A2:0073.000B: hiddev97,hidraw4: USB HID v1.00 Device [FREESCALE SEMICONDUCTOR INC. MCU MOUSE DEMO] on usb-0000:00:1a.0-1.2/input0
Dec 19 14:55:27 hamtpad mtp-probe[18709]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 19 14:55:27 hamtpad mtp-probe[18709]: bus: 1, device: 12 was not an MTP device
Dec 19 14:55:27 hamtpad systemd-udevd[18722]: Process '/bin/bash -c 'ID=$(echo /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev1 | cut -d/ -f7); echo $ID > /sys/bus/usb/drivers/usbhid/unbind'' failed with exit code 1.
Dec 19 14:55:27 hamtpad mtp-probe[18729]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 19 14:55:27 hamtpad mtp-probe[18729]: bus: 1, device: 12 was not an MTP device

And so the FirmWareloader itself also fails:

[saku@hamtpad OpenGD77]$ mono GD77_FirmwareLoader.exe
Firmware file confirmed as SGL
.ERROR: Submit Async Read Failed.
Error read returned
Error sending command

Error while sending initial commands

With Python (either 2.7 or 3):

[saku@hamtpad OpenGD77]$ python3 gd-77_firmware_loader.py -f OpenGD77_latest.sgl
Now flashing your GD-77 with "OpenGD77_latest.sgl"
Firmware file confirmed as SGL
- Sending Download command
Traceback (most recent call last):
File "gd-77_firmware_loader.py", line 370, in <module>
main()
File "gd-77_firmware_loader.py", line 355, in main
if (sendInitialCommands(dev, encodeKey) == True):
File "gd-77_firmware_loader.py", line 215, in sendInitialCommands
if sendAndCheckResponse(dev, commands[commandNumber][0], commands[commandNumber][1]) == False:
File "gd-77_firmware_loader.py", line 75, in sendAndCheckResponse
ret = dev.write(USB_WRITE_ENDPOINT, cmd)
File "/home/saku/.local/lib/python3.7/site-packages/usb/core.py", line 948, in write
self.__get_timeout(timeout)
File "/home/saku/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 824, in bulk_write
timeout)
File "/home/saku/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 920, in __write
_check(retval)
File "/home/saku/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out


Now what to do?
Fix the udev and try with mono or try to dig out what is the problem with python?
What is the future of those two?

I have given up from Windoze in 1997 (Red Hat Linux 4.2) and after some years of crossover time now used linux in house nearly 20 years.
And there is no way back...

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Upload with mono or python / Fedora30

Post by F1RMB » Thu Dec 19, 2019 2:05 pm

HI,
OH1KH wrote:
Thu Dec 19, 2019 1:14 pm
Hi!
Just tried to upload OpenGD77_latest.sql with Fedora 30. No success yet, and bit confused what to choose.



With mono:
installed udev rules. How ever GD77 does not appear as any ttyACM so the rule can not work. This seems to be because of unbind fails:

Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: new full-speed USB device number 12 using ehci-pci
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: New USB device found, idVendor=15a2, idProduct=0073, bcdDevice= 0.02
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: Product: MCU MOUSE DEMO
Dec 19 14:55:27 hamtpad kernel: usb 1-1.2: Manufacturer: FREESCALE SEMICONDUCTOR INC.
Dec 19 14:55:27 hamtpad kernel: hid-generic 0003:15A2:0073.000B: hiddev97,hidraw4: USB HID v1.00 Device [FREESCALE SEMICONDUCTOR INC. MCU MOUSE DEMO] on usb-0000:00:1a.0-1.2/input0
Dec 19 14:55:27 hamtpad mtp-probe[18709]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 19 14:55:27 hamtpad mtp-probe[18709]: bus: 1, device: 12 was not an MTP device
Dec 19 14:55:27 hamtpad systemd-udevd[18722]: Process '/bin/bash -c 'ID=$(echo /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev1 | cut -d/ -f7); echo $ID > /sys/bus/usb/drivers/usbhid/unbind'' failed with exit code 1.
Dec 19 14:55:27 hamtpad mtp-probe[18729]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 19 14:55:27 hamtpad mtp-probe[18729]: bus: 1, device: 12 was not an MTP device

And so the FirmWareloader itself also fails:

[saku@hamtpad OpenGD77]$ mono GD77_FirmwareLoader.exe
Firmware file confirmed as SGL
.ERROR: Submit Async Read Failed.
Error read returned
Error sending command

Error while sending initial commands

With Python (either 2.7 or 3):

[saku@hamtpad OpenGD77]$ python3 gd-77_firmware_loader.py -f OpenGD77_latest.sgl
Now flashing your GD-77 with "OpenGD77_latest.sgl"
Firmware file confirmed as SGL
- Sending Download command
Traceback (most recent call last):
File "gd-77_firmware_loader.py", line 370, in <module>
main()
File "gd-77_firmware_loader.py", line 355, in main
if (sendInitialCommands(dev, encodeKey) == True):
File "gd-77_firmware_loader.py", line 215, in sendInitialCommands
if sendAndCheckResponse(dev, commands[commandNumber][0], commands[commandNumber][1]) == False:
File "gd-77_firmware_loader.py", line 75, in sendAndCheckResponse
ret = dev.write(USB_WRITE_ENDPOINT, cmd)
File "/home/saku/.local/lib/python3.7/site-packages/usb/core.py", line 948, in write
self.__get_timeout(timeout)
File "/home/saku/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 824, in bulk_write
timeout)
File "/home/saku/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 920, in __write
_check(retval)
File "/home/saku/.local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out


Now what to do?
Fix the udev and try with mono or try to dig out what is the problem with python?
What is the future of those two?

I have given up from Windoze in 1997 (Red Hat Linux 4.2) and after some years of crossover time now used linux in house nearly 20 years.
And there is no way back...
For Mono version, if there's problem with udev rule, of course that will faill afterward.
About python version, it look like a permission problem, Are you in the group plugdev, as udev rule set USB HID devices to that group (I don't have any Fedora here).

About udev rule file, can you show its content ?

Cheer.
---
Daniel

OH1KH
Posts: 14
Joined: Wed Dec 18, 2019 6:54 pm
Location: Pori, Finland
Contact:

Re: Upload with mono or python / Fedora30

Post by OH1KH » Thu Dec 19, 2019 2:46 pm

Hi!

No, I'm not member in plugdev. (never needed to be).
I did try with user account, sudo and even su - root. Always same python errors.

udev rule is direct copy from GD77_FirmwareLoader.zip here in chain [Testers Needed] GD-77 Firmware Loader for Linux and OS-X / page1

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Upload with mono or python / Fedora30

Post by F1RMB » Thu Dec 19, 2019 3:30 pm

Hi,

Okay for group. But you will need to match the group (whatever you choose, or Fedora policy), as user.

About udev rule, I will check that, because few files were shared there. Maybe I will ask you to make a small test.
Just to be sure, once your GD-77 is plugged to USB, and started with BLACK and BLUE keys pressed, can you give me the result of:

Code: Select all

ls /sys/bus/usb/drivers/usbhid
and the result after you unplugged you GD-77 from the USB port (or turn off the radio).


Cheers.

OH1KH
Posts: 14
Joined: Wed Dec 18, 2019 6:54 pm
Location: Pori, Finland
Contact:

Re: Upload with mono or python / Fedora30

Post by OH1KH » Fri Dec 20, 2019 3:51 am

Hi!

Without radio connected
[saku@hamtpad ~]$ ls /sys/bus/usb/drivers/usbhid
1-1.1.1:1.0 1-1.1.1:1.1 1-1.1.2:1.0 1-1.1.3:1.0 2-1.2.4:1.3 bind module new_id remove_id uevent unbind

With radio connected and then powered with black and blue buttons pressed (green led on, no display)
[saku@hamtpad ~]$ ls /sys/bus/usb/drivers/usbhid
1-1.1.1:1.0 1-1.1.2:1.0 1-1.2:1.0 bind new_id uevent
1-1.1.1:1.1 1-1.1.3:1.0 2-1.2.4:1.3 module remove_id unbind

sudo tail -n50 /var/log/messages

Dec 20 05:31:28 hamtpad kernel: usb 1-1.2: new full-speed USB device number 9 using ehci-pci
Dec 20 05:31:28 hamtpad kernel: usb 1-1.2: New USB device found, idVendor=15a2, idProduct=0073, bcdDevice= 0.02
Dec 20 05:31:28 hamtpad kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 20 05:31:28 hamtpad kernel: usb 1-1.2: Product: USB COMPOSITE DEVICE
Dec 20 05:31:28 hamtpad kernel: usb 1-1.2: Manufacturer: FREESCALE SEMICONDUCTOR INC.
Dec 20 05:31:28 hamtpad kernel: hid-generic 0003:15A2:0073.0006: hiddev97,hidraw4: USB HID v1.00 Device [FREESCALE SEMICONDUCTOR INC. USB COMPOSITE DEVICE] on usb-0000:00:1a.0-1.2/input0
Dec 20 05:31:28 hamtpad mtp-probe[4411]: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 20 05:31:28 hamtpad mtp-probe[4411]: bus: 1, device: 9 was not an MTP device
Dec 20 05:31:28 hamtpad systemd-udevd[4424]: Process '/bin/bash -c 'ID=$(echo /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev1 | cut -d/ -f7); echo $ID > /sys/bus/usb/drivers/usbhid/unbind'' failed with exit code 1.
Dec 20 05:31:28 hamtpad mtp-probe[4431]: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 20 05:31:28 hamtpad mtp-probe[4431]: bus: 1, device: 9 was not an MTP device

Then tested with bash line that udev rule uses:
[root@hamtpad ~]# ID=$(echo /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev1 | cut -d/ -f7); echo $ID
1-1.2
[root@hamtpad ~]# ID=$(echo /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev1 | cut -d/ -f7); echo $ID > /sys/bus/usb/drivers/usbhid/unbind
-bash: echo: kirjoitusvirhe: Laitetta ei ole (-> write error, no such device )


[root@hamtpad ~]# ls -l /sys/bus/usb/drivers/usbhid
yhteensä 0
lrwxrwxrwx. 1 root root 0 20.12. 05:30 1-1.1.1:1.0 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0
lrwxrwxrwx. 1 root root 0 20.12. 05:30 1-1.1.1:1.1 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.1
lrwxrwxrwx. 1 root root 0 20.12. 05:30 1-1.1.2:1.0 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0
lrwxrwxrwx. 1 root root 0 20.12. 05:30 1-1.1.3:1.0 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0
lrwxrwxrwx. 1 root root 0 20.12. 05:31 1-1.2:1.0 -> ../../../../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0
lrwxrwxrwx. 1 root root 0 20.12. 05:30 2-1.2.4:1.3 -> ../../../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4:1.3
--w-------. 1 root root 4096 20.12. 05:30 bind
lrwxrwxrwx. 1 root root 0 20.12. 05:30 module -> ../../../../module/usbhid
-rw-r--r--. 1 root root 4096 20.12. 05:30 new_id
-rw-r--r--. 1 root root 4096 20.12. 05:30 remove_id
--w-------. 1 root root 4096 20.12. 05:30 uevent
--w-------. 1 root root 4096 20.12. 05:31 unbind

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Upload with mono or python / Fedora30

Post by F1RMB » Fri Dec 20, 2019 3:53 am

Okay, I see you have an old (and quite buggy) udev rule file. Let me send you a (probably) working one (it works with my Linux Mint(s) and Raspbian).

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Upload with mono or python / Fedora30

Post by F1RMB » Fri Dec 20, 2019 4:01 am

Okay, try with this udev rule file (don't forget to add your user to plugdev group, or change the GROUP="plugdev" to make it match the group that Fedora uses).


Cheers.

EDIT: Just checked by hand, and the udev rule will also work on your system.

Cheers.
Attachments
99-gd77.rules.zip
(633 Bytes) Downloaded 224 times

OH1KH
Posts: 14
Joined: Wed Dec 18, 2019 6:54 pm
Location: Pori, Finland
Contact:

[SOLVED] Re: Upload with mono or python / Fedora30

Post by OH1KH » Fri Dec 20, 2019 10:02 am

Hi!
Thanks for trying but that does not work.
Fedora does not have group "plugdev". So no need to add myself to that group.

I spent a little more time for this issue now.
I have been using this: https://github.com/sergev/dmrconfig for writing codeplugs. It works perfectly for that purpose.
Perhaps it could be modified to upload firmware too?
There is a udev rule file "99-dmr.rules" that I allready had. [Why people always use 99, it could be something else around 90 to be run near the end ;) ]

# Baofeng RD-5R , TD-5R
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="666"

No "hid"-lines in rules at all !

Running with "mono" still does not work, but using python3 with script works!
I think it was my fault not starting GD77 with buttons pressed. That is not needed when loading codeplugs ( I think ... it has been very long time since I last modified one )


[saku@hamtpad OpenGD77]$ python3 gd-77_firmware_loader.py -f OpenGD77_latest.sgl
Now flashing your GD-77 with "OpenGD77_latest.sgl"
Firmware file confirmed as SGL
- Sending Download command
- Sending ACK
- Sending encryption key
- Sending F-PROG command
- Sending radio modem number
- Sending radio modem number 2
- Sending version
- Sending erase command
- Send post erase command
- Sending Program command
- Sending last block
Firmware update complete. Please reboot the GD-77

And it even rebooted after load !!

Also screen grabber works, but only with python 2


[saku@hamtpad OpenGD77]$ python3 gd-77_screen_grabber.py
Traceback (most recent call last):
File "gd-77_screen_grabber.py", line 38, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
[saku@hamtpad OpenGD77]$ python gd-77_screen_grabber.py
Save screen image:
- downloading from the GD-77...
- reading: 96%
- saving GD-77_screengrab-2019-12-20_11_50_30.png
Done.
GD-77_screengrab-2019-12-20_11_46_57.png
GD-77_screengrab-2019-12-20_11_46_57.png (1.2 KiB) Viewed 15764 times

Maybe documented somewhere (I must next read all documentation) it seems that after firmware update also GD77 usb identification changes:

Dec 20 11:45:01 hamtpad kernel: usb 1-1.2: new full-speed USB device number 13 using ehci-pci
Dec 20 11:45:01 hamtpad kernel: usb 1-1.2: New USB device found, idVendor=1fc9, idProduct=0094, bcdDevice= 1.01
Dec 20 11:45:01 hamtpad kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 20 11:45:02 hamtpad kernel: usb 1-1.2: Product: MCU VIRTUAL COM DEMO
Dec 20 11:45:02 hamtpad kernel: usb 1-1.2: Manufacturer: NXP SEMICONDUCTORS
Dec 20 11:45:02 hamtpad kernel: cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
Dec 20 11:45:02 hamtpad mtp-probe[9198]: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 20 11:45:02 hamtpad mtp-probe[9198]: bus: 1, device: 13 was not an MTP device
Dec 20 11:45:02 hamtpad mtp-probe[9213]: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 20 11:45:02 hamtpad mtp-probe[9213]: bus: 1, device: 13 was not an MTP device

I hope the dmrconfig codeplug uploader still works (I think my udev rules need a fix now )


Thanks for your help !

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: [SOLVED] Re: Upload with mono or python / Fedora30

Post by F1RMB » Fri Dec 20, 2019 4:12 pm

Hi,
OH1KH wrote:
Fri Dec 20, 2019 10:02 am
Hi!
Thanks for trying but that does not work.
Fedora does not have group "plugdev". So no need to add myself to that group.

I spent a little more time for this issue now.
I have been using this: https://github.com/sergev/dmrconfig for writing codeplugs. It works perfectly for that purpose.
Perhaps it could be modified to upload firmware too?
There is a udev rule file "99-dmr.rules" that I allready had. [Why people always use 99, it could be something else around 90 to be run near the end ;) ]

# Baofeng RD-5R , TD-5R
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="666"

No "hid"-lines in rules at all !

Running with "mono" still does not work, but using python3 with script works!
I think it was my fault not starting GD77 with buttons pressed. That is not needed when loading codeplugs ( I think ... it has been very long time since I last modified one )


[saku@hamtpad OpenGD77]$ python3 gd-77_firmware_loader.py -f OpenGD77_latest.sgl
Now flashing your GD-77 with "OpenGD77_latest.sgl"
Firmware file confirmed as SGL
- Sending Download command
- Sending ACK
- Sending encryption key
- Sending F-PROG command
- Sending radio modem number
- Sending radio modem number 2
- Sending version
- Sending erase command
- Send post erase command
- Sending Program command
- Sending last block
Firmware update complete. Please reboot the GD-77

And it even rebooted after load !!

Also screen grabber works, but only with python 2


[saku@hamtpad OpenGD77]$ python3 gd-77_screen_grabber.py
Traceback (most recent call last):
File "gd-77_screen_grabber.py", line 38, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
[saku@hamtpad OpenGD77]$ python gd-77_screen_grabber.py
Save screen image:
- downloading from the GD-77...
- reading: 96%
- saving GD-77_screengrab-2019-12-20_11_50_30.png
Done.

GD-77_screengrab-2019-12-20_11_46_57.png


Maybe documented somewhere (I must next read all documentation) it seems that after firmware update also GD77 usb identification changes:

Dec 20 11:45:01 hamtpad kernel: usb 1-1.2: new full-speed USB device number 13 using ehci-pci
Dec 20 11:45:01 hamtpad kernel: usb 1-1.2: New USB device found, idVendor=1fc9, idProduct=0094, bcdDevice= 1.01
Dec 20 11:45:01 hamtpad kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 20 11:45:02 hamtpad kernel: usb 1-1.2: Product: MCU VIRTUAL COM DEMO
Dec 20 11:45:02 hamtpad kernel: usb 1-1.2: Manufacturer: NXP SEMICONDUCTORS
Dec 20 11:45:02 hamtpad kernel: cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
Dec 20 11:45:02 hamtpad mtp-probe[9198]: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 20 11:45:02 hamtpad mtp-probe[9198]: bus: 1, device: 13 was not an MTP device
Dec 20 11:45:02 hamtpad mtp-probe[9213]: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Dec 20 11:45:02 hamtpad mtp-probe[9213]: bus: 1, device: 13 was not an MTP device

I hope the dmrconfig codeplug uploader still works (I think my udev rules need a fix now )


Thanks for your help !
I've done a quick search, and plugdev is an ubuntuism (everything belongs to root by default), you don't need that under Fedora.
Using 99 as priority is the way to go, because it's better to be sure to be the last handled one, that's why most people choose this priority level.

I don't know about Fedora, but on Ubuntu like distro, the kernel is quite pristine, and (currently 4.15.0), and all USB HID device get owned by usbhid driver. In bootloader mode (when you press BLACK and BLUE then turn the radio ON), you can access it (flash it) using USB HID mode only, and it will collide when claiming the interface (and fail on SetConfiguration() either).

About CPS (with OpenGD77 and CPS companion), it's accessed using a CDC ACM serial device (/dev/ttyACMx). So, except some read/right restrictions, that will work flawlessly.

About the Mono flash tool, which version are you using (you need the one I modified that uses LibUsbDotNet). I use it daily, flashing my GD-77 dozens of time everydays

About screengrabber and python3, as I wrote on the forum and in the python file itself, you need to have python-serial and/or python3-serial package installed (sorry, I don't know the Fedora RPM package name).

It would be great if you can share some informations about configuration and required dependencies to make it run under Fedora, that could be added to the forum topic and the ZIP files.

Cheers.
---
Daniel

OH1KH
Posts: 14
Joined: Wed Dec 18, 2019 6:54 pm
Location: Pori, Finland
Contact:

Re: Upload with mono or python / Fedora30

Post by OH1KH » Fri Dec 20, 2019 5:20 pm

Hi Daniel!

As python now works I can live with it.
The mono flash tool is copied from this thread's link with LibUsbDotNet.dll. I'm not sure is it the last version.
But as said python script will do...

It seems that my python (2.7.17) does have the serial module installed, but the python 3.7.5 needs it to be installed.
I do not use python at all (directly) both versions are results of loading some other package that needs python.

I have now tried to get CPS running as the dmrconfig program I have used is useless now with OpenGD77 firmware.
No luck so far. CPS does not found rig by itself and when trying to connect serial port via extras menu there are no ports at all.

How ever I have symlinked /dev/ttyACM0 to com1 at .wine/dosdevices but it seems that programming tool (.NET ?) for CPS does not use serial port in legacy way and so the traditional way wine offers does not work.

Perhaps making CPS to use TCP connection could help to have one "standard body" and then add OS depended TCP-2-serial modules to connect the rig.
Like Hamlib now offers one common high level command interface for large amounts of different rigs.

Post Reply