Random advertising data

Hi,

     We are developing trainer sensor device and looks very smooth so far. But our questions is some apps change our device name to Bryton Trainer xx in the searching stage. 

xx has a different number for each unit. Like below picture.

If I use nRF_connect to search our device. I only see "bryton trainer". This is what we want.

Why?

  • Hi,

    Have you tried checking the actual advertising data with a sniffer trace? Does it contain this number? 

    We're currently short on staff due to the Holiday season. Expect some delay in the handling of this case.

    regards

    Jared 

  • Hi lared,

            I don't use sniffer to get data. I just want to know a possible solution

    I can wait. Thank you.

    John.   

  • How are you adding the name to the advertisement data?

    Is the app possibly displaying the FULL_LOCAL_NAME where nrfconnect is showing the SHORT_LOCAL_NAME?

  • Hi,

           Below is my code about adverting data

    #define DEVICE_NAME                     "Bryton Trainer"                               /**< Name of device. Will be included in the advertising data. */
    
    static void advertising_init(void)
    {
        int32_t   err_code;
        ble_advertising_init_t init;
    
    
        ble_uuid_t m_adv_uuids[] = {{BLE_UUID_CYCLING_POWER,  BLE_UUID_TYPE_BLE},
                                   {BLE_UUID_FITNESS_MACHINE, BLE_UUID_TYPE_BLE}};
    
        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.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
        init.advdata.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_TIMEOUT_IN_SECONDS;
    
        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);
    }

    So, nrf_connect will show the SHORT_LOCAL_NAME, is it right?

    Thank you.

    John.

  • It dosent seem you are actually setting the name of your device to `DEVICE_NAME`.

    Also, the max data allowed in an advertisement packet is 31, but you are attempting to add at least 34.

Related