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

changing advertisement packet

Hey, I have my nrf 52 dk. I have soft device v3 on my nrf 52.

I was doing a blinky test with two boards (one central and one peripheral)

I was just wondering how to change the advertisement packet? (customize my command in my ad pack or change my string) Via code or command prompt.

(the blinky test may not have anything to do with this)

Parents
  • Yes, you can change ADV and SCAN_RSP data with SoftDevice API, see GAP layer functions here (S132 V4, you can see very similar in other releases). You can basically call sd_ble_gap_addr_set, sd_ble_gap_adv_data_set and sd_ble_gap_tx_power_set any time to influence GAP advertising procedure, they will be effective from very next advertising packer (you can call it if it isn't advertising as well, then you need to call start to see the result, but you can call it even when it runs and no need to stop/start).

Reply
  • Yes, you can change ADV and SCAN_RSP data with SoftDevice API, see GAP layer functions here (S132 V4, you can see very similar in other releases). You can basically call sd_ble_gap_addr_set, sd_ble_gap_adv_data_set and sd_ble_gap_tx_power_set any time to influence GAP advertising procedure, they will be effective from very next advertising packer (you can call it if it isn't advertising as well, then you need to call start to see the result, but you can call it even when it runs and no need to stop/start).

Children
Related