4 posts / 0 new
Last post
Alex Luo
Offline
Last seen:1 year 3 months ago
Expert
加入:2014-02-28 19:16
Advertising problem...

Hello support team and everyone,

I have met some problem with advertising, that is very difficult to happen and difficult to reproduce, but it's more important for my applications.

When my board was powered, now advertising can be scanned, but one of the LED indicator is on which means the MCU is working. When we push a IO for trigger soft-rest (it's for our test use), the advertising came and works normally. Could you please advise: the initial issue? BLE stack issue or setup issue? I used SDK3.0.8, sample128.

By the way, how to know if there is no advertising? If it can be detected by DA14580 itself, it will be helpful and I can re-start advertising or reset automatically.

请建议或分享你的雄厚ce.

Thanks!

Device:
MT_dialog
Offline
Last seen:1 month 4 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Alex Luo,

Hi Alex Luo,

I dont quite undestand your problem, when you boot your board you cant see your device advertising but you can see that the MCU is working due to a led indication (meaning that your firmware is running), but when you make a software reset you can see the advertising events. If that is the case there is no apparent reason for this, can you debug your code and check if the app_adv_start is executing when the device is booted for the first time. Know regarding your second question i suppose that you can check if there is BLE activity perhaps by checking last ble event (try to check with this function last_ble_evt arch_last_rwble_evt_get(void) ) also to make sure that there is ble advertising activity you can check the state of your application (i.e. that you application is in connectable state). Also if it is possible you might want to try your code with a copy from the latest SDK (5).

Thanks MT_dialog

Alex Luo
Offline
Last seen:1 year 3 months ago
Expert
加入:2014-02-28 19:16
Thanks MT.

Thanks MT.

For the advertising problem, I just doubt there may be something wrong the code --> the app_adv_start can't work somehow when the chip was boot up sometimes. It happened for only once we found and a couple customer feedback like that. We have released this code for more than 1K units a year.

After software reset, it works again --> I think that is normal flow to work and the app_adv_start was get called. For app_adv_start, I didn't change anything from SDK3.0.8 so I don't have any clue why no advertising after boot-up. For the case, I enabled Ext_sleep_mode, and I'm not sure if the ext_sleep_mode affect the adverting just after boot-up. Hope you can give me more clues about it.

For 2nd question, I will check how to use the function last_ble_evt arch_last_rwble_evt_get(void) ). Can I set a timer to check this event and how can I know there is not advertising all the time for a period? I don't care about the connection state, but I want to know no advertising at idle state. Can you advise more?
==> Just searched the function of last_ble_evt arch_last_rwble_evt_get(void), but I can't find it from my project. Can you give me more info about it?

Thanks
Alex

.

MT_dialog
Offline
Last seen:1 month 4 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Alex Luo,

Hi Alex Luo,

The arch_last_rwble_evt_get() will return the last event that the ble performed transmition, reception etc. I suppose that you can use this in order to find out if your device has some BLE activity or not. The function in previous SDK's was called app_last_rwble_evt_get(), and you can check if there isn't a BLE_EVT_RX.

Thanks MT_dialog