Does iOS support to work as a HID device via bluetooth?

I want to use iPhone as a bluetooth keyboard or joystick to control a host device. To input contents or play games on another device.

As far as I know. My goal can't be done. There are three relate frameworks:

  1. CoreBluetooth. When I try to add a peripheral with HID service 1812, the method returns a error. There's another HID service 1124, over BT classic. Is it available?
  2. ExternalAccessory. Our host device is not a MFI device.
  3. GameController. By this iPhone can work as a host device, not a input device.

Thanks for any suggestions!

An iOS app cannot act as a Bluetooth Classic device.

What error do you get when you try 1812?

(Edited to add: if you could get BT LE 1812 to work on the iPhone, are you sure that the host device would understand it? I don’t know how common it is.)

@endecotp

  • Are you sure of 'An iOS app cannot act as a Bluetooth Classic device'?

  • The 1812 service can't be added successfully to the client device, so host device is not able to find this service. I got this error:

peripheralManager didAdd service name: , uuid: 1812, error: Error Domain=CBErrorDomain Code=8 "The specified UUID is not allowed for this operation." UserInfo={NSLocalizedDescription=The specified UUID is not allowed for this operation.}
  • According to https://www.silabs.com/documents/public/application-notes/AN1032-HID-BT.pdf , we found classic HID service 1124. I succeed when I try to add service 1124 to peripheralManager. But this host device doesn't connect it as a HID device. I think here iOS system treat 1124 as a custom service over BLE, not over Bluetooth Classic.

Are you sure of 'An iOS app cannot act as a Bluetooth Classic device'?

Let's say I'm 85% certain.

The 1812 service can't be added successfully to the client device, so host device is not able to find this service. I got this error: peripheralManager didAdd service name: , uuid: 1812, error: Error Domain=CBErrorDomain Code=8 "The specified UUID is not allowed for this operation." UserInfo={NSLocalizedDescription=The specified UUID is not allowed for this operation.}

Right, it does look like they have specifically blocked this UUID.

Question: have you found any other App Store apps that act as Bluetooth keyboard/mouse?

According to (a link which I'm apparently not allowed to copy and paste, ****** forum software) , we found classic HID service a 1124. I succeed when I try to add service 1124 to peripheralManager. But this host device doesn't connect it as a HID device. I think here iOS system treat 1124 as a custom service over BLE, not over Bluetooth Classic.

Yes, exactly.

About your Question: have you found any other App Store apps that act as Bluetooth keyboard/mouse? NO, all similar apps on AppStore are via wifi. Even there are some apps via bluetooth, these apps are specific for there own companies' hard devices.

I have found an app called "Bluetouch" makes an iPhone act as a Bluetooth keyboard/touchpad. Hope this helps.

@mcmor Thanks for your information! I've tried the app. Maybe HID JoyStick is possible via BLE. But we are using Classic Bluetooth

Hi guys, did anyone make progress on this topic? Indeed, when adding the "0x1812" service to the peripheral manager I get the exact error as described above. The "Bluetouch" app seems to be using BLE and is somehow managing to offer the 0x1812. It is a little weird though, when I start the app on my iPad and let it be discoverable for 180s, I can not find it while searching for devices on my macbook air. With a windows notebook or my android phone I can find it tough. A BLE Analyzer app shows me that my ipad is offering the 0x1812 service. The app offers a second option, which is to not advertise itself as a peripheral but to search for devices to connect to, I guess it is then working as a central. I then can find my macbook and connect to it, although neither on my mac nor on the iPad (appart from inside the app) it is visible that I am connected, mouse and keyboard funcionality works fine. I will try to sniff everything with PacketLogger and post it here.

Does iOS support to work as a HID device via bluetooth?
 
 
Q