Skip to content

macOS - open fails for bluetooth device #427

Open
@kypalmer

Description

@kypalmer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions