The manufacture data in the Ble advertisement was abnormal.

example:ble_app_uart + secure_bootloader
sdk:17.1

hello.
Well, a strange phenomenon occurred when I was testing the connection between our ble device and the app。

Our app uses p_manuf_specific_data to identify whether to connect.

So we call advertising_init () first and then call  ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST)
to start advertisment.



Then we change the value of m_manuf_specific_data.company_identifier during program work by calling LL_BLE_SetManu(0x0d0d) or LL_BLE_SetManu(0x0f0f)

As a result, all of them are working properly. But when I reboot the device, the company_identifier changes in a strange way.

When I boot up normally, call advertising_init () first, then call LL_BLE_SetManu(0x0d0d) .company_identifier will be setting to 0x0d0d finally.
At this time, I turned the device off for entering sleep, and then turned it back on, so that he called advertising_init () first, and then called LL_BLE_SetManu(0x0f0f) .

company_identifier will change as strange as in the video,I don't know why 0x0d0d appears and don't want it to appear, will the adv data be stored in flash?

What can I do to prevent 0x0d0d from reconnecting my device to my app?


Looking forward to your reply. Thank you

Parents
  • Hi,

    When I boot up normally, call advertising_init () first, then call LL_BLE_SetManu(0x0d0d) .company_identifier will be setting to 0x0d0d finally.
    At this time, I turned the device off for entering sleep, and then turned it back on, so that he called advertising_init () first, and then called LL_BLE_SetManu(0x0f0f) .

    company_identifier will change as strange as in the video,I don't know why 0x0d0d appears and don't want it to appear, will the adv data be stored in flash?

    What can I do to prevent 0x0d0d from reconnecting my device to my app?

    I don't get it, wouldn't you expect 0x0d0d to be set when it does a reset? You say that you set 0x0d0d initially after a reboot, so that it appears would be expected? 

    adv data will not be stored in flash unless you set it explicitly. 

    regards

    Jared 

  • Hi Jared.

    At this time, I turned the device off for entering sleep, and then turned it back on, so that he called advertising_init () first, and then called LL_BLE_SetManu(0x0f0f) .

    I mean: why does 0x0d0d appear? The right change should be 0x0101 (call advertising_init () )first,then be 0x0f0f(call LL_BLE_SetManu(0x0f0f) ).

    0x0d0d should not appear in the beginning,it's not the company_identifier I wanted.
    I didn't call 0x0d0d the second time I started, but it came up and it confused me

    best regard
    kenyon

  • Yes, but when it wakes up from system off sleep it will do a power on reset, on what condition do you set 0x0d0d versus 0x0f0f. Based on your diagram it looks like it's depending on if the program goes to system off sleep first. But how do you check if the program has woken up from system off sleep in your application? 

    What I'm trying to say is that wake up from system off sleep will always result in a power on reset. Therefore the program will start from the beginning each time you wake it up, unless you have some non volatile variable that you set that can tell the program that it woke up from system off sleep. 

  • Hi Jared.
    I'm sorry I'm a little confused about what you're saying.
    What would you like me to clarify for you?

    Best regard
    Kenyon

  • Hi Kenyon,

    Can you share your project, I think that would clear the confusion. 

    Then I can try to understand why 0x0d0d is set instead of 0x0f0f when you wakeup from sleep,

    regards

    Jared 

  • Hi Jared
    Right.Please give me some time, because the project involves some private code. I'll send you the minimum code.

    regards
    Kenyon

  • Hi,

    That would be perfect, 

    Thanks,

    regards

    Jared

Reply Children
Related