Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on macOS #3

Open
mplatov opened this issue Mar 3, 2021 · 1 comment
Open

Not working on macOS #3

mplatov opened this issue Mar 3, 2021 · 1 comment

Comments

@mplatov
Copy link

mplatov commented Mar 3, 2021

I tried using this app on macOS and it didn't work - the app simply doesn't detect the device.

After looking around, it turned out that libusb requires quite exclusive access to the USB device, which macOS only grants to kernel extensions or USB devices not claimed by other extensions, so libusb_open_device_with_vid_pid fails 1. Since libusb couldn't get access, apparently something was already "claiming it". After long tries of unloading every USB-related kext I could, I came to conclusion that it's probably system's HID driver, (which obviously can't be unloaded). Even the original SkyRC app seems not to require special drivers, which hints that it's using HID APIs as well.

I've checked the code of libb6 that this app is using and it seemed that a swap of libusb to libhid is quite straightforward. I've tried doing that and the app seems to work. Also, with hidlib it's not necessary to give root access or create udev access rules.

Here are the the changes to make it work with hidlib:
libb6
charge-guru

@maciek134
Copy link
Owner

Interesting. Sorry for not getting back to you earlier, I must have missed a notification. Please open a pull request, I'll check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants