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

BLE DFU example is not connectable

Hi,

I have been trying to get the BLE secure DFU example working on a custom board (nrf52840 - BC840 module). I tried it on SDK 15 and SDK 16. When I flash the BLE DFU, I can see it advertise on my mobile (nrfConnect) but I am unable to connect. 

I can, however, connect to it using nrfConnect on the PC. But I have noticed that the RSSI seems a little lower than usual anyhow.

You might think this is a hardware issue but:

  • I flash, s140 6.1.1 softdevice + my app -> no issues
  • I flash pre-compiled "secure dfu test images" -> no issues
  • I compile the SDK 16 secure BLE DFU example, I make flash_softdevice + make flash -> issues
  • I have also used the SDK 15 BLE DFU example but I needed to merge the softdevice and bootloader -> issues

My first idea to solve this was to check my sdk_config.h and make sure that the LF clock settings are correct. I have tried a number of settings without luck. I have on LF crystal on board, but even when I chose the RC clock, it had the same issue.

Finally, I have a nrf52832 dev board (BMD-350-EVAL). When I program the exact same example to the dev board it works fine. So my guess is there is something different about the nrf52832 vs nrf52840 examples/hardware. But I am not really sure.

You help is appreciated!

  • Ok I solved it,

    I needed to change these lines in the sdk_config:

    #define NRF_DFU_ANT_MTU 1024
    #define NRF_DFU_BLE_MIN_CONN_INTERVAL 12
    
    #define NRF_DFU_BLE_MAX_CONN_INTERVAL 12

    Change them to:

    #define NRF_DFU_ANT_MTU 247
    #define NRF_DFU_BLE_MIN_CONN_INTERVAL 10
    
    #define NRF_DFU_BLE_MAX_CONN_INTERVAL 15

    Changing just the MTU or Just the connection interval didn't work. I had to change both. 

    I am not 100% certain why this is necessary, I assume my phone can only handle certain values?

  • Sorry I spoke too soon, I am unable to replicate this success. I still am having issues connecting with my phone. Which is strange because I never have issues connecting with my own app - only when I flash the bootloader.

    The error message is:

    Connected to [MAC ADDRESS]
    Connection parameters updae failed with status 8 (interval: 45.0ms, latency: 0, timeout: 5000ms)
    Error 8 (0x8): GATT INSUF AUTHORIZATION
    Error 8 (0x8): GATT CONN TIMEOUT
    Disconnected

  • Another update. Once I OTA update the device using PC (nrfConnect). Then I can connect to my application using my phone.

    So it appears that the only issue is that the my phone can't connect to the bootloader.

  • Hi mredp, 

    Is the log, i.e. 

    Connected to [MAC ADDRESS]
    Connection parameters updae failed with status 8 (interval: 45.0ms, latency: 0, timeout: 5000ms)
    Error 8 (0x8): GATT INSUF AUTHORIZATION
    Error 8 (0x8): GATT CONN TIMEOUT
    Disconnected

    from the nRF52840 side or the nRF Connect app on your smartphone?

    GATT INSUF AUTHORIZATION usually means that the security level of the link does not match the security requirement set in the characteristic you are trying to read/write to. 

    Have you set NRF_DFU_BLE_REQUIRES_BONDS to 1 in the bootloader sdk_config.h file?

  • Yes your correct, the log is from the nRF Connect app on my smartphone. 

    I have not set it. This is in the sdk_config:

    #define NRF_DFU_BLE_REQUIRES_BONDS 0
     
Related