10 Replies Latest reply on Aug 15, 2015 11:47 PM by userc_11062

    WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

      I am new to BCM20737 development (I have some previous experience with AVR-ISP and avrdude and bootloaders for Atmel chips, if that matters).


      I want to try out to build an app for the BCM9WICED_SENSE (nice-looking red device with a bunch of sensors) and for this I've installed WICED Smart SDK 2.1 for Ubuntu and fixed libperl.so.5.14 link, so now I am able to build projects. I've added wiced_sense from WICED Sense SDK under Apps and compiled it with

       

      ./make wiced_sense-BCM920737TAG_Q32 build


      I have two questions. First, is whether BCM920737TAG_Q32 is the right platform for the target device?


      The second one is that I can't find any instructions on how can I upload the program (of is it a module?) to the device via, say, USB. My guess is I should use cgs from under Tools, but what are the parameters and so on.

       

      The WICED sense device is visible under usb (that is, cp210x driver I've compiled to replace the one in the kernel is there). I guess, USB/UART chip is different from FTDI usually found with dev. board kits. Not sure, if it matters, but seemed relevant to mention.


      I would appreciate any links to manuals on the topic of getting the program to the device. I am aware there is Windows version of IDE and also OTA way. However, I am interested in doing it "old school" way, if possible.


      Thanks!



        • 1. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE
          VikramR_26

          [Munir] :I have two questions. First, is whether BCM920737TAG_Q32 is the right platform for the target device?

          [vik86] :Yes this is the right platform for the target device


          [Munir]:The second one is that I can't find any instructions on how can I upload the program (of is it a module?) to the device via, say, USB. My guess is I should use cgs from under Tools, but what are the parameters and so on.

          [vik86] : you can use the SDK to download the firmware to the wiced sense/ or terminal ./make wiced_sense-BCM920737TAG_Q32 download

           

          [Munir]: The WICED sense device is visible under usb (that is, cp210x driver I've compiled to replace the one in the kernel is there). I guess, USB/UART chip is different from FTDI usually found with dev. board kits. Not sure, if it matters, but seemed relevant to mention.

          [vik86] : the WICED Sense has the Silicon Lab UART chip , hence its not FTDI as you have rightly guessed. Hence you would need Silicon lab drivers ( USB to UART Bridge VCP Drivers | Silicon Labs)

          You can refer to this link for more details :WICED Sense Table of Contents


          thnx

          vik86

          1 of 1 people found this helpful
          • 2. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

            Hi, and thanks for the quick answer, which helped to go forward.

             

            The "download" command breaks with:

             

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

             

            More specifically, Detecting device... is causing trouble:

             

            WICED$ Tools/DetectAndId/Linux64/DetAndId -TRAN UART -IDFILE Platforms/BCM920737TAG_Q32/BCM20737A1_IDFILE.txt

            /dev/ttyS31     UNKNOWNTYPE   UNKNOWNID

            ...

            /dev/ttyS11     UNKNOWNTYPE   UNKNOWNID

            /dev/ttyS10     UNKNOWNTYPE   UNKNOWNID

            /dev/ttyUSB1     UNKNOWNTYPE   UNKNOWNID

            Segmentation fault (core dumped)

             

            I have this in the lsusb output:

             

            Bus 003 Device 006: ID 10c4:ea70 Cygnal Integrated Products, Inc. CP210x UART Bridge

             

            And relevant dmesg output is below:

             

            [163802.808000] usb 3-2: new full-speed USB device number 6 using xhci_hcd

            [163802.824000] usb 3-2: New USB device found, idVendor=10c4, idProduct=ea70

            [163802.824000] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=5

            [163802.824000] usb 3-2: Product: CP2105 Dual USB to UART Bridge Controller

            [163802.824000] usb 3-2: Manufacturer: Silicon Labs

            [163802.824000] usb 3-2: SerialNumber: 0035A266

            [163802.824000] cp210x 3-2:1.0: cp210x converter detected

            [163802.824000] usb 3-2: cp210x converter now attached to ttyUSB0

            [163802.824000] cp210x 3-2:1.1: cp210x converter detected

            [163802.824000] usb 3-2: cp210x converter now attached to ttyUSB1

            [163802.848000] cp210x ttyUSB1: failed to set baud rate to 300

            [163815.008000] cp210x ttyUSB1: failed to set baud rate to 300

            [164047.756000] DetAndId[31857]: segfault at 2afbbca2601c ip 00000000004116cd sp 00002afbbdc29d80 error 4 in DetAndId[400000+2f000]

             

            Contents of the Platforms/BCM920737TAG_Q32/BCM20737A1_IDFILE.txt is (without end of line):

            BCM20737A1  D21C  07

             

            (This is Dell Latitude, so there are a lot of other BCM chips inside, and one on the USB for Bluetooth, I guess: usb 1-1.4: Product: BCM20702A0, not sure if this matters though)

             

            Any hope?

             

            EDIT: no more core dump when running with privileges, but the all tty's are still UNKNOWNTYPE   UNKNOWNID.

            • 3. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE
              MichaelF_56

              The part appears to be stuck in Application mode.

               

              You need to either try holding the Wake button for three seconds and force it into programming mode that way, or take the plastic case off of the WICED Sense and hit the reset button that you will find inside.


              VikramR_26 jota_1939431

              • 4. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE
                ArvindS_76

                If you know which two virtual COM ports are assigned to the WICED Sense when you plug the device to your Linux machine, you can add UART=/dev/ttyXXX (try both ttyUSB1 and ttyUSB2) to your make command.

                1 of 1 people found this helpful
                • 5. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

                  Ok, thanks. I've got detection to work after trying to change portroot like this, plus sudo:

                  sudo $detect_and_id -TRAN UART -PORTROOT '/dev/ttyUSB#' -IDFILE $id_file

                   

                  As expected, this gave me:

                   

                  /dev/ttyUSB0         HCI   BCM20737A1

                   

                  Howerver, it's stuck at this now:

                   

                  Downloading application...

                  ****Download failed - Press the reset button on the device and retry ****

                   

                  Unlike on Windows machine, where downloading works about 90% of time, it does not under Linux.

                  Maybe, I missed some file permissions somewhere? (the user is in dialout group and ttyUSB* are root:dialout and rw-rw----)

                   

                  (Also tried to reset and to disconnect USB - the latter helped on Windows, but not on Ubuntu Linux)

                  • 6. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE
                    VikramR_26

                    Let me try to reproduce , shall let you know soon if I have a solution.

                     

                    thnx

                    vik86

                    • 7. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

                      I have the same issue on Ubuntu. Any fix by now?

                      • 8. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

                        VikramR_26 BoonT_56

                         

                        Tried another Ubuntu 12.04 with CP210X driver to 0.19 which can work. The new kernel 3.x.x can't work with the tab.

                        • 9. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

                          Still same in Ubuntu 14.4.

                          Got CP210x also. It seems like running.

                           

                          [95433.596431] usb 3-2: Product: CP2105 Dual USB to UART Bridge Controller

                          [95433.596433] usb 3-2: Manufacturer: Silicon Labs

                          [95433.596434] usb 3-2: SerialNumber: 0037386A

                          [95433.597345] cp210x 3-2:1.0: cp210x converter detected

                          [95433.597734] usb 3-2: cp210x converter now attached to ttyUSB0

                          [95433.598198] cp210x 3-2:1.1: cp210x converter detected

                          [95433.598737] usb 3-2: cp210x converter now attached to ttyUSB1

                          [95433.618364] cp210x ttyUSB1: failed to set baud rate to 300

                           

                          But I cannot download to tag within the reason below in SDK 2.2.0:

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

                          • 10. Re: WICED Smart SDK 2.1 (Ubuntu) and BCM9WICED_SENSE

                            What is interesting, download worked successfully several times yesterday with SDK 2.1 after compiling cp210x module from recent SDK 2.2. Not 100% of the time, but unlike last year, when there were no success at all. However, today it does not work any more (and last trials yesterday did not work), laptop reboot and consequent loading of cp210x module was not helpful. This may mean, that there are some non-deterministic factors or concurrency issues at play. (Ubuntu 14.4, kernel:

                            3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux )

                             

                            If this matter, the result of running gpio example (after adding unistd.h header file to the program):

                             

                            3.x.x# ./cp210x_gpio_example

                            CP210x Serial Test

                            original gpio = 400803

                            gpio = ffffffffbff7fcff

                            new gpio = ffffffffbff7fc00