Code example for virtual HID (Human Interface Device)

I need example of code (or some tutorial) for making virtual HID (Human Interface Device). If possible with bluetooth integration and made for linux using QT/C++.

Practically, I want to make my own cellphone application which will have few buttons (but it will work as keyboard - sending keystrokes), without requiring server-side application (it will control windows/linux/mac operating systems), and HID seems to me best choice. Unfortunately, I can't find any code samples or tutorials for that.

The thing is I don't know how I am supposed to make service and register it (make it available over bluetooth so OS can recognize it as keyboard and pair with it).


So far I have found about BlueZ, but as I mentioned, I cant find any code samples or tutorials.


UPDATE: I am trying to make my cellphone (Nokia N9 - Maemo 6/MeeGo OS - Linux) to pretend as HID device via BlueTooth so I can send keystrokes to PC.


The first question that comes into my mind is this usb device made by you ?

I don't understand what making my own cellphone application means . So you have a device that is a cell phone or what please be more explicit

Anyway a solution for you might be the libusb library works very well on both windows and linux machines.

If you need to study about usb hid devices and how to interact with them you can find a lot of very good tutorials here.

Please be more explicit in order to help you.

链接地址: http://www.djcxy.com/p/58308.html

上一篇: Android wiimote套接字无法连接

下一篇: 虚拟HID(人机接口设备)的代码示例