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

Add Manufacturer Data

Dear Nordic Team,

Thanks for supporting.

If any possible to add manufacturer data in example experimental_ble_app_blinky in advertisement. i am using SDk11 and my hardware is PCA10028. Please support.

Parents
  • Take a look at the ble_app_beacon example

    This includes manufacturer data, because iBeacons use manufacturer data to hold details of the beacon.

    Note. You do not need to use exactly the same data structure for

    static uint8_t m_beacon_info[APP_BEACON_INFO_LENGTH] =                    /**< Information advertised by the Beacon. */
    {
        APP_DEVICE_TYPE,     // Manufacturer specific information. Specifies the device type in this
                             // implementation.
        APP_ADV_DATA_LENGTH, // Manufacturer specific information. Specifies the length of the
                             // manufacturer specific data in this implementation.
        APP_BEACON_UUID,     // 128 bit UUID value.
        APP_MAJOR_VALUE,     // Major arbitrary value that can be used to distinguish between Beacons.
        APP_MINOR_VALUE,     // Minor arbitrary value that can be used to distinguish between Beacons.
        APP_MEASURED_RSSI    // Manufacturer specific information. The Beacon's measured TX power in
                             // this implementation.
    };
    

    You can use a array of bytes instead.

    You just need to setup the pointer to your data and also its length

    manuf_specific_data.data.p_data = (uint8_t *) m_beacon_info;
    manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;
    

    and

    advdata.p_manuf_specific_data = &manuf_specific_data;
    

    before calling

    err_code = ble_advdata_set(&advdata, NULL);
    

    One thing to be aware of, is that the size of the manufacturer data is limited by the maximum size of the advertising packet, and also what other data is in the advertising packet.

    e.g. if you use a long name, and / or a 128 bit service etc in your advertising packet, there will be less spare for the manufacturer data

Reply Children
No Data
Related