mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 06:06:03 +01:00
Merge pull request #135 from pycom/master
Added OTA via FTP method documentation
This commit is contained in:
@@ -10,7 +10,7 @@ aliases:
|
||||
|
||||
Pycom modules come with the ability to update the devices firmware, while it is still running, we call this an "over the air" (OTA) update. The [`pycom`](/firmwareapi/pycom/pycom) library provides several functions to achieve this. This example will demonstrate how you could potentially use this functionality to update deployed devices. The full source code of this example can be found [here](https://github.com/pycom/pycom-libraries/tree/master/examples/OTA).
|
||||
|
||||
## Method
|
||||
## Method A
|
||||
|
||||
Here we will describe one possible update methodology you could use that is implemented by this example.
|
||||
|
||||
@@ -211,4 +211,22 @@ while True:
|
||||
|
||||
sleep(5)
|
||||
```
|
||||
## Method B
|
||||
|
||||
OTA software updates can be performed through the FTP server. Download the appropriate .tar.gz file for the Firmware you want to upgrade/downgrade to from [here](https://docs.pycom.io/advance/downgrade/).
|
||||
ertact the application bin file eg (wipy.bin) for WiPy, rename that file to ``appimg.bin`` Upload the ``appimg.bin`` file
|
||||
to: ``/flash/sys/appimg.bin``.
|
||||
once the file is succesfully transfered through the FTP server, the upload is complete and the ``appimg.bin`` file will be automatically deleted.
|
||||
|
||||
To boot up from the new Firmware just reset the device via Reset button or via reset Command:
|
||||
|
||||
>>> import machine
|
||||
>>> machine.reset()
|
||||
|
||||
|
||||
In order to check your software version, do:
|
||||
|
||||
```python
|
||||
import os
|
||||
os.uname().release
|
||||
```
|
||||
Reference in New Issue
Block a user