Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Firmware Update Fails

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy 2.0debianupdate failed
    41 Posts 7 Posters 20.9k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mike632t
      last edited by mike632t

      I am using a linux desktop (Debian (jessie) + python 2.7.9) without a wireless network interface.

      I can connect to my WiPy 2.0 using USB, but when trying to update the firmware the updater fails to connect after I select the device path and the speed. Am I right in guessing that the updater is trying to connect to the default IP address advertised by the WiPy (192.168.1.1)?

      I wouldn't worry about updating at this stage if it wasn't for the fact that I can connect to my wireless AP from the WiPy, but when trying to connect to my WiPy using ftp or telnet if I specified a username or password when setting up the server all incoming connections are rejected which doesn't seem right.

      print (os.uname())
      (sysname='ESP32', nodename='ESP32', release='0.9.0b', version='1f7bdfd on 2016-10-09', machine='WiPy with ESP32')

      Mike T.

      Mike T.

      1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh
        last edited by

        The updater uses USB for transferring the image. If you already had a REPL prompt though USB with simple tools like screen or picocom, the connection part should be OK.
        If not,

        • check the cable, the access rights (UDEV rules).
          In any case:
        • did you connect G23 and GND and pus reset afterwards?
        • check whether your PC has access to the Internet, because the image is retrieved on-the-fly during update.
        • try to reduce the speed.
        1 Reply Last reply Reply Quote 0
        • M Offline
          mike632t
          last edited by mike632t

          I was getting the error 'Something failed trying to connect to the device.' Taking a closer look at the script I could see that it called updater.py and if I tried to run the updater.py I got an error indecating I was missing a module.

          ./bin/updater.py --port /dev/ttyUSB0 --speed 115200
          Traceback (most recent call last):
            File "./bin/updater.py", line 10, in <module>
              from esptool import ESP32ROM
            File "~/pyupgrade/bin/esptool.py", line 25, in <module>
              import serial
          ImportError: No module named serial
          

          Installing python-serial fixed that problem

          apt-get install python-serial
          Reading package lists... Done
          Building dependency tree       
          Reading state information... Done
          Suggested packages:
            python-wxgtk3.0 python-wxgtk
          The following NEW packages will be installed:
            python-serial
          0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
          Need to get 66.6 kB of archives.
          After this operation, 413 kB of additional disk space will be used.
          Get:1 http://ftp.uk.debian.org/debian/ jessie/main python-serial all 2.6-1.1 [66.6 kB]
          Fetched 66.6 kB in 0s (233 kB/s)   
          Selecting previously unselected package python-serial.
          (Reading database ... 57684 files and directories currently installed.)
          Preparing to unpack .../python-serial_2.6-1.1_all.deb ...
          Unpacking python-serial (2.6-1.1) ...
          Setting up python-serial (2.6-1.1) ... 
          

          But I now get the error 'Something failed trying to contact the server.', both wget and curl are installed - and it seems to try to down load a file but the down load seem to fail almost immediately as the temporary file just contain a blank line and three zeros.

          cat tmpfile 
           <blank line>
          000#
          

          Not sure what to try next...

          Mike T.

          M 2 Replies Last reply Reply Quote 0
          • M Offline
            mike632t @mike632t
            last edited by

            I did trying to edit this post to delete 'I putitalicised text' but I just get the message
            'Error Post content was flagged as spam by Akismet.com' - sigh...

            Mike T.

            1 Reply Last reply Reply Quote 0
            • M Offline
              mike632t @mike632t
              last edited by mike632t

              The update script appears to be trying to retreive the file using the following command but it doesn't look like it is working - or do I have the latest firmware already?

              curl -sL -w \n%{http_code} -d {"wmac": "240AC4xxxxx", "toolversion": 67633794, "name": "wipy.wipy with esp32", "smac":[{"id": "", "type": "lpwan"}]} -H Content-Type: application/json https://software.pycom.io/device/insert
              n000n000n000n000n000n000n000n000n000#
              

              Mike T.

              L 1 Reply Last reply Reply Quote 0
              • L Offline
                livius @mike632t
                last edited by

                @mike632t
                No, updater tool did not check if you have version already it is because you can have version already but with some error - and you can reflash it once again with same version "fixed"

                your problem is that you use Linux - i am joking ;-)
                I know that this is not helpful but on Windows there are no problem with this at all.

                think about people first, then computers

                M 1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh
                  last edited by

                  Well, I never had any problem when using Linux, with both types of updaters. I would not even consider a second to use Windows for that task.
                  @mike632t: Do you use the most recent updater tool, and do you have access to the site, wget tries to get the image from?

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    mike632t @robert-hh
                    last edited by

                    @robert-hh
                    I used 'wget' to download the updater last night so I'm reasonably sure it is the current version.

                    The problem looks like the 'curl' command (see below). I did try connecting directly to my router (I normally connect from behind a firewall) but it makes no difference. Unfortunately I have no idea what the output means.

                    I'll try uninstalling 'curl' later which should force the updater to use 'wget' and see if that makes a difference.

                    Mike T.

                    Mike T.

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jmarcelino @mike632t
                      last edited by jmarcelino

                      @mike632t

                      In this thread @bucknall was mentioning a problem in the Linux updater, not sure if this related.

                      B 1 Reply Last reply Reply Quote 0
                      • M Offline
                        mike632t @livius
                        last edited by

                        @livius
                        LOL - I generally find that the problem with windows is windows :-) - unfortunately I have to use it at work.

                        I have not used Windows at home for years, I think I have an old XP box somewhere but drivers for the USB serial interface could be a problem...

                        Mike T.

                        Mike T.

                        L 1 Reply Last reply Reply Quote 0
                        • L Offline
                          livius @mike632t
                          last edited by

                          @mike632t
                          :) :) :)

                          For XP you can fiund drivers too - but on XP (laptop) i have UART TTL -> USB converter and work ok
                          I do not know if the same will be for drivers for expansion board

                          think about people first, then computers

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            bucknall @jmarcelino
                            last edited by

                            Thanks @jmarcelino!

                            I believe the Linux Firmware Updater should be working correctly now!

                            @mike632t I'd suggest a couple of things:

                            1. Ensure all the headers on the expansion board are connected
                            2. Try changing USB port on your computer
                            3. Do you have the jumper cable connected across pins GND and G23 on the expansion board? (I know it's been asked but this is normally the cause!)

                            Developer Evangelist - Pycom

                            M 1 Reply Last reply Reply Quote 0
                            • M Offline
                              mike632t @bucknall
                              last edited by

                              @bucknall

                              1. Yes they are
                              2. Tried that makes no difference
                              3. Yes and the initial serial communication to detect the type of device works.

                              Serial communication with the 'console' works on all the ports I've tried, and the script is able to communicate with the board to discover what type of device it is but it exits when it checks the contents of the temporary file that it tried to download from the web using curl.

                              Mike T.

                              Mike T.

                              B 1 Reply Last reply Reply Quote 0
                              • B Offline
                                bucknall @mike632t
                                last edited by

                                @mike632t Hmm odd, let me check this internally! Will get back to you ASAP!

                                Developer Evangelist - Pycom

                                M 1 Reply Last reply Reply Quote 0
                                • R Offline
                                  robmarkcole
                                  last edited by

                                  Is it possible to update without the USB? I only have wifi connection to my Wipy and using the iOS app failed..

                                  L 1 Reply Last reply Reply Quote 0
                                  • L Offline
                                    livius @robmarkcole
                                    last edited by

                                    @robmarkcole
                                    at this time no - only RS232 (or UART TTL -> USB converter)

                                    think about people first, then computers

                                    R 2 Replies Last reply Reply Quote 0
                                    • R Offline
                                      robmarkcole @livius
                                      last edited by

                                      @livius thanks :)

                                      1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        robmarkcole @livius
                                        last edited by

                                        @livius I saw a youtube video yesterday where the guy used a nodeMCU to provide the UDB-sserial connection for a Lopy, is there a guide? I have a nodeMCY (bricked), raspberry pi and a particle photon available..

                                        1 Reply Last reply Reply Quote 0
                                        • robert-hhR Offline
                                          robert-hh
                                          last edited by

                                          I would assume that they simply used the USB/Serial chip on the NondeMCU for that purpose, connecting RX-RX and TX-TX of the two devices. The nodemcu board has to be powered for that purpose. The problem is to get the TX pin of the NodeMCU to high impedance and have the NodeMCU to be silent. One guess would be to keep in in reset (pull reset low).
                                          A similar approach is sometimes told with an Arduino.

                                          R 1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            robmarkcole @robert-hh
                                            last edited by

                                            @robert-hh Thanks for the info, if I get it working I will make a post :)

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom