5 Replies Latest reply on Mar 4, 2015 12:19 PM by MichaelF_56

    Issue with adv durations

      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.

        • 1. Re: Issue with adv durations
          VictorZ_46

          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?

          • 2. Re: Issue with adv durations

            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

            • 3. Re: Issue with adv durations
              VictorZ_46

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

              • 4. Re: Issue with adv durations

                Any update on this ?

                • 5. Re: Issue with adv durations
                  MichaelF_56

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