views:

445

answers:

1

Hello,

Given a Windows Mobile 6.1 smartphone with Bluetooth I want to register it as a mouse.

Basically what I do now:

  • Start the Bluetooth service on device with Guid {00001124-0000-1000-8000-00805f9b34fb}
  • Connect from desktop PC to device.

Result:

  • Device is detected with all services including the HID one but there is no driver for it

Current workaround:

  • Desktop application that connects to the bluetooth service and reads the data stream

Desired solution:

  • Register the service as Bluetooth mouse and send mouse events from phone.

Q:

  1. How do I get to the desired solution?
  2. Do a I have to write an inf file for it?
  3. I have to add extra information to the bluetooth service?
  4. How can I send mouse clicks over this service?

Currently I am developing in C# using .NETCF 3.5 and Microsoft.WindowsMobile.SharedSource.Bluetooth assembly from .NET CF SDK but it would be no problem to work in C++ if needed.

+2  A: 

You shouldn't need drivers for HID. While I haven't sent mouse clicks over bt, I have sent other strange things over the generic HID driver. So:

  • You shouldn't need a .inf file or new driver.
  • Bluetooth is just your transport (wire replacement), so there "shouldn't" be extra work there either. Except for maybe pairing the two devices.
  • Sending the clicks I believe is done by sending the properly shaped data packets to the PC.

Look at the linux code pointed in this post for details of the packet. And obviously you've seen this for sending the data.

Have fun with NetCF!

MandoMando
Thank you for your response. However the device is recognized as HID but when Windows tries to install the driver for it I get a warning. I would like this to not happen
Victor Hurdugaci
You may need to set the device type/id that windows recognizes and can use the generic HID driver. This might help: http://msdn.microsoft.com/en-us/library/ms923723.aspx
MandoMando
As for as I see there must be a SDP Report associated with the connection. So I need to provide the HID Guid and a SDP description. But I don't know how to write that :(
Victor Hurdugaci