Cannot update firmware on LoPy, can connect in Pymakr but can't upload files, no ftp
I have not updated these LoPys in a while. They have firmware version 220.127.116.11b.
I downloaded the latest firmware updater (version 1.15.1[stable], I get the same error every time when attempting to update with the jumpers in the correct place (gnd and 23).
The firmware updater finds the LoPy on the correct port COM7. I tried High speed transfer, as well as every optional speed.
The error is:
Failed to connect to ESP32: Timed out waiting for packet header
I looked through the forum and tried to set safeboot in the pymakr.conf to
Since nobody else seems to be having this problem, I think it's something simple I am not doing correctly.
The Pymakr plugin connects with Atom (does not connect with VS Code) I can connect on COM7 and get a prompt.
I tried erasing the flash with
import os and recreating the '/flash'
It's been a while, but I looked over the documentation again but I can't get it to update.
Any help is greatly appreciated.
@ledbelly2142 I'm very glad that you found a way. The Expansion board 2 has no firmware. Only expansion board 3 has. If the other board you used was a model 3, it could have been caused by the firmware updater, requiring multiple resets. I faintly recall something like that.
Glad I'm not going crazy. I fixed it by using another expansion board. I remember having an issue like this a year or so ago, wish I remembered.
It seems one or two of the expansion boards I have will not update firmware with the firmware updater. Not sure what that could be on the expansion board (could be it's firmware...)
With the firmware update I was able to use Atom and the pymakr plugin to upload files on the LoPy and expansion board (that was not updating firmware).
Thanks @robert-hh !
@robert-hh Yes, I tried to reduce the baud rate. I started with the lowest and progressed up.
I have the daughter board to fix the deep sleep issue on the LoPy, I tried with and without, got the same results.
I will try again.
My gut is that it has something to do with the old firmware and/or settings.
I didn't see if there was a way to reset to factory defaults on the old LoPy. I thought reformatting the '/flash' did that. I may be wrong.
robert-hh last edited by robert-hh
@ledbelly2142 That should avoid other complications. Did you try to reduce the baud rate in the firmware updater? By default, it uses 921600 baud, which is sometimes too fast.
@robert-hh Expansion board 2
@ledbelly2142 What kind of interface board are you using? Expansion Board 2 or 3 or one of the sensor board. You need the jumper only with expansion board 2 or a genuine USB/UART bridge.
Thank you @robert-hh
I am have issues with both firmware updating as well as file uploads.
I think my main issue is with updating the firmware to the current version. I am connecting the jumper between GND and G23 for firmware upload. I reset after placing the jumper.
I did not check to get a message like the example above, e.g. "rst:0x1..." The USB cable should be ok since I can use the prompt, I tried with a couple of usb cables with the same result. I reduced the speed and tried every available speed, nothing worked.
I also checked to make sure the firmware updater is using python 2.7, everything seems good (though I have both python 3 and python 2.7 on my system). This might be a clue to why it's not working. Because I use python 3 on most things, my Win 10 system variables first point to python 3, but I checked with apm -version and it is appears to be associated with python 2.7.
I do get a prompt when connected with Atom and pymakr. The device(s) previous boot.py have wifi turned off for power savings, I cannot connect via wifi. I tried to reset with with the os.mk... to reformat the /flash but it had no effect. I think I need the updated firmware to be compatible with the modern environment.
What else can I do to update the firmware?
@ledbelly2142 Uploading firmware and uploading scripts are two different things.
1: Firmware upload: You need the jumper between GND and P2 (aka G23) only for Firmware upload. Don't forget to push reset after placing that jumper. The message:
"Failed to connect to ESP32: Timed out waiting for packet header" is related to firmware uploads. Since that is handled by the ESP ROM loader, it should work. You can verify that in the terminal emulator. When set upload mode, you should see a message like:
"rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download"
If in that state the download does not work, a) check the USB cable, and b) reduce the speed. If you have a REPL prompt over USB with 1.8.0, the the cable should be fine.
2: Software upload. Once the firmware is updated, it is in a state which Atom/Pymakr expects. And you can use also FTP for upload. Please be aware, that the default Ip address is 192.168.4.1, but your WiFi network may not use the IP range 192.168.4.x. In that case, the WIFi connection will not be established. You have to match the network IP ranges. For day-to-day operation, it is more convenient to use the STA mode of the xxPy and connect it to you default WiFi net.