Skip to content

Commit 28104a2

Browse files
committed
Deleting bin2json and ota-upload and updating README
1 parent d08c134 commit 28104a2

File tree

3 files changed

+8
-89
lines changed

3 files changed

+8
-89
lines changed

extras/tools/README.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,33 @@ Arduino IDE: `Sketch` -> `Export compiled Binary`
77
```bash
88
cp sketch.bin ~/Arduino/libraries/ArduinoIoTCloud/extras/tools/
99
cd ~/Arduino/libraries/ArduinoIoTCloud/extras/tools
10-
./bin2ota.py sketch.bin sketch.ota
11-
./bin2json.py sketch.ota sketch.json
12-
./ota-upload.sh CLIENT_ID CLIENT_SECRET DEVICE_ID sketch.json
10+
./lzss.py --encode sketch.bin sketch.lzss
11+
./bin2ota.py [MKR_WIFI_1010 | NANO_33_IOT] sketch.lzss sketch.ota
1312
```
1413

1514
## `bin2ota.py`
1615
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.
1716

1817
### How-To-Use
1918
```bash
20-
./bin2ota.py sketch.bin sketch.ota
19+
./bin2ota.py [MKR_WIFI_1010 | NANO_33_IOT] sketch.bin sketch.ota
2120
```
2221
#### `sketch.bin`
2322
```bash
2423
0000000 8000 2000 749D 0000 7485 0000 7485 0000
25-
0000010 0000 0000 0000 0000 0000 0000 0000 0000
26-
0000020 0000 0000 0000 0000 0000 0000 7485 0000
2724
0000030 0000 0000 0000 0000 7485 0000 74F1 0000
2825
...
2926
```
3027
* `length(sketch.bin) = 0x0003'A5E0`
3128
* `CRC32(sketch.bin) = 0xA9D1'265B`
29+
* `MAGIC NUMBER(MKR WIFI 1010) = 0x2341'8054`
30+
* `VERSION = 0x0000'0000'0000'0000`
3231

3332
#### `sketch.ota`
3433
```bash
35-
0000000 A5E0 0003 265B A9D1 8000 2000 749D 0000
36-
0000010 7485 0000 7485 0000 0000 0000 0000 0000
37-
0000020 0000 0000 0000 0000 0000 0000 0000 0000
38-
0000030 0000 0000 7485 0000 0000 0000 0000 0000
34+
0000000 A5E0 0003 265B A9D1 2341 8054 0000 0000
35+
0000010 0000 0000 8000 2000 749D 0000 7485 0000
36+
...
3937
```
4038

4139
## `lzss.py`
@@ -49,20 +47,4 @@ This tool allows to compress a binary file using the LZSS algorithm.
4947
* Decoding (Extracting)
5048
```bash
5149
./lzss.py --decode sketch.lzss sketch.bin
52-
```
53-
54-
## `bin2json.py`
55-
This tool converts the binary file into base64 encoded JSON which is necessary for feeding it to the server.
56-
57-
### How-To-Use
58-
```bash
59-
./bin2json.py sketch.ota sketch.json
60-
```
61-
62-
## `ota-upload.sh`
63-
This tool allows to upload a OTA binary to a device via a Arduino cloud server.
64-
65-
### How-To-Use
66-
```bash
67-
./ota-upload.sh CLIENT_ID CLIENT_SECRET DEVICE_ID sketch.json
6850
```

extras/tools/bin2json.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

extras/tools/ota-upload.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)