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

NRF52 BLE fails to pair after changing device name

Hi,

I was able to succesfully pair my smartphone (Mi 9T pro) with the BLE nordic UART NRF52 connectivity-bridge FW. I did this succesfully with 2 thingy91's. 

I then tried to change one of the names (to more easily seperate them), and repair them with my phone. At this point though, I can't pair with any of them anymore.

(Getting the message "Couldn't pair with ThingyL91 UART because of an incorrect PIN or passkey")

Tried restarting the phone, even resetting its network settings, fully erasing and reflashing the NRF52, reverting back to the old names, but so far without luck..

Somewhere, someplace something is stuck. Which is pretty annoying since I can't monitor the UART anymore over BLE. I realize it might be the phone, but is there something else I might be missing on the NRF52 side?

Thanks for your feedback

Parents
  • Wtf. It -was- the device.

    I reflashed it with JTAG after building the connectivity example myself, .. and suddenly it works. (Did this on both devices)

    I dont really get it, because what I did previously was using the nrf programmer with the same segger jlink, fully erasing memory and flashing with the prebuilt example thingy91_nrf52_connectivity_bridge_2021-06-28_7a076c22. After doing that, you could clearly see it "forgetting" having BLE_ENABLED in the "config", but I couldn't get it to work anymore. Suddenly with the prebuilt it works..

    Even though Im actually NOT trying to debug this, because its so weird, I tried the same process again:

    - Removed pairing from my phone

    - Added and removed again (just to double check that there no time-related stuff on the phone. Paired just fine, and removed just fine)

    - Cleared memory though jlink in nrf connect programmer.

    - Cleared and Flashed  thingy91_nrf52_connectivity_bridge_2021-06-28_7a076c22.hex through jlink in nrf connect programmer.

    - through USB, simply enabled BLE, safely eject, remove, replug USB

    - Try to pair ==> AGAIN does not work! (??)

    Then go into SES, and flash my own built project in sdk 1.6.0 (no modifs)

    BAM, pairing works immediately..

    FYI, the logs from the SEGGER debugger show this (when it works)

    [00:00:00.000,335] <inf> usb_msc: Sect Count 128
    [00:00:00.000,335] <inf> usb_msc: Memory Size 65536
    [00:00:00.001,220] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             58 5d 8b 31 54 67 00 e9  b8 4a a7 df a9 9c e4 1c |X].1Tg.. .J......
                                             b3 0b ce 74                                      |...t             
    [00:00:00.015,380] <inf> usb_cdc_acm: Device suspended
    [00:00:00.015,380] <inf> usb_cdc_acm: Device suspended
    [00:00:00.130,889] <inf> usb_cdc_acm: Device resumed
    [00:00:00.130,889] <inf> usb_cdc_acm: from suspend
    [00:00:00.130,889] <inf> usb_cdc_acm: Device resumed
    [00:00:00.130,889] <inf> usb_cdc_acm: from suspend
    [00:00:01.015,808] <inf> usb_cdc_acm: Device configured
    [00:00:01.015,838] <inf> usb_cdc_acm: Device configured
    [00:00:00.000,366] <inf> usb_msc: Sect Count 128
    [00:00:00.000,366] <inf> usb_msc: Memory Size 65536
    [00:00:00.001,281] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             58 5d 8b 31 54 67 00 e9  b8 4a a7 df a9 9c e4 1c |X].1Tg.. .J......
                                             b3 0b ce 74                                      |...t             
    [00:00:00.016,021] <inf> usb_cdc_acm: Device suspended
    [00:00:00.016,021] <inf> usb_cdc_acm: Device suspended
    [00:00:00.143,615] <inf> usb_cdc_acm: Device resumed
    [00:00:00.143,615] <inf> usb_cdc_acm: from suspend
    [00:00:00.143,615] <inf> usb_cdc_acm: Device resumed
    [00:00:00.143,615] <inf> usb_cdc_acm: from suspend
    [00:00:00.287,536] <inf> usb_cdc_acm: Device configured
    [00:00:00.287,567] <inf> usb_cdc_acm: Device configured
    [00:00:10.064,727] <inf> ble_handler: Connected 53:E4:C2:E5:01:48 (random)
    

    So.. I guess there must be -something- different with either how the code is flashed/was built. 

    In any case, I hope I wont spend any more time on this (as I am -actually- trying to write code for the nrf91:)

    Kind regards,

    Arnout

Reply
  • Wtf. It -was- the device.

    I reflashed it with JTAG after building the connectivity example myself, .. and suddenly it works. (Did this on both devices)

    I dont really get it, because what I did previously was using the nrf programmer with the same segger jlink, fully erasing memory and flashing with the prebuilt example thingy91_nrf52_connectivity_bridge_2021-06-28_7a076c22. After doing that, you could clearly see it "forgetting" having BLE_ENABLED in the "config", but I couldn't get it to work anymore. Suddenly with the prebuilt it works..

    Even though Im actually NOT trying to debug this, because its so weird, I tried the same process again:

    - Removed pairing from my phone

    - Added and removed again (just to double check that there no time-related stuff on the phone. Paired just fine, and removed just fine)

    - Cleared memory though jlink in nrf connect programmer.

    - Cleared and Flashed  thingy91_nrf52_connectivity_bridge_2021-06-28_7a076c22.hex through jlink in nrf connect programmer.

    - through USB, simply enabled BLE, safely eject, remove, replug USB

    - Try to pair ==> AGAIN does not work! (??)

    Then go into SES, and flash my own built project in sdk 1.6.0 (no modifs)

    BAM, pairing works immediately..

    FYI, the logs from the SEGGER debugger show this (when it works)

    [00:00:00.000,335] <inf> usb_msc: Sect Count 128
    [00:00:00.000,335] <inf> usb_msc: Memory Size 65536
    [00:00:00.001,220] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             58 5d 8b 31 54 67 00 e9  b8 4a a7 df a9 9c e4 1c |X].1Tg.. .J......
                                             b3 0b ce 74                                      |...t             
    [00:00:00.015,380] <inf> usb_cdc_acm: Device suspended
    [00:00:00.015,380] <inf> usb_cdc_acm: Device suspended
    [00:00:00.130,889] <inf> usb_cdc_acm: Device resumed
    [00:00:00.130,889] <inf> usb_cdc_acm: from suspend
    [00:00:00.130,889] <inf> usb_cdc_acm: Device resumed
    [00:00:00.130,889] <inf> usb_cdc_acm: from suspend
    [00:00:01.015,808] <inf> usb_cdc_acm: Device configured
    [00:00:01.015,838] <inf> usb_cdc_acm: Device configured
    [00:00:00.000,366] <inf> usb_msc: Sect Count 128
    [00:00:00.000,366] <inf> usb_msc: Memory Size 65536
    [00:00:00.001,281] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             58 5d 8b 31 54 67 00 e9  b8 4a a7 df a9 9c e4 1c |X].1Tg.. .J......
                                             b3 0b ce 74                                      |...t             
    [00:00:00.016,021] <inf> usb_cdc_acm: Device suspended
    [00:00:00.016,021] <inf> usb_cdc_acm: Device suspended
    [00:00:00.143,615] <inf> usb_cdc_acm: Device resumed
    [00:00:00.143,615] <inf> usb_cdc_acm: from suspend
    [00:00:00.143,615] <inf> usb_cdc_acm: Device resumed
    [00:00:00.143,615] <inf> usb_cdc_acm: from suspend
    [00:00:00.287,536] <inf> usb_cdc_acm: Device configured
    [00:00:00.287,567] <inf> usb_cdc_acm: Device configured
    [00:00:10.064,727] <inf> ble_handler: Connected 53:E4:C2:E5:01:48 (random)
    

    So.. I guess there must be -something- different with either how the code is flashed/was built. 

    In any case, I hope I wont spend any more time on this (as I am -actually- trying to write code for the nrf91:)

    Kind regards,

    Arnout

Children
No Data
Related