-
Notifications
You must be signed in to change notification settings - Fork 165
OTA firmware update #5
Comments
I'm sorry for the lack of experience, but which tool of this repository I must use to create the appimg.bin? Thx. |
@Mungio Then follow the README in the esp32 folder https://github.com/pycom/pycom-micropython-sigfox/tree/master/esp32 The appimg.bin will be in the build/ folder. You will need to flash a version with the change above first via the usual GND-G23 method before the FTP will work! If you need help with these steps it's best to post in the forum. Many other members building custom images already. |
Hi, unfortunately this change doesn't work.
In other words OTA does not work |
Did you flash this custom image manually first, and then try OTA @Mungio ? You need to make the bootloader change and flash normally first. |
This is now fixed with: dd8a992 It required @jmarcelino tweak plus a few other fixes inside bootloader.c and updater.c @Mungio and @jmarcelino could you please try again and report back? :-) |
It seems to work, even if it failed on the first attempt. the only confusing thing is that on uploading the file ftp only once reported 226, which is OK, but most of the time 426, which is an error code. Nevertheless, the new code seems to be active. At least the embedded updated python scripts changed. |
@robert-hh which FTP client are you using? 426 is transfer aborted (might be a timeout). |
Both Linux command line ftp and Mozilla fireftp |
@danicampora It seems to fail after all data has been transferred and the checksum is being verified. I did not hook up wireshark yet to see, if the error is reported by the device. |
Using FileZilla everything works, but if I try to use a script, it fails. I think that the problem is that the "fs" area is large only 508K. |
@Mungio The OTA itself works, even I just get most of the time an error response from the ftp transfer after the file is tranferred. Using a script on your PC should not make a difference, as long as you transfer the image via the ftp protocol to /flash/sys/appimg.bin. The file is then NOT stored in the file system of the XxPy board. |
@robert-hh This is my code to download the file
But it fails when transfers about 500K. |
@Mungio |
@jmarcelino SInce OTA update is now implemented, the issue could be closed. |
Thanks Robert and Merry Christmas :-) |
Any you, Merry Christmas, Jose. |
* Update Jenkinsfile, update version for first 1.20.0 RC New device name on MacMini New version 1.20.0.rc0 * Updated Jenkinsfile, application.mk Build IDF libraries in esp-idf/examples/wifi/scan Copy libraries from esp-idf/examples/wifi/scan during MPY build * Update Jenkinsfile Set IDF path before building libraries Reduce MPY build to 2 parallel tasks Use -C <dir> parameter with make * Update Jenkinsfile Build both Base and Pybytes revision Build IDF libs in it's own task, same with git-tag * Update Jenkinsfile Set PATH for python3 executable Fix missing space for VARIANT * Update Jenkinsfile Build BASE variant only for now Fix parallel build for variants * Updated Makefile, Jenkinsfile, makepkg.sh Allow specifying BUILD_DIR in Makefile rather than using VARIANT specific build directory Use BUILD_DIR in Jenkinsfile to build different variants Pass BUILD_DIR to makepkg.sh as optional parameter * Updated gitignore, application.mk Pass build directory to makepkg.sh script * Update Jenkinsfile Fix missing forward slashes * Update Jenkinsfile Build both BASE and PYBYTES * Update makepkg.sh Fix build directory check * Update makepkg.sh Disable debug output
* Update Jenkinsfile, update version for first 1.20.0 RC New device name on MacMini New version 1.20.0.rc0 * Updated Jenkinsfile, application.mk Build IDF libraries in esp-idf/examples/wifi/scan Copy libraries from esp-idf/examples/wifi/scan during MPY build * Update Jenkinsfile Set IDF path before building libraries Reduce MPY build to 2 parallel tasks Use -C <dir> parameter with make * Update Jenkinsfile Build both Base and Pybytes revision Build IDF libs in it's own task, same with git-tag * Update Jenkinsfile Set PATH for python3 executable Fix missing space for VARIANT * Update Jenkinsfile Build BASE variant only for now Fix parallel build for variants * Updated Makefile, Jenkinsfile, makepkg.sh Allow specifying BUILD_DIR in Makefile rather than using VARIANT specific build directory Use BUILD_DIR in Jenkinsfile to build different variants Pass BUILD_DIR to makepkg.sh as optional parameter * Updated gitignore, application.mk Pass build directory to makepkg.sh script * Update Jenkinsfile Fix missing forward slashes * Update Jenkinsfile Build both BASE and PYBYTES * Update makepkg.sh Fix build directory check * Update makepkg.sh Disable debug output
Uh oh!
There was an error while loading. Please reload this page.
I was trying out the over-the-air (OTA) firmware update functionality and after a small tweak was surprised I could actually:
The only change I made was setting
#define IMG_SIZE (1536 * 1024)
in pycom-micropython-sigfox/esp32/bootloader/bootloader.h
(the 1536K is the actual size of the image, the old value 1024 overwrote the running code on SPI and cause very bad results)
I understand the size of the images and maybe the bootloader may not be fixed in stone yet but maybe this could work within minor versions?
The text was updated successfully, but these errors were encountered: