- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello_client from SDK 2.1.0 was modified (code attached) to start advertising after pressing SW1 button (TAG3).
Also adv mode is printed every second.
After reboot (or pressing SW1) adv durations are consistent and match:
high_undirect_adv_duration
low_undirect_adv_duration
But after module gets connected and disconnected (WICED Smart Explorer app was used) the durations vary.
Solved! Go to Solution.
- Labels:
-
SDK 2.X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe the fix is targeted for the next release of the SDK, which will occur sometime in Q215.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please explain what does durations vary mean. If there is a problem, did you try unmodified hello_client, or the problem only happens with your version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before the module gets connected and disconnected the durations for high adv for each test (reboot or SW1 press) match:
high_undirect_adv_duration
(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)
{
BLEPROFILE_DB_PDU db_pdu;
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);
if (value&0x01)
{
bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, NULL);
adv_count = 0 ;
}
}
3. Calls to start scanning were removed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it seems that there is a bug in the app timer management. we are looking at possible solution/workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any update on this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe the fix is targeted for the next release of the SDK, which will occur sometime in Q215.