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

Search a specific BLE peripheral device

Hello,

we have developed a custom BLE peripheral device. All peripheral devices have the same name. If we want to indetify a specific peripheral device with a smartphone APP, we use the manufacturer data during advertising to set a Flag, if the user press a button on the pheripheral device. After the smartphone find the specific peripheral device we perform a bonding and in addition the smartphone save the MAC Address from the periheral device, to ensure that the Smartphone only try to connect to this device. After the bonding is performed the peripheral allows only devices from the whitelist. Is this the right way to indentify a specific peripheral device and ensure that the smartphone always reconnect to the same device?

Parents Reply
  • Hi, that's exactly what we are trying to do. A button pushed on the device will change the "device name" in the advertising string. However, while I do:

        err_code = sd_ble_gap_device_name_set(&sec_mode,(const uint8_t*)DEVICE_NAME_1,strlen(DEVICE_NAME_1));
        APP_ERROR_CHECK(err_code);
    
        err_code = ble_advdata_set(&advdata, NULL);
        APP_ERROR_CHECK(err_code);
    

    I can't see the device name change (using BLE scanners: LightBlue, as well as Nordic's nfrConnect), until I actually connect to the device - which defeats the whole purpose. I want to see the advertising string change after a button press.

Children
No Data
Related