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

How to set the length of the advertising device name?

Hi,

How to set the length of the advertising device name? Even i set name type to BLE_ADVDATA_FULL_NAME, i can only able to set maximum of 14bytes. If i increase the name size further, advertising is not happening, i'm not sure what is happening when the device name reaches more than max size. Please provide some info regarding this.

Regards, Balaji

Parents
  • Please take a look at this question.

    If you can live with not advertising the full name, you can consider advertising just parts of the name instead, for example like this:

    
        advdata.name_type               = BLE_ADVDATA_SHORT_NAME;
        advdata.short_name_len          = 10;
    
    

    This will include only 10 bytes of the name in the advertisement package. The other alternative is to move some data to the scan response, by passing a second ble_advdata_t to ble_advdata_set().

Reply
  • Please take a look at this question.

    If you can live with not advertising the full name, you can consider advertising just parts of the name instead, for example like this:

    
        advdata.name_type               = BLE_ADVDATA_SHORT_NAME;
        advdata.short_name_len          = 10;
    
    

    This will include only 10 bytes of the name in the advertisement package. The other alternative is to move some data to the scan response, by passing a second ble_advdata_t to ble_advdata_set().

Children
  • Hi,

    I am doing a "Bluetooth low energy Advertising, a beginner's tutorial". One of the challenges is change the advertising name type, the provided commands are same as yours,

    init.advdata.name_type               = BLE_ADVDATA_SHORT_NAME;
    init.advdata.short_name_len          = 6;
    

    However, the advertisement name still showed full name as before after I modified the code as above, compiled and downloaded it to my nEF52-DK. It is did not make sense.

Related