You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All initialization the bootloader does (finding parent / requesting nodeId on first start) uses the same packets as a normal MySensors sketch. There is no need for the controller to distinguish between packets from the bootloader and packets from normal sketch execution. The controller only needs to care about two additional request/response communications. All communication is binary.
6
6
<h2>FirmwareConfig</h2>
7
7
<ul>
8
-
<li>the bootloader sends a FirmwareConfigRequest packet to the gateway to request information about the firmware it should execute:
8
+
<li>the bootloader sends a RequestFirmwareConfig packet to the gateway to request information about the firmware it should execute:
9
9
<p>
10
-
typedef struct<br/>
11
-
{<br/>
10
+
typedef struct {<br/>
12
11
uint16_t type;<br/>
13
12
uint16_t version;<br/>
14
-
} FirmwareConfigRequest;
13
+
uint16_t blocks;<br/>
14
+
uint16_t crc;<br/>
15
+
uint16_t BLVersion;<br/>
16
+
} RequestFirmwareConfig;<br/>
15
17
</p>
16
-
<li>the gateway (the controller) responds with a FirmwareConfigResponse including details about the firmware the sensor should execute:
18
+
<li>the gateway (the controller) responds with a NodeFirmwareConfig including details about the firmware the sensor should execute:
17
19
<p>
18
-
typedef struct<br/>
19
-
{<br/>
20
+
typedef struct {<br/>
20
21
uint16_t type;<br/>
21
22
uint16_t version;<br/>
22
23
uint16_t blocks;<br/>
23
24
uint16_t crc;<br/>
24
-
} FirmwareConfigResponse;
25
+
} NodeFirmwareConfig;<br/>
25
26
</p>
26
27
</ul>
27
28
<h2>Firmware</h2>
28
29
<ul>
29
-
<li>the bootloader sends a FirmwareRequest packet to the gateway to request a specific subset (block) of the compiled firmware:
30
+
<li>the bootloader sends a RequestFirmwareBlock packet to the gateway to request a specific subset (block) of the compiled firmware:
30
31
<p>
31
-
typedef struct<br/>
32
-
{<br/>
32
+
typedef struct {<br/>
33
33
uint16_t type;<br/>
34
34
uint16_t version;<br/>
35
35
uint16_t block;<br/>
36
-
} FirmwareRequest;
36
+
} RequestFirmwareBlock;<br/>
37
37
</p>
38
-
<li>the gateway (the controller) responds with a FirmwareResponse including the specific block of the compiled firmware:
38
+
<li>the gateway (the controller) responds with a ResponseFirmwareBlock including the specific block of the compiled firmware:
0 commit comments