Page 1 of 2

Updating a MicroPython Firmware

Posted: Wed May 25, 2022 9:24 am
by Firas_Baccouri
Hello,
I am working with MicroPython for almost one month now , and now I want to do something to update the MicroPython firmware , I mean for example after a period of time of developing the firmware on a customer board you want to update it so your customer don´t need to give you back the board to upload the new MicroPython fimware , So I am looking on how can I do this update , Do I need another python or C firmware to do that or should I use some software , I don´t have any idea about how it could be done .
Any help will be appreciated .

Thank you in advance .

Re: Updating a MicroPython Firmware

Posted: Wed May 25, 2022 11:09 am
by davef

Re: Updating a MicroPython Firmware

Posted: Fri Jul 29, 2022 7:51 am
by Firas_Baccouri
davef wrote:
Wed May 25, 2022 11:09 am
Which board?
Portenta H7

Re: Updating a MicroPython Firmware

Posted: Fri Jul 29, 2022 8:12 am
by davef
Do you want to upload new firmware to a device over the internet? Way beyond my experience.

Re: Updating a MicroPython Firmware

Posted: Fri Jul 29, 2022 11:30 am
by p_j
This is a great library for updating code over wifi.

https://github.com/mkomon/uota

Re: Updating a MicroPython Firmware

Posted: Tue Aug 02, 2022 9:04 am
by Firas_Baccouri
davef wrote:
Fri Jul 29, 2022 8:12 am
Do you want to upload new firmware to a device over the internet? Way beyond my experience.
Yes I want to update the firmware using the OTA provided by Portenta H7

Re: Updating a MicroPython Firmware

Posted: Tue Aug 02, 2022 2:21 pm
by Firas_Baccouri
p_j wrote:
Fri Jul 29, 2022 11:30 am
This is a great library for updating code over wifi.

https://github.com/mkomon/uota
Thank you for your reply , I have checked the github repo you send and it seems a great solution , but do you have any information about how can I put my firmware on a http or https server because I am newbie with this stuff and I´ve never dealt with something similar .

Thankyou.

Re: Updating a MicroPython Firmware

Posted: Tue Aug 02, 2022 2:40 pm
by karfas
Firas_Baccouri wrote:
Tue Aug 02, 2022 2:21 pm
do you have any information about how can I put my firmware on a http or https server
In my opinion way out of scope for the micropython forum.
I'm sure there are great tutorials all over the net how to configure a web server like apache, nginx or (shudder) IIS.

Re: Updating a MicroPython Firmware

Posted: Tue Aug 02, 2022 2:42 pm
by p_j
Firas_Baccouri wrote:
Tue Aug 02, 2022 2:21 pm
p_j wrote:
Fri Jul 29, 2022 11:30 am
This is a great library for updating code over wifi.

https://github.com/mkomon/uota
Thank you for your reply , I have checked the github repo you send and it seems a great solution , but do you have any information about how can I put my firmware on a http or https server because I am newbie with this stuff and I´ve never dealt with something similar .

Thankyou.
Do you have your own server that you can use? Are you developing on a windows or linux machine?

There are a few different ways to do it, I use a bash script that creates a tar.gz file and uploads it to my server. Here is the script I'm using for your reference.

Code: Select all

#!/bin/bash
tar --exclude='.gitignore' --exclude='Pipfile' --exclude='archive' --exclude='uota.cfg' --exclude='updates' --exclude='logs' --exclude='db' --exclude='deploy' -czf updates/firmware.tar.gz *
scp updates/firmware.tar.gz root@iot.xxxxx.com.au:/home/iot/ftp/firmware/testing/
scp latest root@iot.xxxxxxx.com.au:/home/iot/ftp/firmware/testing/

Re: Updating a MicroPython Firmware

Posted: Wed Aug 03, 2022 6:44 am
by Firas_Baccouri
p_j wrote:
Tue Aug 02, 2022 2:42 pm

Do you have your own server that you can use? Are you developing on a windows or linux machine?
I am developing on Windows , and I don´t have my own server .