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

Confusion about new style of manufacturer specific data updating

Hi,

I have a project which was originally written using SDK12, and have updated it to SDK16, I am sorry I know this question seems to have been asked in many different ways already.

I have one problem left.

I need to dynamically update manufacture specific data for the advertisement, and the code below used to work fine.

I know things have changed now and I have to use the ble_advdata_encode function, but it is not clear how exactly and I cannot find any direct examples.

The searched turn up hundreds of results from the forum which are all slightly different, some use ble_advertising_init, others sd_ble_gap_adv_start and a ton inbetweeners.

The migration guide is also not clear on the matter.

I am using short names and fast advertising, I previously had the following init function and an update function - could someone indicate to me, or point me to a proper example of how I can change this code from SDK12 style to SDK16 and achieve exactly the same result with as little change as possible?

I think I have to continue to use the ble_advertising_init due to the fast advertising options, I would also prefer not to have to stop and start the advertisement every time I want to update it (i believe I will also have to update the interval times as per the change of units mentioned in the migration guide)

Many thanks