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

HID Keyboard with DFU

Hi, 

    I want to add ble dfu to the hid keyboard example using nRF52810.  I have tried unbonded and bonded,both are not work.

By using the bonded way, I made the following changes

    #define NRF_SDH_BLE_SERVICE_CHANGED 1

    #define NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS 1

Return the error is as follow 

ERROR 8 [NRF_ERROR_INVALID_STATE] at ble_dfu_buttonless_init

Parents
  • Hi,

    First of all, the nRf52810 has a quite small flash, so it may not be possible to do DFU even of the app. In order to do it you need to fit the bootloader in addition to the application and SoftDevice. That may be possible, but it is a tight fit.

    I have tried unbonded and bonded,both are not work.

    I recommend using unbonded unless you have a compelling reason for requiring bonding. That is simpler and you avoid a few pitfalls. (You can still require bonding in order to write to the DFU characteristic in the application to put the device in DFU mode, which often makes sense.)

    Return the error is as follow 

    ERROR 8 [NRF_ERROR_INVALID_STATE] at ble_dfu_buttonless_init

     This typically happens if you call ble_dfu_buttonless_init() before pm_init(), as the peer manager needs to be initialized first.

Reply
  • Hi,

    First of all, the nRf52810 has a quite small flash, so it may not be possible to do DFU even of the app. In order to do it you need to fit the bootloader in addition to the application and SoftDevice. That may be possible, but it is a tight fit.

    I have tried unbonded and bonded,both are not work.

    I recommend using unbonded unless you have a compelling reason for requiring bonding. That is simpler and you avoid a few pitfalls. (You can still require bonding in order to write to the DFU characteristic in the application to put the device in DFU mode, which often makes sense.)

    Return the error is as follow 

    ERROR 8 [NRF_ERROR_INVALID_STATE] at ble_dfu_buttonless_init

     This typically happens if you call ble_dfu_buttonless_init() before pm_init(), as the peer manager needs to be initialized first.

Children
Related