Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get HID profile connected to iOS device?

I want to check whether the BlueTooth device is the device I want by the HID(Human Interface Device) profile.

Is it possible??

And how to get the HID profile?

Thanks for your help

like image 788
Steven Jiang Avatar asked Jul 16 '12 05:07

Steven Jiang


1 Answers

Based on your comments, I do understand your request like that: You want to write an iOS app that takes input from a device connected via Bluetooth using the HID profile. Input from other, similar devices shall not be accepted by the app.

A first answer is: You can't do that. Bluetooth HID connections are established at OS level by

  • Tap "Settings", choose "General" > "Bluetooth"
  • Switch Bluetooth on
  • Turn on your Bluetooth input device
  • Select your remote input device within your iOS device's Bluetooth device discovery and pair booth devices

Once, the input device is connected, it works as it is supposed to: Sending input events (in case of a keyboard characters / control signals). On app level you are not able to access low level data, like Bluetooth address, manufacturer information and so on. Gamekit will not help. It is higher level than OS level and requires an iOS device with an appropriate app on the remote side as well.

On a second thought, as you are developing the remote Bluetooth input device as well, you may go higher level. You connect the device as described above, but you encrypt the data the input device sends to a mobile device. Your app decrypts data and you problem is solved. Third party devices don't use your protocol and can't talk to your app. (So your app will have ignore their inputs). But this approach will break compatibility with other devices not using your app (e.g. you can't get a Bluetooth keyboard working with a regular pc anymore).

like image 184
alex Avatar answered Oct 20 '22 07:10

alex