7 Replies Latest reply on Feb 1, 2016 6:27 AM by pedson Branched from an earlier discussion.

    More WICED Sense Recovery Questions

      1) Does the recovery procedure mean the original application is installed or just that it is put in a state to accept new firmware?


      I have done the recovery procedure on two sensors because I was having trouble downloading firmware in general and after the IDE claimed success, neither appear to start up via the battery or do anything at all (no LED activity, do not appear in the iOS test app anymore)


      2) What is the magic sauce  in pushing the reset button to download firmware?


      Even though I know I have the UART correct because the recovery claims to succeed, I can not get anything to download.  It always says to press restart.  I have the board removed and connected via the USB cable, same as for recovery.  I have pressed it, held it, done the combination with the boot button like for recovery, done other combinations with the boot button, held while inserting the usb cable and pretty much every variation I can think of without success using


      WICED_SENSE-BCM920737TAG_Q32 download UART=COM7


      or similar for other examples I have tried.

        • 1. Re: More WICED Sense Recovery Questions


          Recovery returns the device to a known state, ready to be programmed.


          Check the battery or try powering via USB as describer here: WICED Sense Table of Contents



          Perhaps a better understanding of the boot sequence will help.


          From RESET, the boot sequence for the BCM2073XS series essentially follows the process defined below:


          Code in ROM executes and initializes the device processor, clock domains, peripherals, etc.



          The following checks then occur:



          Boot ROM checks EEPROM for a valid configuration

          And if not found

          Boot ROM then checks Serial Flash for a valid configuration


          If a valid configuration is found in either location and HCI_UART RX is NOT asserted, the Boot ROM will continue to load the rest of the configuration, patch and user application code.


          At this point, the part comes up in application mode running the previously programmed application.


          Note: In addition, if HCI_UART RX  is asserted, the part will still come up in programming mode, even though a valid configuration was found.



          If no valid configuration was found, the next step depends on whether the HCI_UART RX pin is asserted or not:


          • If HCI_UART RX  is asserted, the part enters recovery mode

          • If HCI_UART RX  is NOT asserted, the ROM will assume all default configuration settings and then boot up into download mode


          Again, WICED Sense was not really designed to be a development board, but the boot process and device on the kit responds in the same manner described above (albeit it is not nearly as predictable as our development board the TAG3).

          • 2. Re: More WICED Sense Recovery Questions

            I've been able to find a reliable way to download applicable images.  I've done the pwm example a few times now and thanks to the speaker I know it runs immediately while still connected via usb, and I tested all 3 batteries and it ran fine from all of them.


            And I can get wived-sense app to download now as well, however I still can not get the original sense application work.  Regardless of how it is powered there are no LEDs active and it isn't advertising, at least not according to the iOS app.


            I am using the wiced_sense in Apps that comes with v2.2.2 of the SDK.  Should be downloading a different version.  On the direct download page for the wicked_sense files the release notes seemed to suggest that the most current (2.1_1.3) is the same as what comes in Smart SDK v2.2.  Should I be using something else?  I did the crystal warmup change to 5000.

            • 3. Re: More WICED Sense Recovery Questions

              I managed to do both a "recover" and a "normal download" with the below make targets:


              1) wiced_sense-BCM920737TAG_Q32 recover UART=COMxx


              2) wiced_sense-BCM920737TAG_Q32 download BT_DEVICE_ADDRESS=7223A11874A2


              After (2), I was able to pair and connect to my android Wiced Sense app. Let me know if it helps.

              • 4. Re: More WICED Sense Recovery Questions

                Without the UART parameter (your #2) I get


                Detecting device...


                | No BCM20737 detected                                                                     |

                | 1. Verify the BCM20737 tag is connected _AND_ powered                                    |

                | 2. Verify SW2 and SW3 switches are towards Vusb and Vreg respectively and all SW4        |

                |     switches are set to ON                                                               |

                | 3. Press the reset button on the tag and retry                                           |

                |                                                                                          |

                | If this problem persists, the EEPROM on the tag may be corrupted                         |

                | Please see Appendix D in the Quick Start Guide for recovery instructions                 |



                Download failed. This version of the SDK only supports download to BCM20736A1 and BCM20737A1 devices


                Adding the UART parameter to your 2nd line (and the address) I can download, but still no LED activity, advertisement, pairing.


                I tried the glucose meter example and it actually shows up advertising in the sense demo app.  So overall, the units appear functional, but something about the actual sense app/code in the SDK seems unhappy with being reloaded.  Maybe I'll do a diff on the independent sense SDK download and what is in the IDE 2.2.2 download.

                • 5. Re: More WICED Sense Recovery Questions

                  Just to followup.


                  One device is now in a state where anytime I plug in the USB cable with the battery missing it accepts firmware downloads which is nice.  For the next update I just disconnect and reconnect the cable and it resets.  Pressing the reset button without disconnecting the cable works 70-80% of the time, so I decided to just close it back up and go with the cable method.


                  The other sense is not in that state.  I'm going to go through the various things I tried with the first one and hopefully figure out what happened.


                  Despite getting things to download, I was never able to get the wiced_sense app in the SDK itself to work.  I started fresh with the Bluetooth designer to create a new base app and slowly moved over the bluetooth and LED behavior.  I now have a functional wiced sense firmware image I can modify and that works with the default iOS app.  I haven't had time to try to determine what is different between then two, but it is something in the parts of the code generated by the designer (either something it does/doesn't do or does differently than the original app in the SDK that allows it to work) because I did not have to change anything in the parts that I did copy over for the sensors, gpio, and BT parts not provided by the designer.

                  • 6. Re: More WICED Sense Recovery Questions

                    Let's take a step back to the basic:


                    For recovery, one needs to:


                    i) open up casing,

                    ii) power the PCB via USB,

                    iii) perform the button presses, two of them,

                    iv) execute the "recovery" target.


                    For FW downloading, one needs to:


                    i) power the sealed Sense kit via USB,

                    ii) execute the "download" target.


                    1) Did you see the two USB-to-serial com ports in Device Manager?

                    2) Can you execute a "recovery" to both your Sense Kit?

                    3) Can you "download" the "wiced_sense" app onto your kit?


                    I'm using 2.2.2. and i haven't see any issue. Let us know what you get.

                    • 7. Re: More WICED Sense Recovery Questions

                      Hello BoonT_56

                      Yes to all.  At first I thought something was wrong with my setup in general as you suggest above, but I can download and have work any app in the sdk that I tried except wiced_sense to the sense


                      I stuck with tones and the glucose demo because it was easy to tell via sound or adv on iOS that the app was running, but a couple others I tried were fine too.


                      I started going back and forth trying to figure what was wrong with wiced_sense on mine, using tones or glucose as a control group that the basic infrastructure (download and run) were still working but never got the out of the box app to run.


                      Starting from scratch with a new app and bringing the functionality piece by piece worked.  Maybe i modified the original and didn't realize it, but everything i brought over to the new app to make it work I brought over unchanged so I don't think I modifield the original.


                      if I have time I may re-download the sdk and try on a different vm out of curiosity.   Buts it's fine, I'm running a customized version of the sense firmware now with a customized ios app which is what I wanted.