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

Connect to the specified phone

I already know the phone's Bluetooth address, I want to write the address directly into the device, the device - directed broadcast, how do I put the address in the program?

Parents Reply
  • You have to enable the directed advertisement and set the interval and timeout for directed slow advertisement. Add this to advertising_init():

    options.ble_adv_directed_enabled = BLE_ADV_DIRECTED_ENABLED;
    
    options.ble_adv_directed_slow_enabled = BLE_ADV_DIRECTED_SLOW_ENABLED;
    options.ble_adv_directed_slow_interval = APP_ADV_DIRECTED_INTERVAL;
    options.ble_adv_directed_slow_timeout = APP_ADV_DIRECTED_TIMEOUT_IN_SECONDS;
    
Children
No Data
Related