Page 1 of 2
python gd-77_firmware_loader mods for mac
Posted: Sat Apr 11, 2020 8:16 am
by OH1E
As MacOSX cannot use usblib, it need use hidapi library instead, is there any easy way to do this modification?
source
https://stackoverflow.com/questions/257 ... r-mac-os-x
import hid
hidraw = hid.device(0x15a2, 0x1010)
hidraw.open(0x15a2, 0x1010)
hidraw.send_feature_report([0x00, 0x00, 0x00,0x00,0x00,0x00,0x00,0x00])
something like this..
Re: python gd-77_firmware_loader mods for mac
Posted: Sat Apr 11, 2020 8:48 am
by F1RMB
Hi,
Riku wrote: ↑Sat Apr 11, 2020 8:16 am
As MacOSX cannot use usblib, it need use hidapi library instead, is there any easy way to do this modification?
source
https://stackoverflow.com/questions/257 ... r-mac-os-x
import hid
hidraw = hid.device(0x15a2, 0x1010)
hidraw.open(0x15a2, 0x1010)
hidraw.send_feature_report([0x00, 0x00, 0x00,0x00,0x00,0x00,0x00,0x00])
something like this..
Looking at this, it seems there are few solutions, like hid from PyPI, cython-hidapi, etc.
Which one is the easiest to install on OS X ?
Cheers.
---
Daniel
Re: python gd-77_firmware_loader mods for mac
Posted: Sat Apr 11, 2020 12:30 pm
by OH1E
hidapi went with pip on osx.
according this:
https://github.com/signal11/hidapi it is compatible with other os aswell windows linux
% pip install hidapi
Collecting hidapi
Downloading hidapi-0.9.0.post2.tar.gz (55 kB)
|████████████████████████████████| 55 kB 755 kB/s
Requirement already satisfied: setuptools>=19.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from hidapi) (41.2.0)
Installing collected packages: hidapi
Running setup.py install for hidapi ... done
Successfully installed hidapi-0.9.0.post2
Re: python gd-77_firmware_loader mods for mac
Posted: Sat Apr 11, 2020 1:08 pm
by F1RMB
Riku wrote: ↑Sat Apr 11, 2020 12:30 pm
hidapi went with pip on osx.
according this:
https://github.com/signal11/hidapi it is compatible with other os aswell windows linux
% pip install hidapi
Collecting hidapi
Downloading hidapi-0.9.0.post2.tar.gz (55 kB)
|████████████████████████████████| 55 kB 755 kB/s
Requirement already satisfied: setuptools>=19.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from hidapi) (41.2.0)
Installing collected packages: hidapi
Running setup.py install for hidapi ... done
Successfully installed hidapi-0.9.0.post2
Okay. I will try to use it, it would be great to have a single script for all platforms.
Cheers.
---
Daniel
Re: python gd-77_firmware_loader mods for mac
Posted: Sun Apr 12, 2020 11:24 am
by OH1E
yeah would be nice, not to start windows machine every time just for upgrading firmware. as been using now long time hackintosh pc :DD
Mono wont work so... only option is this python script. also cps is a problem on unix system like linux/osx but one thing at the time
Re: python gd-77_firmware_loader mods for mac
Posted: Wed Apr 15, 2020 7:41 am
by F1RMB
Hi,
Expect a test version today
Cheers.
---
Daniel
Re: python gd-77_firmware_loader mods for mac
Posted: Wed Apr 15, 2020 8:48 am
by F1RMB
Hi,
Here is a version that implements hidapi support.
To run it under Linux, install the according package (under Debian/Ubuntu like, it's python-hidapi for Python 2.7, or python3-hidapi for Python 3.x).
Under Windows, some extra steps are needed (it's written at the top of the Python file):
Code: Select all
# Windows (tested with Python 3.8):
# - Download hidapi-win.zip from https://github.com/libusb/hidapi/releases
# * unzip
# * copy hidapi.dll to C:\Windows\System32
#
# - Download Cython interface to the hidapi from https://pypi.org/project/hidapi/#files (take care to get matching Python version, "cpxx")
# * once downloaded: python -m pip install hidapi-0.9.0.post2-cp38-cp38-win_amd64.whl (filename must change according to version and platform)
#
# - Install python modules:
# * pip install urllib3 enum34
About OS-X, Riku, it would be great if you can provide the installation instruction, that way I could had them to the file header too.
Cheers.
---
Daniel
Re: python gd-77_firmware_loader mods for mac
Posted: Sat Apr 18, 2020 11:12 am
by F1RMB
Hi,
It seems Riku is busy, but I see few downloads. So, for the people who downloaded the script, could you report if it works for you or not ?
Cheers.
---
Daniel
Re: python gd-77_firmware_loader mods for mac
Posted: Sat Apr 18, 2020 11:26 am
by VK3KYY
If you want me to test this on a mac, I can try tomorrow.
I have a hackintosh and a real mac
Re: python gd-77_firmware_loader mods for mac
Posted: Sat Apr 18, 2020 11:41 am
by F1RMB
Hi Roger,
VK3KYY wrote: ↑Sat Apr 18, 2020 11:26 am
If you want me to test this on a mac, I can try tomorrow.
I have a hackintosh and a real mac
Okay, that's cool, I have it already in an incoming PR, but I wait for some feedback to pull the trigger
BTW, the version I will push is a bit different, it contains the latest changes about the GD-77S filename, and few things, nothing critical.
Cheers.
---
Daniel