本文介绍了使Windows Mobile设备模拟Bluetooth HID设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm looking for a way to connect a Windows Mobile device to a PC via Bluetooth and have it show up on the PC as a HID device (i.e. Keyboard or Mouse). I imagine this would mostly be a matter of modifying the available Bluetooth profiles on the Windows Mobile device so that it exposes a Bluetooth HID interface... Is that even possible? Would it require a custom driver or something on the WinMo device?? For the most part, my main requirement is that it not require ANY special software on the PC side, it should simply use the built in Bluetooth stack and think that the WinMo device is actually a HID device and not a PDA.

我有具有条形码扫描功能的WinMo设备,因此我希望能够使用PDA通过该HID界面将条形码扫描到PC.

I have WinMo devices that have barcode scanning capability, so I would like to be able to use the PDA to scan barcodes to the PC, using that HID interface.

另外,我主要使用C ++和C#,因此,如果可以使用其中一种语言来完成,那将是最好的.

Also, I mainly use C++ and C#, so if it could be done in one of these languages, that would be best.

有什么建议吗?

推荐答案

这完全有可能.只需启动在HID服务Guid {00001124-0000-1000-8000-00805f9b34fb}中注册的蓝牙服务器即可.如果设备支持Microsoft蓝牙堆栈,则可以使用Peter Foot出色的.NET CF库( http://32feet.net/)和BluetoothService.HumanInterfaceDevice;

It's perfectly possible. Just start a bluetooth server registered with the HID service Guid {00001124-0000-1000-8000-00805f9b34fb}. If the device supports the Microsoft bluetooth stack you can use Peter Foot's excellent .NET CF library (http://32feet.net/) and BluetoothService.HumanInterfaceDevice;

更新:

使用Peter Foot的库,服务器将如下所示:

With Peter Foot's library the server would look something like this:

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
        }
    }
}

关于,坦贝格

这篇关于使Windows Mobile设备模拟Bluetooth HID设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 06:37