14580 as peripheral slave get connected and continue to advertise

6 posts / 0 new
Last post
alex
Offline
Last seen:2 years 4 months ago
加入:2014-08-20 03:39
14580 as peripheral slave get connected and continue to advertise

According to the doc "RW-BLE-CTRL-SW-FS_0", table 4-1 "role combinations", the conected slave can continue to be adviser or sanner.
We develop our code based on proximity fh. we found after 14580 getting connected by centrol(android), others(adroid) can not scan it anymore, which should mean 14580 stopped advertise. but in our application, we'd like it continue to advertise, what should we do?
谢谢你!

Keywords:
PY_Dialog
Offline
Last seen:2 years 8 months ago
Staff
加入:2014-08-25 09:59
Hi Alex,

Hi Alex,

For the moment we did not have multi-role supported. But for adviser during connected status is possible.
You need several steps:
1. add below line in APP_CONNECTION_FUNC()
gapm_env.connections = 0;
app_adv_start();
2. stop advertise in app_disconnect_func()
3. add below line in gapc_disconnet_ind_handler()
gapm_env.connections = 0;
4. resume advertise after advertising finished:
case GAPM_ADV_UNDIRECT:
{
//start advertise here
app_adv_start();
}
break;

Please also make sure there is no conflict with your application code in adv start and stop.

希望这次的帮助!

Regards!
PY

ggotta
Offline
Last seen:1 year 8 months ago
加入:2016-02-20 20:10
Hi,

Hi,
Does this works with SDK 5.0.3(ble_app_peripheral_580)? Please confirm.

--Gotta

MT_dialog
Offline
Last seen:1 week 6 days ago
Staff
加入:2015-06-08 11:34
Hi ggotta,

Hi ggotta,

Just tested on the ble_app_peripheral, yes it does work. Just follow the given instructions, you can also find some info in this FAQ.

http://support.dialog-semiconductor.com/faq-page#n790

Thanks MT_dialog

alex
Offline
Last seen:2 years 4 months ago
加入:2014-08-20 03:39
Great! It now works following

Great! It now works following your suggested steps.

BTW, I'd like to know more about the advertise, should be understanding correct?
app_adv_start() is to trigger a "session" of adv, it advertise for several times(how many times?) and will be stopped within BLE stack and trigger a CMD COMPLETE event(GAPM_ADV_UNDIRECT). normally customer code will trigger another adv session in app_adv_undirect_complete( ).

alex
Offline
Last seen:2 years 4 months ago
加入:2014-08-20 03:39
请关闭this ticket.

请关闭this ticket. Thanks!