Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows mobile 使Windows Mobile设备模拟蓝牙HID设备_Windows Mobile_Hid - Fatal编程技术网

Windows mobile 使Windows Mobile设备模拟蓝牙HID设备

Windows mobile 使Windows Mobile设备模拟蓝牙HID设备,windows-mobile,hid,Windows Mobile,Hid,我正在寻找一种方法,通过蓝牙将Windows Mobile设备连接到PC,并将其作为HID设备(即键盘或鼠标)显示在PC上。我想这主要是修改Windows Mobile设备上可用的蓝牙配置文件,使其公开蓝牙HID接口的问题。。。这可能吗?它是否需要自定义驱动程序或WinMo设备上的某些东西??在大多数情况下,我的主要要求是它不需要PC端的任何特殊软件,它应该简单地使用内置的蓝牙堆栈,并认为WinMo设备实际上是一个HID设备,而不是PDA 我有WinMo设备,具有条形码扫描功能,因此我希望能够使

我正在寻找一种方法,通过蓝牙将Windows Mobile设备连接到PC,并将其作为HID设备(即键盘或鼠标)显示在PC上。我想这主要是修改Windows Mobile设备上可用的蓝牙配置文件,使其公开蓝牙HID接口的问题。。。这可能吗?它是否需要自定义驱动程序或WinMo设备上的某些东西??在大多数情况下,我的主要要求是它不需要PC端的任何特殊软件,它应该简单地使用内置的蓝牙堆栈,并认为WinMo设备实际上是一个HID设备,而不是PDA

我有WinMo设备,具有条形码扫描功能,因此我希望能够使用PDA,使用HID接口,将条形码扫描到PC

<>也,我主要使用C++和C语言,所以如果可以用这些语言中的一种来完成,那就最好了。
有什么建议吗?

完全有可能。只需启动一个注册了HID服务Guid{00001124-0000-1000-8000-00805f9b34fb}的蓝牙服务器。如果设备支持Microsoft bluetooth stack,则可以使用Peter Foot优秀的.NET CF库()和BluetoothService.HumanInterfaceDevice

更新:

有了Peter Foot的库,服务器看起来像这样:

using System.IO;
using InTheHand.Net.Sockets;
using InTheHand.Net.Bluetooth;

// ...

BluetoothListener l = new BluetoothListener(
    BluetoothService.HumanInterfaceDevice);
using (l) {
    BluetoothClient c = l.AcceptBluetoothClient();
    using (c) {
        Stream s = c.GetStream();
        using (s) {
            // send HID bytes
        }
    }
}
问候,,
tamberg

非常酷……如果你能给我一个快速的代码示例,我现在已经有了库,但不确定如何使它工作。我是32feet.NET的维护者,很抱歉,我的答案是错误的。HID运行在Bluetooth L2CAP层上,“普通”应用程序运行在更高级别的“RFCOMM”层上,这是BluetoothListener/BluetoothClient公开的内容,因此该示例不起作用:-(因为并非所有平台都支持L2CAP,所以我们不提供对它的支持——但是欢迎您提供意见。请参阅上的协议/层信息,例如,感谢您的澄清。干杯