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

How to modify custom Advertising packet values

Hello All,

I am working on nrf52810 board

Using sdk 14.2

I am trying to modify some bytes of advertising packet  .

I am referring the previous post as link given below

https://devzone.nordicsemi.com/f/nordic-q-a/8854/fully-custom-advertisement-data

I have modified the advertising init function as per the above link.

But i am getting warning like incompatible type.

how to solve this issue with proper advertising .

What modification is required in the code..?

Please reply if anyone having solution for this issue.

I am attaching the my main.c file please verify and let me know any changes required.

Waiting for reply..

Regards,

Rohit

Parents
  • Hi Rohit,

    It seems like you are passing a wrong argument to the function sd_ble_gap_adv_start

    modify your code like this and try:

    ble_gap_adv_params_t adv_params;

    // Start advertising
    memset(&adv_params, 0, sizeof(adv_params));

    adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND;
    adv_params.p_peer_addr = NULL;
    adv_params.fp = BLE_GAP_ADV_FP_ANY;
    adv_params.interval = APP_ADV_INTERVAL;
    adv_params.timeout = APP_ADV_TIMEOUT_IN_SECONDS;

    err_code = sd_ble_gap_adv_start(&adv_params, APP_BLE_CONN_CFG_TAG);
    APP_ERROR_CHECK(err_code);

    Regards

    Honey

  • Hello Honey,

    Thanks for your response.

    As per your i have modified and its working but without the Name .

    Its showing the N/A as in the screenshot below.

    So what changes are required so that it will advertise with name..?

    Waiting for your valuable response.

    Regards

    Rohit

Reply
  • Hello Honey,

    Thanks for your response.

    As per your i have modified and its working but without the Name .

    Its showing the N/A as in the screenshot below.

    So what changes are required so that it will advertise with name..?

    Waiting for your valuable response.

    Regards

    Rohit

Children
  • Hi Rohit,

    I used your main.c file to build the project and it is is working. The only difference is that i don't have your bsp file and i commented that section.

    Please compare the code.

    I think one of your button handler might causing the problem.

    Regards

    Honey

  • Ok thanks for valuable response.

    I will check with button handler what is issue.

    Again thanks.

    Regards,

    Rohit