in NCS, how to changing BLE advertising interval at runtime.

Hi, 

how can we change the BLE advertising interval at runtime  In NCS SDK?  Any sample code in NCS directory ?  Thanks for helping  !

Best Regards

Frank

Parents Reply Children
  • Does advertising stop when a peripheral is connected? 

    If i wanted to change advertising interval via a characteristic, such that when it disconnected, it'd call its bt_le_adv_resume function, and it'd have different setting from when bt_le_adv_start was called, how would i do this? 

    Though i see the bt_le_adv_stop function in the gap.c file in the zephyr API documentation, it does not appear to be built into my project. It appears to only have conn.c, adv.c, hci_core.c, but no GAP...? the adv.h gives a few public functions like bt_le_adv_start, but it doesn't appear to reflect zephyrs api documentation... im using NCS 1.7.1.

  • cosmotic_instant said:
    Does advertising stop when a peripheral is connected? 

    Most likely, if the advertisements are connectable. 


    cosmotic_instant said:
    it does not appear to be built into my project.

    conn.c probably has GAP function calls. So the BT GAP functionality is present.

Related