Skip to content

Commit fe196a0

Browse files
authored
Create README.md
1 parent 89917cf commit fe196a0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# MySensorsBootloaderRF24
2+
MySensors bootloader supporting over-the-air firmware updates
3+
4+
<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+
&nbsp;uint16_t type;<br/>
13+
&nbsp;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+
&nbsp;uint16_t type;<br/>
21+
&nbsp;uint16_t version;<br/>
22+
&nbsp;uint16_t blocks;<br/>
23+
&nbsp;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+
&nbsp;uint16_t type;<br/>
34+
&nbsp;uint16_t version;<br/>
35+
&nbsp;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:
39+
</ul>
40+
<p>
41+
typedef struct<br/>
42+
{<br/>
43+
&nbsp;uint16_t type;<br/>
44+
&nbsp;uint16_t version;<br/>
45+
&nbsp;uint16_t block;<br/>
46+
&nbsp;uint8_t data[FIRMWARE_BLOCK_SIZE];<br/>
47+
} FirmwareResponse;
48+
</p>

0 commit comments

Comments
 (0)