Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Failed to create advertising set (err -5) with Peripheral_Power_Profiling example

Hello,

I have a nRF5340-DK card that I want to test with the "Peripheral_Power_Profiling" example. I use the SDK v2.2.0 and VS Code for this. I didn't make any modification to the code, but I get the following error (print of the serial port :

*** Booting Zephyr OS build v3.2.99-ncs1 ***
Starting Bluetooth Power Profiling example
Reset from pin-reset
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fe8
I: data wra: 0, 0
I: No ID address. App must call settings_load()
W: opcode 0x2036 status 0x01
Failed to create advertising set (err -5)

I don't understand, the example worked at first, but after trying to modify the file "...\peripheral_power_profiling\child_image\hci_rpmsg.conf" I got this error that appeared. I tried to put the file back as original, and I also tried to uninstall completely the toolchain and nRF connect for desktop but without success. I still have the issue.

Do you have an idea of the problem?

Thank you and best regards,

Maxime

Parents Reply Children
  • Dear Hieu,

    It seems that our answers have crossed :) . Do you have an explanation for my last response ?

  • Dear Maxime,

    It is very odd that the those Kconfig's fix your issue, as the peripheral_power_profiling sample does not seem to rely on them to work.

    I cannot reproduce your initial issue on my end. However, while my sample built and works, I see that it runs well without the same two Kconfig.

    My best guess is that in your initial attempts, you only flashed the App Core after accidentally overwrote the Net Core with something wrong. Thus, the application always failed.

    In your recent attempt, you must have now writen a correct image to the Net Core, and thus things work.

    May I ask you to setup another unmodified application based on the peripheral_power_profiling sample, build, and erase and flash, making sure it was done for both cores?

    Hieu

  • Dear Hieu,

    You were right, it works. Thanks a lot for the help.

    Best regards,

    Maxime

  • It seems that the problem has reappeared, and that my only way to make it work again is to setup another unmodified application based on the peripheral_power_profiling sample, build, and erase and flash.

    What do you think about "making sure it was done for both cores?". How to check it? Just by looking in the terminal?

  • Dear Maxime,

    I'm sorry for the late follow up.

    Yes, looking at the terminal is one way to do it. You should see that the file being flashed is "merged_domains.hex."

    I initially thought that one could select the wrong line in the Build Configuration panel in the nRF Connect VS Code Extension, and it would only flash the Application Core. However, I double check and it is not the case. 

     

    It seems the only way to accidentally flash only the Application Core is by selecting specific hex file in <build folder>/zephyr.

    MaximeCharriere said:
    It seems that the problem has reappeared, and that my only way to make it work again is to setup another unmodified application based on the peripheral_power_profiling sample, build, and erase and flash.

    The symptom you describe here sound very very strange. Could you please reattempt with a different sample? I can recommend the Bluetooth: Beacon sample, or the Peripheral UART sample.

    If those works well, I think we should then closely examine your flashing steps.

    Best regards,

    Hieu

Related