Before the module gets connected and disconnected the durations for high adv for each test (reboot or SW1 press) match:
(tested multiple times).
After the module gets connected and disconnected the high adv durations vary, here are the durations (in sec) for 5 tests:
13, 10, 7, 10, 10
high_undirect_adv_duration = 20
Similar effect was noticed with low adv.
Code was modified only to:
1. print current adv mode every sec:
void hello_client_timeout(UINT32 count)
ble_trace2("%02d:%s\r\n", ++adv_count, ble_discover_mode_str[bleprofile_GetDiscoverable()]) ;
2. start adv after pressing the button:
UINT32 hello_client_interrupt_handler(UINT32 value)
UINT8 u8 = 1;
BOOL button_pushed = value & 0x01;
static UINT32 button_pushed_time = 0;
ble_trace3("(INT)But1:%d But2:%d But3:%d\n", value&0x01, (value& 0x02) >> 1, (value & 0x04) >> 2);
adv_count = 0 ;
3. Calls to start scanning were removed
it seems that there is a bug in the app timer management. we are looking at possible solution/workaround.
Any update on this ?
I believe the fix is targeted for the next release of the SDK, which will occur sometime in Q215.