Adapting the Keyboard HID example to the nRF52840 Dongle

Hello Nordic Community,

I'm now struggeling for quiet some time with trying to get the Keyboard HID example to work with the nRF52840 Dongle.

I already read the complete tutorial on this topic https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial, but it didn't get me any further.

The problem I'm facing is the following:

After I programmed the Dongle with the adapted keyboard program, I can see the dongle advertising in the nRF Connect App on my Android phone, but I can't connect / bond with it. I also can't even see it on either my Android phone, Linux PC or Windows PC when trying to connect via Bluetooth. The same also happens with an adapted HID Mouse example.

I literally changed nothing in the example, except the preprocessor definition, which should be BOARD_PCA10059.

Just for some more information, heres the software and SDK version I use:

Development is done on Windows

SES 6.30 (to program)

nRF Connect for Desktop 3.11.1

nRF Programmer 3.0.3 (to programm the Dongle)

Softdevice s140_nrf52_7.2.0_softdevice

nRF SDK 17.1.0 (I also tried 15.0 and 16.0, with the same effect)

To be fair, I really don't know what I'm doing wrong, since the example should work out of the box from everything I've found and read online.


Also, just to add to this. What I also found during testing was that the LEDs on the dongle didn't work properly with the HID Keyboard example.

I needed to change NRF_LOG_BACKEND_UART_ENABLED to 0 in the sdk_config.h to make them have the correct functionality.

But that still didn't change anything with regards to the main problem.

Parents Reply Children
  • Ah ok interesting, I will try that and then report of my changes to the code and other findings later.

    But just for my own understanding and clarification for now - does that mean the dongle stores the bonding information, even if another sofdevice + Hex is flashed onto it? Probably in some non-volatile memory in the SoC?

  • Hi,

    Yes, the bonding data is stored separately from stack and application in flash, in the area for "application data". Upgrading the application will not overwrite or erase the application data.

    This is especially true for a Dongle, where the appliation is not programmed directly to the SoC through use of a debug probe / J-Link, and so an "erase all" operation on the flash is not available. (Which would be the preferred way to ensure a "fresh" start on an SoC when you have direct programmer access, i.e. not relying on DFU for upgrading the app.)

    Regards,
    Terje

Related