Cannot upgrade firmware : timeout



  • Hello there,

    I wanted to upgrade my SiPy firmware and downloaded version 1.1.4.b1 (from https://software.pycom.io/findupgrade?product=pycom-firmware-updater&type=all&platform=unix&redirect=true).
    When running python lopyupdate.py I encounter the following stack (and spinner endlessly spins):

    Traceback (most recent call last):
      File "./lopyupdate.py", line 95, in __after
        callback(result, param)
      File "./lopyupdate.py", line 194, in <lambda>
        return self.__read_mac({'port': port, 'speed': speed, 'pypic': pypic}, lambda res,req: callback(res))
      File "./lopyupdate.py", line 771, in __read_mac_callback
        w_mac = npy.read_mac()
      File "/path/to/pyupgrade/bin/updater.py", line 133, in read_mac
        return self.esp.read_mac()
      File "/path/to/pyupgrade/bin/esptool.py", line 903, in read_mac
        words = [self.read_efuse(2), self.read_efuse(1)]
      File "/path/to/pyupgrade/bin/esptool.py", line 894, in read_efuse
        return self.read_reg(self.EFUSE_REG_BASE + (4 * n))
      File "/path/to/pyupgrade/bin/esptool.py", line 339, in read_reg
        val, data = self.command(self.ESP_READ_REG, struct.pack('<I', addr))
      File "/path/to/pyupgrade/bin/esptool.py", line 237, in command
        p = self.read()
      File "/path/to/pyupgrade/bin/esptool.py", line 203, in read
        return next(self._slip_reader)
      File "/path/to/pyupgrade/bin/esptool.py", line 1382, in slip_reader
        raise FatalError("Timed out waiting for packet %s" % ("header" if partial_packet is None else "content"))
    bin.esptool.FatalError: Timed out waiting for packet content
    

    I not always have this, it sometimes fails w/: this error (I cannot copy text ;( and I'm too lazy to copy text (and possibly do typos))

    I find this error and only find an old post related to windows 7 vs. windows 10.

    When cat /dev/ttyACM0 and hitting reset on SiPy board i have:

    ets Jun  8 2016 00:22:57
    
    rst:0x1 (POWERON_RESET),boot:0x7 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
    waiting for download
    

    More info:

    # python -c 'import os; print(os.uname())'
    ('Linux', 'marto', '4.9.0-4-amd64', '#1 SMP Debian 4.9.65-3 (2017-12-03)', 'x86_64')
    # dpkg -l python-serial
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                         Version             Architecture        Description
    +++-============================-===================-===================-=============================================================
    ii  python-serial                3.2.1-1             all                 pyserial - module encapsulating access for the serial port
    

    Thanks,

    Marc.



  • @marto Hi thanks for pointing that you, you are correct the updater tool only shows instructions for the expansion board at the moment. I have passed this on and it should hopefully be changed soon. I will now remove the text about carefully reading the updater instructions because that clearly caused confusion.

    I will also pass on your OS details so make sure it gets investigated at the same time as the Mac OS issues.



  • @seb
    As shown in the report:

    ('Linux', 'marto', '4.9.0-4-amd64', '#1 SMP Debian 4.9.65-3 (2017-12-03)', 'x86_64')
    

    i.e. GNU/Linux debian 9.0 (stretch).

    Regarding the doc, my bad for not clicking on the 'Pytrack/Pysense' option for upgrade, I sticked to Expansion Board 2.0, and did not even read it since it's written: "The instructions given by the updater tool should be followed carefully. "

    Bumping the doc in the GUI would help. Maybe the culprit is the wrong the Pytrack detection (as seen it in case of error).



  • @marto What operating system are you using? We are aware of the updates taking several tries on mac os and it is on our to do list to investigate. As for the docs, I recently added such a note, apologies it wasn't there when you tried to do the procedure.



  • @seb
    Regarding the pytrack update, IIRC, the upgrade process first:

    • failed at 96%
    • then failed again at 96 %
    • then succeeded at 100%

    Regarding the SiPy update, I expected a warning at least in the doc and on the GUI, mentioning that the extension board should be upgraded first.



  • @marto What was it about the pytrack upgrade process that you had difficulties with? We are always looking to improve our products and documentation so any feedback is welcome.



  • After two days of debugging it comes that upgrading the pytrack firmware (from version 0.0.4 to 0.0.8, which was not smooth either) fixed the SiPy firmware upgrade issue.



  • @robert-hh

    Yes, I am running linux (debian). For the privileges, it seems ok to me since:

    • I can connect on /dev/ttyACM0 (the same that I use for the connection)
    • I am in dialout group and device /dev/ttyACM0 is crw-rw---- 1 root dialout 166, 0 Dec 20 12:58 /dev/ttyACM0
    • ModemManager is not running

    Albeit I dislike running sudo, I tested upgrade as advised and got the same behavior (i.e. timeout).



  • @marto Try to sort out a privilege problem by running update with sudo. If that works, add your user name to the dialout group. And yes, uninstall the Linux modem manager (if you are using Linux).



Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter