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

ble_debug_assert_handler on advertising restart

Hi everyone. I have a strange problem. As we all know, there's a bug in SDK8.0.0 that dont allows to infinite advertising. To work this around i set advertising interval to maximum value and tried to restart advertising when handling advertising timeout event. Unfortunately, everytime this event occurs, function sd_ble_gap_adv_start is called and return success, but after a moment my program gets stuck in ble_debug_assert_handler. I got annoyed by this and I commented out infinite loop in assert handler and everything appears to be working. What may be the reason of calling assert handler? I dont event know what code should I show you, as there was no difference when I was using ble_advertising_start from BLE Advertising library and when I called sd_ble_gap_adv_start with params filled by hand.

Parents
  • Of course I didn't intended to leave this hack in release. I was just curious, what will happen. Now I'm looking for proper solution. In my assert handler, fields of file name and line number are empty. I've just got error code 0x3002 and I dont know what does it mean. I'll try to set advertising to infinite, but I'm pretty sure it won't work in my SDK version, beacause there was a bug. I reported it here in devzone and was advised to restart advertising instead. I know it was fixed in next SDK release but at this point I cant update it in my project. Thank you for your response.

Reply
  • Of course I didn't intended to leave this hack in release. I was just curious, what will happen. Now I'm looking for proper solution. In my assert handler, fields of file name and line number are empty. I've just got error code 0x3002 and I dont know what does it mean. I'll try to set advertising to infinite, but I'm pretty sure it won't work in my SDK version, beacause there was a bug. I reported it here in devzone and was advised to restart advertising instead. I know it was fixed in next SDK release but at this point I cant update it in my project. Thank you for your response.

Children
No Data
Related