Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Flashing from MOS webpage fails very often

MrZANEMrZANE Sweden
edited August 12 in Mongoose OS

Hi.
Most of the time when I try to upload a new firmware from the MOS web interface the MOS tool seems to have an internal struggle over whom should use the COM interface, the MOS standard GUI process or the flashing process.
This can sometimes be resolved by reloading the webpage but most of the times it forces me to disconnect and then reconnect the USB cable and reload the page. After that I quickly press flash and it works most of the time.
The mos.ex was downloaded yesterday(2017-08-11) so it's quite new.
Would be very grateful if you could fix this annoyance in your otherwise great tool.
Kind regards
Jimmy

Here are some logs when it goes wrong:

Aug 12 12:53:27.274] E0812 12:53:27.274651 14576 ui.go:489] Calling: Sys.GetInfo
[Aug 12 12:53:27.541] E0812 12:53:27.541743 14576 ui.go:515] Call complete, success
[Aug 12 12:53:29.253] Loaded AWS-test-1.13/esp32 version 1.0 (20170812-105246/???)
[Aug 12 12:53:29.259] Opening COM4 @ 115200...
[Aug 12 12:53:29.261] Connecting to ESP32 ROM, attempt 1 of 10...
[Aug 12 12:53:31.080] Connected
[Aug 12 12:53:31.080] Running flasher @ 460800...
[Aug 12 12:53:31.566] Flasher is running
[Aug 12 12:53:31.568] Flash size: 4194304, params: 0x0220 (dio,32m,40m)
[Aug 12 12:53:31.574] Deduping...
[Aug 12 12:53:31.595] 18224 @ 0x1000 -> 0
[Aug 12 12:53:31.601] 3072 @ 0x8000 -> 0
[Aug 12 12:53:31.620] 16384 @ 0x9000 -> 8192
[Aug 12 12:53:36.443] E0812 12:53:36.443865 14576 ui.go:489] Calling: Sys.GetInfo
[Aug 12 12:53:41.475] E0812 12:53:41.475347 14576 ui.go:513] Call complete, error: context deadline exceeded
[Aug 12 12:53:41.475] E0812 12:53:41.475347 14576 reconnect_wrapper.go:72] [reconnectWrapperCodec to COM4; connecting...] Connection closed

or sometimes:

[Aug 12 13:28:37.967] Firmware saved to build\fw.zip
[Aug 12 13:28:41.243] E0812 13:28:41.243232 11284 reconnect_wrapper.go:72] [reconnectWrapperCodec to COM4; connected] Connection closed
[Aug 12 13:28:42.747] Loaded AWS-test-1.13/esp32 version 1.0 (20170812-112831/???)
[Aug 12 13:28:42.747] Opening COM4 @ 115200...
[Aug 12 13:28:42.749] Connecting to ESP32 ROM, attempt 1 of 10...
[Aug 12 13:28:44.568] Connected
[Aug 12 13:28:44.568] Running flasher @ 460800...
[Aug 12 13:28:45.108] Flasher is running
[Aug 12 13:28:45.111] Flash size: 4194304, params: 0x0220 (dio,32m,40m)
[Aug 12 13:28:45.121] Deduping...
[Aug 12 13:28:49.182] E0812 13:28:49.182030 11284 ui.go:489] Calling: Sys.GetInfo
[Aug 12 13:28:49.182] E0812 13:28:49.182530 11284 ui.go:489] Calling: Sys.GetInfo
[Aug 12 13:28:54.404] E0812 13:28:54.403792 11284 ui.go:513] Call complete, error: context deadline exceeded
[Aug 12 13:28:54.404] E0812 13:28:54.403792 11284 reconnect_wrapper.go:72] [reconnectWrapperCodec to COM4; connecting...] Connection closed
[Aug 12 13:28:54.404] E0812 13:28:54.403792 11284 ui.go:513] Call complete, error: context deadline exceeded
[Aug 12 13:28:57.445] E0812 13:28:57.445035 11284 ui.go:489] Calling: Sys.GetInfo
[Aug 12 13:28:57.446] E0812 13:28:57.445035 11284 ui.go:489] Calling: Sys.GetInfo
[Aug 12 13:29:02.668] E0812 13:29:02.668877 11284 ui.go:513] Call complete, error: context deadline exceeded
[Aug 12 13:29:02.675] E0812 13:29:02.671353 11284 ui.go:513] Call complete, error: context deadline exceeded
[Aug 12 13:29:02.682] E0812 13:29:02.668877 11284 reconnect_wrapper.go:72] [reconnectWrapperCodec to COM4; connecting...] Connection closed

Comments

  • SergeySergey Dublin, Ireland

    Thanks.

    Just to confirm, what board are you using?
    Could you make an animated gif (using giphy, for example) that demonstrates the problem, please?

  • MrZANEMrZANE Sweden

    Hi.
    I can't currently do the GIF, as I'm at work but the board is this:
    https://www.olimex.com/Products/IoT/ESP32-EVB/open-source-hardware

  • SergeySergey Dublin, Ireland
    edited August 15

    Ah, yeah, we've seen that too on that board.
    We see some flakiness in the UART signal, maybe due to the interference. That causes frequent failures.
    Do you have any other ESP32 board to compare?

  • MrZANEMrZANE Sweden

    I can now confirm that it is indeed related to this board.
    Using a LoLin32 I've never had this problem.
    With that said I would be grateful if anyone would post here if they found a workaround for this issue.
    I'm having a look at the hardware when I can find the time and see if there is anything that can be done but worse case it's the CH340 driver and then there is nothing to be done
    (Except modding the hell out of the board of course ;-)

  • huskyhusky Salamanca

    Hi!
    I have the same problem, but I can flash a small example in this board, with Arduino IDE. My problem is when I use mos flash.

    mos --logtostderr --esp-baud-rate=115200 flash
    Loaded Example/esp32 version 1.6 (20171018-151434/???)
    I1018 18:25:52.274763    4205 ourutil.go:18] Loaded Example/esp32 version 1.6 (20171018-151434/???)
    Using port /dev/cu.wchusbserial1420
    I1018 18:25:52.275277    4205 ourutil.go:18] Using port /dev/cu.wchusbserial1420
    I1018 18:25:52.275297    4205 flash_params.go:104]  -> -1, -1, -1
    Opening /dev/cu.wchusbserial1420 @ 115200...
    I1018 18:25:52.275317    4205 report.go:13] Opening /dev/cu.wchusbserial1420 @ 115200...
    Connecting to ESP32 ROM, attempt 1 of 10...
    I1018 18:25:52.321328    4205 report.go:13] Connecting to ESP32 ROM, attempt 1 of 10...
      Connected
    I1018 18:25:54.201320    4205 report.go:13]   Connected
    Running flasher @ 115200...
    I1018 18:25:54.201439    4205 report.go:13] Running flasher @ 115200...
    I1018 18:25:55.585553    4205 main.go:241] Error: /Users/mos/go/src/cesanta.com/mos/flash/esp/flasher/flasher_client.go:233: flasher did not respond
    /Users/mos/go/src/cesanta.com/mos/flash/esp/flasher/flasher_client.go:95: failed to talk to flasher
    /Users/mos/go/src/cesanta.com/mos/flash/esp/flasher/flasher_client.go:67:
    /Users/mos/go/src/cesanta.com/mos/flash/esp/flasher/common.go:65: failed to run flasher
    /Users/mos/go/src/cesanta.com/mos/flash/esp/flasher/flash.go:43:
    /Users/mos/go/src/cesanta.com/mos/flash.go:142:
    /Users/mos/go/src/cesanta.com/mos/main.go:137:
    Error: failed to run flasher: failed to talk to flasher: flasher did not respond

    Kind regards.

    Carlos.

Sign In or Register to comment.