"Driver Error" when trying BLE HIDS mouse example disabling SMP

Hi! 

I have a working example of BLE HIDs mouse in nRF52DK. I changed the HID report and works ok in Windows 10.

My problem is I need to connect to PC without confirming connection from MCU side. I tried disabling SMP and it connects automatically, but then after a few seconds, Windows shows "driver error"

Any suggestion? Is it possible to pair with Windows without SMP? Any way to use SMP and automatically accept connection? Any way to do not see the confirmation numbers from Windows?

Thank you!

Pedro.

Parents
  • Hi Pedro, 

    By spec, the communication between a HID device (mouse/keyboard) and the host must be encrypted. It's not allowed to have open connection for a mouse/keyboard for security reason. So Windows expect the device to support SMP (pairing) if the device doesn't have it supported Windows will display "Driver error". 

    One option I can think of is to run your own application on Windows. Then you can make your device connect to Windows via the app. It doesn't need to be HIDs hence doesn't require encryption. Your app on Windows should be incharge of converting BLE data to mouse/keyboard input to Windows. 

  • Hi Hung Bui,

    Thank you for your answer. I need to use HID so I will enable SMP and automatically accept connection from MCU.

    Is there any way to do not show "Numeric Match"? 

  • Hi Pedro, 
    Have you tried to test with the default peripheral_hids_mouse examle in nRF Connect SDK ? 


    I did this modification: 

    And it worked fine with my Windows machine. The device can be paired/bonded with Windows without the number confirmation.

     I attached here the hex file that worked for me on a nRF52832 Dev Kit. It compiled with nRF Connect SDK v2.3

    0118.zephyr.hex

    If it works please check what's the difference between your project and the sample in the SDK. 
    Notice : CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y  in prj.conf. 

    Note that if you disable CONFIG_BT_SETTINGS and CONFIG_SETTINGS , it will not able to re-connect as the bond information is not stored in flash. 

  • hi Hung,

    I've done same than you in a nRF52DK and it works. I have to check the differences and why it is not working in my Nicla Sense Me board.

    Now something very strange happened. Maybe you can help me.

    To program nRF52832 in Nicla Sense Me board I'm using a Segger J-LINK programmer/debugger. Now it is not detected by Nordic pluggin in Visual Studio Code, but it is detected by PC and I can use it with Segger utilities.

    When I press refresh button in NRF CONNECT: CONNECTED DEVICES, J-link led blinks, as it is having some kind of communication, but it is not detected by Nordic pluggin.

    I've restarted PC and reinstalled Nordic vscode pluggin. Also tried with another USB cable.

    It happened suddenly. Any idea?

    Thanks again!

  • Hi Pedro, 


    Did it work before ?  Or it has always been like that ? 

    Which Jlink you used ? In my computer it does show up in CONNECTED DEVICES regardless if I connect the debugger to a external board or not. 


    Could you try doing debugging and programming via our DK (that connect to your custom board via Debug Out) ? 


  • Yes it worked before. It always worked. Just suddenly stopped appearing in available devices.

    In my computer it does show up in CONNECTED DEVICES regardless if I connect the debugger to a external board or not

    Mine had same behaviour when it worked. I have J-Link BASE Classic.

    Could you try doing debugging and programming via our DK (that connect to your custom board via Debug Out) ?

    I can do that, but I'd prefer to use J-Link.

    It's very strange. I don't know what more to do. Maybe clean uninstall and reinstall of vscode?

  • I'm not so sure. Please try nRF Connect for Desktop Programmer if you can detect the programmer. 
    Maybe Jlink driver has something to here ? Could you try update Jlink ? 

    I assume you still can see the DK in the list when you connect a DK in ? 

Reply Children
Related