BLE Advertise does not restart after disconnection

Hello everyone,

I am using the NRF5340-DK development board, but I am having trouble restarting advertising when my smartphone connects or disconnects from the board. Once I connect and pair my smartphone, advertising stops. I am trying to restart it after the BLE disconnect callback, but despite no function returning an error, I cannot see the board advertising on my smartphone. Below is a snippet of my code:

Main loop:



And my StartAdvertise function:

Does anyone know if this is the normal behaviour, or how can I fix this?
Best regards.

Parents
  • Hi, 

    You can submit start advertising work in the disconnection function like this example

    Regards,
    Amanda H.

  • Hello,

    I have already tried that, as it was suggest on another thread, however it is not working. The 

    bt_le_adv_start function returns 0 once the advertise work gets triggered but on my smartphone I cannot scan the board. Only if I reset the board the advertise restarts again. Do you have any explanation?

    Best regards.
Reply
  • Hello,

    I have already tried that, as it was suggest on another thread, however it is not working. The 

    bt_le_adv_start function returns 0 once the advertise work gets triggered but on my smartphone I cannot scan the board. Only if I reset the board the advertise restarts again. Do you have any explanation?

    Best regards.
Children
  • Hi, 

    Did you manage the issue?

    What's your DK HW version on the white sticker? What NCS version are you using? Are you able to test with the latest version, v2.9.1?

    We don't see anything immediately wrong. Maybe you can upload a minimal sample that reproduces the issue.

    Regards,
    Amanda H.