hidapi icon indicating copy to clipboard operation
hidapi copied to clipboard

macOS - open fails for bluetooth device

Open kypalmer opened this issue 6 years ago • 1 comments

Hi!

Originally issued this in the cython-hidapi group, and they directed me this way.

Operating System: macOS

Behavior:

  • running python3 under sudo (REPL)
  • hid.enumerate succeeds -- shows all bluetooth and usb connected HID devices.
  • device.open succeeds in opening a USB keyboard (reads work)
  • device.open & device.open_path fail with a bluetooth keyboard. 'OSError: open failed'

Expected Behavior: a connection to be opened to any HID device in hid.enumerate()

reproduction:

>>> import hid
>>> hid.enumerate() // several HID devices listed
>>> h = hid.device()
>>> h.open(1452, 544) // apple USB keyboard -- works
>>> h.close()
>>> h.open(1452, 569) // apple bluetooth keyboard -- OSError: open failed

I assumed from Apple's bluetooth docs that bluetooth HID access would work the same as USB.

Any thoughts? It's my first attempt at using the library, so I may be doing something wrong.

Cheers

kypalmer avatar May 23 '19 20:05 kypalmer

This repo is no longer maintained, see #431

In order to help keep that issue on the top, please do us a favor by closing your issue and reaching out on one of the other channels (libusb mailing list or opening an issue at libusb/hidapi).

Thanks!

jonathancross avatar Jul 11 '19 01:07 jonathancross