Tryanks / go-accessoryhid

Emulate any hid device for Android.
MIT License
12 stars 1 forks source link

Gettogm error : libusb: pipe error [code -9] #6

Open rohitsangwan01 opened 6 months ago

rohitsangwan01 commented 6 months ago

Hey, am trying on MacM1 , and getting error

libusb: pipe error [code -9]

when try to send keyboard message, i used the exact same code sample you mentioned in readme

Tryanks commented 6 months ago

Hi, could you try otg mode of the scrcpy? Scrcpy is a great project and my code is based on this. Let me know what Android mobile device you used and how otg mode runs on it.

rohitsangwan01 commented 6 months ago

@Tryanks otg mode works fine for me, i tried in OnePlus Nord and Samsung Galaxy Note20, and same error in both devices i tried replicating the code from your's and scrcpy section in dart ( a wrapper over libusb ), and strangely i also got the same error message when tried calling SendEvent, seems like something is missing in the implementation

Tryanks commented 6 months ago

Sorry, but since I don't have an M1 Mac (nor an Intel Mac), I'm not entirely confident in fixing the issue you've encountered here. The main probrom is that I can't get any clues that might help with the fix from just a pipe error, which work in the very majority of my use cases: Arm/Amd64 | Windows/Linux. I'll try to check code again later.

rohitsangwan01 commented 6 months ago

@Tryanks ok thanks, i will give it a try on windows