WICED Sense board stops advertising after first few advertising events

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

cross mob
Anonymous
Not applicable

Hi,

So I've just started experiencing this issue where the Sense board will only advertise 4 (sometimes 5) times before stopping when powered by the battery. No matter what code or project is run, it will advertise then stop. However if powered by USB and then a button is pressed, it works normally even though the button interrupts only print some simple text. I have three devices, one which works normally, and two which are showing this behaviour while transmitting. Is this a hardware issue and is there some way to reset to fix this?

0 Likes
1 Solution
Anonymous
Not applicable

I'm having a similar issue, my board doesn't function correctly when first programmed. The timer callbacks do not function and the gpio interrupt stops working after a few button presses. If I disconnect USB and connect a battery the device functions properly and continues to function even once reconnected to USB.

I just tried the workaround you suggested but it didn't work.The .cgs file you specified is overwritten on build. In order to change the "Crystal warm up time" setting I had to modify

"WICED-Smart-SDK\Wiced-Smart\tier2\brcm\mandatory\bld\20737\mandatory.cgs"

in order to have the change take effect.

After making the change it appears that my issue has been resolved; my timer callbacks appear to be working even when first programmed.

View solution in original post

0 Likes
18 Replies
Anonymous
Not applicable

Have you tried recovering the device? Sometimes when they get buggy I just recover the device, usually helps.

-Kevin

0 Likes
Anonymous
Not applicable

Yea I'd thought about that but all I could find was info on how to reset the Tag development board. I'm pretty sure I saw something about resetting the Sense boards but I can't find it now.

(Aside: I also forgot to mention I'm using blecm_startAdv() and have removed all the xxx_Discoverable functions so it should just be advertising all the time.)

0 Likes
Anonymous
Not applicable

WICED SENSE Kit BLOG

Scroll down and you should see the recover video and steps as well.

You can also try loading hello_sensor, hello_sensor has a stay connected option and should stay in low_undirected until you run out of battery

0 Likes
Anonymous
Not applicable

There was another user that reported a similar problem, but I think his was firmware related.  You might want to try the original firmware from the SDK just to double check.

wfilali

0 Likes
Anonymous
Not applicable

WICED SENSE Kit BLOG

Scroll down and you should see the recover video and steps as well.

Thanks!

You might want to try the original firmware from the SDK just to double check.

By original firmware do you mean examples like the WICED Sense app? I've given that one a try and it seems to behave the same way so I'll try your suggestion with the recovery.

0 Likes

Kevin was referring to the wiced_sense application that was included in the SDK. Execute the recovery procedures and download this applicaiton. You can also download the hello_sensor application onto your sense board too.

0 Likes
Anonymous
Not applicable

Here is the link to the fresh wiced sense firmware that we were talking about just in case you need it.  Might be a different version that in SDK 2.2.1, I believe it is the original firmware on a new WICED sense

WICED Sense SDK 2.1 Firmware.zip

-Kevin

0 Likes
Anonymous
Not applicable

I tried the recovery process but it didn't seem to work, the device still stops advertising after 4 advertising events and nothing is printed over UART. I did however manage to fix it by disabling device sleep altogether.

#include "devicelpm.h"

( in <app>_create() )

// Disable sleep to fix some devices not advertising as expected

devlpm_init();

devlpm_registerForLowPowerQueries(<DEVICE_NAME>_device_lpm_queriable, 0);


new function


UINT32 <DEVICE_NAME>_device_lpm_queriable(LowPowerModePollType type, UINT32 context)

{

    // Disable sleep.

    return 0;

}

Again, this only occurs on about half the WICED Sense boards that I have. The others work normally.

0 Likes
Anonymous
Not applicable

Hi whitephoenix92

The sleep denial did not work for my case, for a matter of cross verification, you can consider if you have bluetooth noise in your testing environment as I mentioned here :

Re: Why wiced sense advertising stop before completing durations ?

If you have something to capture all advertising from all sources, check if you do not have other sources colliding with yours.

Wassim

0 Likes
Anonymous
Not applicable

I have a generic Bluetooth dongle that can scan for all sources and I only see the one source from my WICED Sense which advertises four times and stops.

Edit: I've also tried the recovery solution mentioned.

0 Likes
Anonymous
Not applicable

Hi,

I checked again, and it is not a different source that is colliding but rather malformed advertising packets.

The packets corruptions showed the source address with a different one, but sometimes packets with this special address has the comment [malformed packet].

The detected source address of malformed packets is different from time to time as it is incorrectly detected.

whitephoenix92, did you cross check your solution of preventing sleep, if it is always effective ? I mean switch simply between return 0; and return ~0; and see if the reaction is different ? or removing the callback registration.

Wassim

0 Likes
Anonymous
Not applicable

Hi,

I edited my comment in

Re: Why wiced sense advertising stop before completing durations ?

I admit it is a bit confusing, note that in my case the colliding foreign packets are not always detected as good packets so most likely are discarded and not always reported to an application layer which make them invisible.

I also do not see them when my wiced_sense is not advertising !!!

To debug bluetooth someone have to make a tour around the working place and scan for potential advertisers

Wassim

0 Likes
Anonymous
Not applicable

Caleb,

Can you try the Crystal Warm Up Workaround in the .cgs file

ENTRY "PMU Crystal Warm up Time"

{

   "Crystal warm up time" = 5000

}

ENTRY "I2C Speed"

{

    "Speed" = "100 KHz"

}

See cgs file location here:

pastedImage_0.png

Thanks

JT

0 Likes
Anonymous
Not applicable

I'm having a similar issue, my board doesn't function correctly when first programmed. The timer callbacks do not function and the gpio interrupt stops working after a few button presses. If I disconnect USB and connect a battery the device functions properly and continues to function even once reconnected to USB.

I just tried the workaround you suggested but it didn't work.The .cgs file you specified is overwritten on build. In order to change the "Crystal warm up time" setting I had to modify

"WICED-Smart-SDK\Wiced-Smart\tier2\brcm\mandatory\bld\20737\mandatory.cgs"

in order to have the change take effect.

After making the change it appears that my issue has been resolved; my timer callbacks appear to be working even when first programmed.

0 Likes
Anonymous
Not applicable

Hi Aaron,

So when you just program the board you can actually use the app that you download but may not be as reliable.  Running it on a coincell or using the USB hack like you used is still the better way to go.

-Kevin

0 Likes
Anonymous
Not applicable

I usually leave the board connected to USB the entire time I'm developing.

Before I download new firmware I reset the BCM20737S using the reset button which puts it into bootloader mode if USB is connected.

I prefer to leave the board connected to USB because I can avoid having to reconnect my Tera Term session every time I upload new code. (Disconnecting the board from USB causes the COM port to be disconnected from Tera Term.)

Is this not a supported use case?

0 Likes
Anonymous
Not applicable

amclean

Are you using the WICED Sense right? Though there are ways to get debug traces on the WICED Sense, it is technically not supported which might cause you some problems.  Also I have never run the WICED Sense like that, I have always put the coin cell in and then connected the USB if I wanted USB power (I find it more reliable this way).

But based on what you say you are doing, doesn't sound like you are using the wiced sense kit.  Are you using a custom board?

-Kevin

0 Likes
Anonymous
Not applicable

I'm currently using a custom board but the HCI_UART and PUART are connected to the CP2105 identically to the sense board. I've primarily been using the puart library to send custom debug messages but sometimes I enable debug traces via PUART. So far I haven't seen any issues receiving traces using PUART and this issue does not seem to be influenced by it.

Since changing the "Crystal warm-up time" to 5000 in the mandatory.cgs file seems to have solved my problem it is probably related to the crystal's stability after programming.