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

changing manufacture data with time

Hi,

I would like to change the manufacturing data with time. My advertising_init function implements the following line 

init.advdata.p_manuf_specific_data = &manuf_data_response;

which attaches the manufacturing data initially. In my previous project in which the nrf51 module was used the  ble_advdata_set function was responsible for this purpose, but unfortunately, this does not work anymore. Can someone tell me what is the best solution for my problem in the case of nrf52 modules?

Best regards

Samo

  • Hello Samo,

    Which SDK and SoftDevice version are you using?
    Are you using the Advertising module?
    In that case, you could use the *_advdata_update() function. Be advised that you can not update the advdata currently in use with this function, you will have to have two instances and alternate between which instance is currently in use and which is next to be updated.
    Alternatively, you will have to stop the advertising, update the advertising data(manufacturing data), and then restart the advertising with the updated data.

    Please let me know if this does not resolve your issue,

    Best regards,
    Karl

  • Thanks for fast reply Karl. I use Softdevice s112 and SDK 16.0 which supports the Advertising module. I prefer your first suggestion I think that I understand your idea.

    Thanks for your help.

  • Hello,

    control said:
    Thanks for fast reply Karl.

    No problem at all, I am happy to help!

    control said:
    I use Softdevice s112

    Which version of the s112 SoftDevice are you using?

    control said:
    I prefer your first suggestion but I am not sure if I understand the idea correctly. Please let me know if the ble_advertising_init_t struct stays the same all the time? Can the first instance be sub-struct of ble_advertising_init_t (ble_advdata_t   advdata) and second, one additional ble_advdata_t struct or I have to make two additional ble_advdata_t structs? I will appreciate a more detailed explanation.

    You will need to have two instances of ble_gap_adv_data_t.
     
    The reason why the *_advdata_update function can not be provided with the same buffers that are already in use, since it uses the ble_gap_adv_set_configure function - which API Reference documentation reads:

            It is invalid to provide the same data buffers while advertising. To update advertising data, provide new advertising buffers.

    So in essence, when updating your advertising data you will need to alternate which ble_gap_adv_data_t struct that is being updated and given to the update function.

    Please do not hesitate to let me know if it should still be unclear, or if you should have any other questions.

    Best regards,
    Karl

Related