Skip to content

Commit 67213b2

Browse files
committed
sqnsupgrade: Updated README file
1 parent 7f485ea commit 67213b2

File tree

1 file changed

+46
-10
lines changed

1 file changed

+46
-10
lines changed

lib/sqnsupgrade/README.md

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Please start with the following steps:
1717
You can find the different versions of firmwares available here:
1818
<a href="https://software.pycom.io/downloads/sequans2.html">https://software.pycom.io/downloads/sequans2.html</a>
1919

20-
There are two packages available, one for the latest CAT-M1 firmware, and another for the latest NB-IoT firmware.
20+
We are using CATM1-38638.zip and NB1-37781.zip as examples in this tutorial.
2121

2222
After unpacking the zip archive, you will find each firmware packages contains two files, one being the firmware file (`CATM1-38638.dup` or `NB1-37781.dup`) and the `updater.elf` file, which is required when using the "recovery" firmware update method or if a previous upgrade failed and the modem is in recovery mode.
2323

@@ -28,8 +28,8 @@ Please note that the `updater.elf` file is only around 300K so you can also stor
2828
To transfer the firmware files onto the SD card you have two options:
2929

3030
1. Format your SD card as with the FAT file system and then copy the files onto the card using your computer
31-
2. Make sure your SD card has an MBR and a single primary partition, the format it directly on the module and mount it.
32-
3. Transfer the firmware files onto the SD card using FTP. Please ensure the transfer is successful and that the file on the module has the same size as the original file.
31+
32+
2. Make sure your SD card has an MBR and a single primary partition, the format it directly on the module, mount it and transfer the firmware files onto the SD card using FTP. Please ensure the transfer is successful and that each file on the module has the same size as the original file on your PC.
3333

3434
```python
3535
from machine import SD
@@ -42,14 +42,14 @@ os.listdir('/sd') # list its content
4242

4343
Once you copied/uploaded the firmware files on to the SD card you can flash the LTE modem using the following command:
4444

45-
To flash the CAT-M1 firmware onto your device:
45+
To flash the CAT-M1 firmware onto your device using the recovery method:
4646

4747
```python
4848
import sqnsupgrade
4949
sqnsupgrade.run('/sd/CATM1-38638.dup', '/sd/updater.elf')
5050
```
5151

52-
To flash the NB-IoT firmware onto your device:
52+
To flash the NB-IoT firmware onto your device using the recovery method:
5353

5454
```python
5555
import sqnsupgrade
@@ -97,7 +97,7 @@ SYSTEM VERSION
9797
ZSP1 : 1.0.99-12341
9898
```
9999

100-
Please note that the firmware update may seem to "stall" around 7-10% and again at 99%. This is not an indication of a failure but the fact that the modem has to do some tasks during and the updater will wait for these tasks to be completed. Unless the upgrade process is hanging for more than 5 minutes, **do not interrupt the process** as you will have to start again if you don't finish it.
100+
Please note that the firmware update may seem to "stall" around 7-10% and again at 99%. This is not an indication of a failure but the fact that the modem has to do some tasks during and the updater will wait for these tasks to be completed. Unless the upgrade process is hanging for more than 5 minutes, **do not interrupt the process** as you will have to start again if you don't finish it. It may also take several minutes for the updater to load before responding to the AT wakeup command.
101101

102102
After you have updated your modem once using the recovery method, you can now flash your modem again using just the `CATM1-38638.dup` or `NB1-37781.dup` file without specifying the `updater.elf` file. However, should the upgrade fail, your modem may end up in recovery mode and you will need the `updater.elf` file again. The updater will check for this and prompt you if using the `updater.elf` file is necessary.
103103

@@ -131,7 +131,7 @@ SYSTEM VERSION
131131

132132
### Via UART Serial Interface
133133

134-
If you can't use an SD card to hold the firmware images, you can use the existing UART interface you have with the board to load these firmware files from your Computer.
134+
If you can't use an SD card to hold the firmware images, you can use the existing UART interface you have with the board to load these firmware files from your Computer.
135135

136136
You will need the following software installed on your computer:
137137

@@ -140,14 +140,34 @@ You will need the following software installed on your computer:
140140

141141
You will also need to download the following Python scripts: https://github.com/pycom/pycom-libraries/lib/sqnsupgrade
142142

143-
First, you need to prepare your modem for upgrade mode by using the following commands:
143+
**Important**: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you **MUST** use the "recovery" upgrade method described below. Otherwise you will risk breaking your module
144+
145+
You can upload the updater.elf file to the module's flash file system rather than uploading it via uart directly to the modem, which will slightly increase the speed of the upgrade.
146+
147+
First, you need to prepare your modem for upgrade mode by using the following commands.
144148

145149
#### Commands to run on the Pycom module
146150

151+
To use the recovery method:
152+
147153
```python
148154
import sqnsupgrade
149155
sqnsupgrade.uart(True)
150156
```
157+
To use the recovery method using the updater.elf file on the module
158+
159+
```python
160+
import sqnsupgrade
161+
sqnsupgrade.uart(True,'/flash/updater.elf')
162+
```
163+
164+
To use the normal method:
165+
166+
```python
167+
import sqnsupgrade
168+
sqnsupgrade.uart()
169+
```
170+
151171

152172
After this command is executed a message will be displayed asking you to close the port.
153173

@@ -160,7 +180,9 @@ Going into MIRROR mode... please close this terminal to resume the upgrade via U
160180

161181
You must close the terminal/Atom or Visual Studio Code console to run the following commands from your computer:
162182

163-
Go to the directory where you saved the `sqnsupgrade` scripts run the following commands in terminal
183+
Go to the directory where you saved the `sqnsupgrade` scripts and run the following commands in terminal:
184+
185+
When using the recovery method:
164186

165187
```python
166188
$ python3
@@ -172,6 +194,20 @@ Type "help", "copyright", "credits" or "license" for more information.
172194
>>> sqnsupgrade.run('Serial_Port', '/path/to/CATM1-38638.dup', '/path/to/updater.elf')
173195
```
174196

197+
When using the standard method (or if the updater.elf was loaded on the module):
198+
199+
```python
200+
$ python3
201+
Python 3.6.5 (default, Apr 25 2018, 14:23:58)
202+
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
203+
Type "help", "copyright", "credits" or "license" for more information.
204+
>>>
205+
>>> import sqnsupgrade
206+
>>> sqnsupgrade.run('Serial_Port', '/path/to/CATM1-38638.dup')
207+
```
208+
209+
Please note that the firmware update may seem to "stall" around 7-10% and again at 99%. This is not an indication of a failure but the fact that the modem has to do some tasks during and the updater will wait for these tasks to be completed. Unless the upgrade process is hanging for more than 5 minutes, **do not interrupt the process** as you will have to start again if you don't finish it. It may also take several minutes for the updater to load before responding to the AT wakeup command.
210+
175211
### Retrying process
176212

177-
In case of any failure or interruption to the process of LTE modem upgrade you can repeat the same steps **after doing a hard reset to the board (i.e disconnecting and reconnecting power), pressing the reset button is not enough.**
213+
In case of any failure or interruption to the process of LTE modem upgrade you can repeat the same steps **after doing a hard reset to the board (i.e disconnecting and reconnecting power), pressing the reset button is not enough.**

0 commit comments

Comments
 (0)