4 Replies Latest reply on Jul 5, 2015 2:33 AM by userc_13286 Branched from an earlier discussion.

    Question about WICED Sense Android Pairing Work-Around

      Hi JT,


      Regarding the Android work-around you posted here: WICED Sense Android Pairing Work-Around


      First off, thanks for your workaround suggestion....

      is this issue still valid, are there any updates ?

      That workaround didn't work for my case,

      I am using a Galax S5.

      I can connect from the android application directly every time, but after at least two or three retries, and I figured out, that I have to start the phone connection (press connect button) at a very specific moment as soon as I wake the Tag, that gives more chances to succeed.


      I thought bluetooth is a standard to avoid such incompatibilities, do you have any hints if this is an Android issue, will be fixed in future versions of android, or if it is a Wiced sense, hardware, BLE stack or application issue, if then, it would be nice to know if any other Broadcom devkit has this issue solved ?

      Do you have any recommended advertising parameters duration or other setup that can help ?


      Thanks in advance.


        • 1. Re: Question about WICED Sense Android Pairing Work-Around

          Did you have a chance to upgrade the fw of the Sense using the latest version of the SDK (v2.2.1)?






          • 2. Re: Question about WICED Sense Android Pairing Work-Around

            Hi BoonT_56,


            Yes, I tried both :

            wiced_sense.c From WICED-Smart-SDK-2.2.1 (using the installed SDK 2.2.1 of course)


            wiced_sense.c From WICED_Sense_SDK 2.1_1.3Final (using the previous SDK)


            for the one from the 2.2.1 SDK, the only difference is the OTA undefined, and its characteristic that gets dynamic length, I don't see much how that can influence our issue, but I tried nevertheless, and if not better, I would say maybe worse. I gave it more than five retries without beeing able to connect, while with the previous, I manage to connect almost every time what I press the phone connection and the tag wake at the same time.


            How it looks like currently is that the wiced sense tag only accepts connection when requested very soon since the beginning of the broadcast, otherwise, the device become like deaf, only broadcasting advertising. For now I cannot say as Android is in the game as well.

            I'll continue debugging this and provide more details when available.


            • 3. Re: Question about WICED Sense Android Pairing Work-Around

              Hi userc_13286,


              I've been trying to replicate your issue on my GS6 running 5.1.1, however I have been able to connect to the wiced sense the first time using both the "Android workaround" and without the workaround. 


              However I do believe you are right in saying "the wiced sense tag only accepts connection when requested very soon." If you look at wiced_sense.c under the BLE_PROFILE_CFG, you are initially in NO_DISCOVERABLE (L320). Then in the wiced_sense_create, we call bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, wiced_sense_remote_addr) which starts high undirected advertisements which brings us back to our profile_cfg.  The duration for this high undirected adv is 10 secs, advertising at an interval of 32 bt slots => 0.02 seconds.  After 10 seconds, the device will then start low undirected adv for 10 secs at 1024 bt slots => 0.64 secs intervals.  After those 20 seconds of advertising, your device will enter deep sleep based on wiced_sense_advertisement_stopped().   


              One thing that may help is to increase the duration of high undirected adv to something longer than 10 seconds. 



              • 4. Re: Question about WICED Sense Android Pairing Work-Around

                Hi Kevin kwang,


                I appreciate your investigation, it is taking us there, although there are still some other considerations:

                - I will open another fork for one specific advertising issue I had, relative to the wiced sense.

                I'm a new user, didn't found the "branch button" so here is the link:Why wiced sense advertising stop before completing durations ?

                The advertisements that stops totally explain why the connection is only possible too early, I was talking about one to two seconds, I did multiple retries with increased duration to 30s+30s, that didn't help.

                - I still would keep this question open, as one issue never comes alone, but I still do believe that even if wiced sense sends the right advertisements at the right time, Android still have difficulties to connect.

                My next focus points regarding android will be to check if the connection request is sent, maybe too early or too late outside when the wiced sense is expecting it.