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
<h1>Technical details to write your own controller</h1>
5
+
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
+
<h2>FirmwareConfig</h2>
7
+
<ul>
8
+
<li>the bootloader sends a FirmwareConfigRequest packet to the gateway to request information about the firmware it should execute:
9
+
<p>
10
+
typedef struct<br/>
11
+
{<br/>
12
+
uint16_t type;<br/>
13
+
uint16_t version;<br/>
14
+
} FirmwareConfigRequest;
15
+
</p>
16
+
<li>the gateway (the controller) responds with a FirmwareConfigResponse including details about the firmware the sensor should execute:
17
+
<p>
18
+
typedef struct<br/>
19
+
{<br/>
20
+
uint16_t type;<br/>
21
+
uint16_t version;<br/>
22
+
uint16_t blocks;<br/>
23
+
uint16_t crc;<br/>
24
+
} FirmwareConfigResponse;
25
+
</p>
26
+
</ul>
27
+
<h2>Firmware</h2>
28
+
<ul>
29
+
<li>the bootloader sends a FirmwareRequest packet to the gateway to request a specific subset (block) of the compiled firmware:
30
+
<p>
31
+
typedef struct<br/>
32
+
{<br/>
33
+
uint16_t type;<br/>
34
+
uint16_t version;<br/>
35
+
uint16_t block;<br/>
36
+
} FirmwareRequest;
37
+
</p>
38
+
<li>the gateway (the controller) responds with a FirmwareResponse including the specific block of the compiled firmware:
0 commit comments