Firmware Update Fails



  • Hello @szatmari60, if you get an REPL prompt using USB, then the basic communication works. Do you know, which interface is used for the REPL prompt. The same is needed for the update. The updater changed in that it fetches the image directly from the Pycom web site during update. So be sure that a connection is possible. I do not know whether mike632t finally succeeded. The was no response during the last three days. If you look in the board for the downgrade instructions, you'll see a method to upload the file locally. From these instructions you can easily guess the names of the most recent files, which are available too.



  • I have the same issue with two WiPy 2.0 boards ,
    ( (sysname='WiPy', nodename='WiPy', release='1.6.3.b1', version='v1.8.6-463-g468b9d27 on 2017-02-16', machine='WiPy with ESP32')
    and
    (sysname='WiPy', nodename='WiPy', release='1.6.3.b1', version='v1.8.6-463-g468b9d27 on 2017-02-16', machine='WiPy with ESP32') ) ,
    the the first one I manage to upgrade maybe a month ago !
    I can connect to my boards using FTDI , I am a linux user, except this issue everything is OK!

    The updater fails to connect and throw an error : "Something failed trying to connect to the device"
    Can anybody help ...



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



  • 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.



  • @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..



  • @livius thanks :)



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



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



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



  • @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.



  • 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!)


  • @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



  • @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.



  • @mike632t

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



  • @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.



  • 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?



  • @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.



  • 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#
    


  • 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...



  • 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...



Pycom on Twitter