2018-06-11 06:58 AM
I'm trying to implement a fsupdate through the micropython module machine on my NUCLEO-IDW04A1 (currently MicroPython v1.8.7-149-g476c672 on 2017-02-22; SPWF04Sx with STM32F439). I have successfully updated through the AT command set, but for my application I need to do it within my main python loop.
I can't find documentation anywhere for that function. By querying it I found out it takes 3 parameters, but what those are, I have no idea.
Has this function actually been implemented yet, and if so, does anyone have access to the documentation?
#fsupdate #micropython #spwf04sa2018-06-11 07:49 AM
Through guess and check I have figured out that the parameters are....
fsupdate( (ip_addr, port) , file_name.img, mem_id)
where mem_id can be 'i' for application flash, 'e' for user flash, and 'x' for external volume.
So this code worked for me.
from machine import fsupdate
ap = ('123.456.789.212',80) # ip address changed for securityfsupdate(ap,'FatVolume.img','i')Now my updated question is, if I want to do a secure update with TLS, is there another function for that or do I just add some parameters to this one?