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

how to customise the advertising packets

hello,

i am using nrf52832 with sdk 15.2 and i want to advertise my beacon like the above picture how can i change the length type and values i can understand the  app beacon example but that format is different i want to advertise exactly like the above picture can someone help me 

i am using ble_app_blinky example how can i make it work with this macro #define BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME                 0x09 /**< Complete local device name. */

thanks and regards

ps anu

  • Hi!

    To add the full name to the advertising packet, first make sure the name_type field of advdata is specified like this:

    advdata.name_type             = BLE_ADVDATA_FULL_NAME;

     

    Then you can use sd_ble_gap_device_name_set() to set the device name.




    As for the manufacturer specific data, the first two byters are the company identifier (0xFF20) so they would go here:

    #define APP_COMPANY_IDENTIFIER          0x20FF

    manuf_specific_data.company_identifier = APP_COMPANY_IDENTIFIER;

    and the rest would go here

    manuf_specific_data.data.p_data = &data;
    manuf_specific_data.data.size = strlen(&data);

    Please let me know if you have any more questions!

    Best regards,

    Heidi

Related