Skip to content

Commit 9f21832

Browse files
committed
Extend README with better instructions for how to perform OTA via cloud server
1 parent 236f744 commit 9f21832

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

extras/tools/README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
1-
`bin2ota.py`
2-
============
1+
Firmware Over-The-Air Tools
2+
===========================
3+
4+
## How-to-prepare obtain a binary for OTA
5+
6+
1) In the IDE do `Sketch` -> `Export compiled Binary`
7+
2) Copy the compiled binary `sketch.bin` in `ArduinoIoTCloud/extras/tools/`
8+
```bash
9+
cp sketch.bin ~/Arduino/libraries/ArduinoIoTCloud/extras/tools/
10+
```
11+
3) Add the length and CRC
12+
```bash
13+
./bin2ota.py sketch.bin sketch.ota
14+
```
15+
4) Convert to JSON
16+
```bash
17+
./bin2json.py sketch.ota sketch.json
18+
```
19+
5) Upload to Arduino IoT Cloud Server
20+
```bash
21+
./ota-upload.sh CLIENT_ID CLIENT_SECRET DEVICE_ID sketch.json
22+
```
23+
24+
## `bin2ota.py`
325
This tool can be used to extend (actually prefix) a binary generated with e.g. the Arduino IDE with the required length and crc values required to perform an OTA (Over-The-Air) update of the firmware.
426

527
### How-To-Use
@@ -25,17 +47,15 @@ This tool can be used to extend (actually prefix) a binary generated with e.g. t
2547
0000030 0000 0000 7485 0000 0000 0000 0000 0000
2648
```
2749

28-
`bin2json.py`
29-
=============
50+
## `bin2json.py`
3051
This tool converts the binary file into base64 encoded JSON which is necessary for feeding it to the server.
3152

3253
### How-To-Use
3354
```bash
3455
./bin2json.py sketch.ota sketch.json
3556
```
3657

37-
`ota-upload.sh`
38-
==============
58+
## `ota-upload.sh`
3959
This tool allows to upload a OTA binary to a device via a Arduino cloud server.
4060

4161
### How-To-Use

0 commit comments

Comments
 (0)