Open atom2626 opened 7 years ago
Ok, I figured it out. The issue was that my device implements both A2DP and HID services. The Mac attach itself to the A2DP and probably lock the handle to the Bluetooth device, in doing so.
When I deactivated the A2DP, I was able to open the HID handle. Now I still don't know how I'm going to get both A2DP and HID to work at the same time (it works on Linux), but that's a problem for tomorrow.
I'm new to Mac, very experienced Linux.
I developed a Python wrapper over hidapi for my custom device on Linux. Everything worked fine. I thought I was going to be able to port it over the Mac OS X. Oh boy...
I really don't know what is going wrong, I can enumerate the devices, but I simply can't open my device. Things I tried to open using serial (I tried to use the reference obtained during enumeration and I tried mac address with various fomarts using :, using -, using no delimiter) I tried in C (calling hidapi directly) and in python, in both cases, I get a cannot open device.
What I'm curious about is that I read that an IO manager was added at some point in OS X. Could this be the problem. At this point, I'm thinking about redoing my SDK by calling direclt with the Apple API: (https://developer.apple.com/library/content/documentation/DeviceDrivers/Conceptual/HID/overview/overview.html#//apple_ref/doc/uid/TP40000970-CH203-CJAHEAFF)
I wonder if an error in the HID Descriptor could prevent me from accessing my device.
If anyone got it working with an equivalent OS X version or has any clues as to what might be wrong, feel free to drop a line here.
-Fred