Issue with adv durations

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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.

0 Likes
1 Solution

I believe the fix is targeted for the next release of the SDK, which will occur sometime in Q215.

View solution in original post

0 Likes
5 Replies
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

madmax

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?

0 Likes
Anonymous
Not applicable

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

0 Likes

it seems that there is a bug in the app timer management.  we are looking at possible solution/workaround.

0 Likes
Anonymous
Not applicable

Any update on this ?

0 Likes

I believe the fix is targeted for the next release of the SDK, which will occur sometime in Q215.

0 Likes