Question

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.

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.

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

Any suggestions?

Was it helpful?

Solution

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;

UPDATE:

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

Regards, tamberg

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top