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

Advertising Manufacturer data wrong after connect->disconnect

I implemented  manufacturer specific advertising to transmit important data without having to connect to the ble peripheral. These data can change over time so I need to be able to update them.

I adapted advertising_init. I also programmed a function to update the advertising data: the latter stops advertising, calls ble_advdata_set and then restarts advertising

All of this works fine until I connect to the peripheral using nrf-connect. After I disconnect, the manufacturer specific part of the advertising packet is wrong.

Shall I call ble_advdata_set again after disconnect and if so where is the best place to do it ?

I am using sdk 14.2 and the softdevice 132

Thanks in advance,

Christian

Parents
  • Hi!

    So the advertising is stopped when you establish a connection. And it seems that when you disconnect and your application receives the disconnection event, the advertising is restarted using the original advertisment data.

    I would take a look at how the disconnection event is handled, and make sure that the advertisment is started using the correct data.

    Also, as a side note; When posting a question on devzone, it is often easier to help solve your issue when information about which SDK, device, softdevice etc. is included in the question.

    Let me know if you have any further questions.

    Best regards,
    Joakim.

Reply
  • Hi!

    So the advertising is stopped when you establish a connection. And it seems that when you disconnect and your application receives the disconnection event, the advertising is restarted using the original advertisment data.

    I would take a look at how the disconnection event is handled, and make sure that the advertisment is started using the correct data.

    Also, as a side note; When posting a question on devzone, it is often easier to help solve your issue when information about which SDK, device, softdevice etc. is included in the question.

    Let me know if you have any further questions.

    Best regards,
    Joakim.

Children
No Data
Related