@@ -7,35 +7,33 @@ Arduino IDE: `Sketch` -> `Export compiled Binary`
7
7
``` bash
8
8
cp sketch.bin ~ /Arduino/libraries/ArduinoIoTCloud/extras/tools/
9
9
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
13
12
```
14
13
15
14
## ` bin2ota.py `
16
15
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.
17
16
18
17
### How-To-Use
19
18
``` bash
20
- ./bin2ota.py sketch.bin sketch.ota
19
+ ./bin2ota.py [MKR_WIFI_1010 | NANO_33_IOT] sketch.bin sketch.ota
21
20
```
22
21
#### ` sketch.bin `
23
22
``` bash
24
23
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
27
24
0000030 0000 0000 0000 0000 7485 0000 74F1 0000
28
25
...
29
26
```
30
27
* ` length(sketch.bin) = 0x0003'A5E0 `
31
28
* ` CRC32(sketch.bin) = 0xA9D1'265B `
29
+ * ` MAGIC NUMBER(MKR WIFI 1010) = 0x2341'8054 `
30
+ * ` VERSION = 0x0000'0000'0000'0000 `
32
31
33
32
#### ` sketch.ota `
34
33
``` 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
+ ...
39
37
```
40
38
41
39
## ` lzss.py `
@@ -49,20 +47,4 @@ This tool allows to compress a binary file using the LZSS algorithm.
49
47
* Decoding (Extracting)
50
48
``` bash
51
49
./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
68
50
```
0 commit comments