I'm trying to create a virtual bluetooth keyboard client for Mac OS. that means my Mac will serve as a BT KB. I read about the bluetooth API in OS X (in ObjC), and I also found an HID API for Mac (in C)
To make this work I understand I need to declare an hid-keyboard-service that should be broadcasted on SDP queries.
Thanks...!
Karabiner-VirtualHIDDevice is a virtual HID device driver for macOS. A virtual keyboard device implementation for macOS.
If you're on a user login screen, click Switch User and instead go to the main login screen. Press the Cmd + Option + F5 keys to open Accessibility Shortcuts. Enable Accessibility Keyboard from the list and the keyboard will open. Now, click Done, drag the keyboard aside, and open the profile you want to log in to.
As far as I understand it, a HID device driver represents a device locally to the OS, and by the OS, to various other components. It is not used to "broadcast" on USB nor on Bluetooth. As far as I know, OS X does not include a Bluetooth HID service, and neither does OS X nor the USB chipsets in Macs support USB device mode -- or at least they do not expose it.
You will want to write a Bluetooth service. I have not done that, but the documentation seems extensive. From what I understand, you would somehow have to implement your HID service based on the underlying Bluetooth L2CAP transmission protocol.
Since I have studied neither Bluetooth, nor Bluetooth support under Mac, I am unable to provide any more help. I did take a look at HID protocol specs, and even played with them. HID is relatively trivial to implement, but there will be quite a bit of work on implementing the Bluetooth service first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With