This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using the dongle to move the mouse while paired to the nRF52832

Hey,

I have implemented the ble_hid_mouse example in the nRF52832, and implemented both central multilink and USBD in the nRF52840 dongle so that both boards are paired and the dongle is seen as an HID mouse.

Now my goal is to make the mouse move in accordance to the nRF52832 board but in the PC that the dongle is connected to. I initially thought that it will happen by default since the mouse signals are sent to the dongle and the dongle is configured to be a mouse, but it wasn't the case. I would like to know what kind of changes should be making in the dongle code. should I be handling the signal received in the dongle and tell it to move accordingly?

Help is appreciated,

Thanks,

Maher

  • So as far as i understand you want to use the nRF52840 dongle to receive the signals from the mouse. The nRF52840 dongle is the HID mouse device. In such case you need to handle the communication between the mouse and the dongle somehow. You would have to create a HID central device that relays the data from the mouse to USB.

    Normally you can just put the HID mouse example code on the mouse and then use a generic BLE dongle to scan for the HID mouse and it will work out of the box. BLE support was added to Windows 8 and newer. But this of course requires generic BLE hardware plus a newer operating system to work, so I assume that's why you want to make your own dongle.

    There is an example in the new nRF connect SDK which is doing the same thing as you are trying to implement: http://developer.nordicsemi.com/.NCS_PV/doc/nrf/samples/nrf_desktop/README.html# I've not had time to look at it my self so I'm not completely sure what is included, but please have a look first, and let me know if it's something you can use.

Related