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

Device is not advertising full name

i am using BLE template from examples BLE Peripheral and adding some  custom characteristics and not changing any advertisement data. But the device is advertising with only first 4 characters of the name.

Could you please suggest some ways to advertise with full device name.  

  • Hi 

    Did you modify the m_adv_uuids[] array to include your additional characteristics?

    Then there will be less room in the advertisement packet for the device name. 

    A workaround to this is to put the list of UUID's in the scan response packet rather than the advertise packet. Then you will have more room in the advertise packet, but the scanner needs to send a scan request to pick up the UUID list. 

    To do this simply change the advertising_init() function like this:

    /**@brief Function for initializing the Advertising functionality.
     */
    static void advertising_init(void)
    {
        ret_code_t             err_code;
        ble_advertising_init_t init;
    
        memset(&init, 0, sizeof(init));
    
        init.advdata.name_type               = BLE_ADVDATA_FULL_NAME;
        init.advdata.include_appearance      = true;
        init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
        init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
        init.srdata.uuids_complete.p_uuids  = m_adv_uuids;
    
        init.config.ble_adv_fast_enabled  = true;
        init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
        init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;
    
        init.evt_handler = on_adv_evt;
    
        err_code = ble_advertising_init(&m_advertising, &init);
        APP_ERROR_CHECK(err_code);
    
        ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
    }

    Best regards
    Torbjørn

Related