about summary refs log tree commit diff
path: root/protocol.md
diff options
context:
space:
mode:
authorAydaen Lynch <aydaen@gmail.com>2017-04-22T19·48-0400
committerMatthew Garrett <mjg59-github@srcf.ucam.org>2017-04-22T19·48-0700
commitd989c27d36aa2b3b2da93be6edb8171221a88096 (patch)
tree686642c8f5ca64f945a56e396d477561d710e714 /protocol.md
parent5195856200587cc087e7af52db55e1e559e083bf (diff)
Add in AP Mode device setup for new Broadlink devices. (#53)
Diffstat (limited to 'protocol.md')
-rw-r--r--protocol.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/protocol.md b/protocol.md
index fc58c32e55..e9ac99b13c 100644
--- a/protocol.md
+++ b/protocol.md
@@ -11,6 +11,25 @@ Checksum
 
 Construct the packet and set checksum bytes to zero. Add each byte to the starting value of 0xbeaf, wrapping after 0xffff.
 
+New device setup
+----------------
+
+To setup a new Broadlink device while in AP Mode a 136 byte packet needs to be sent to the device as follows:
+
+| Offset  | Contents |
+|---------|----------|
+|0x00-0x19|00|
+|0x20-0x21|Checksum as a little-endian 16 bit integer|
+|0x26|14 (Always 14)|
+|0x44-0x63|SSID Name (zero padding is appended)|
+|0x64-0x83|Password (zero padding is appended)|
+|0x84|Character length of SSID|
+|0x85|Character length of password|
+|0x86|Wireless security mode (00 - none, 01 = WEP, 02 = WPA1, 03 = WPA2, 04 = WPA1/2)|
+|0x87-88|00|
+
+Send this packet as a UDP broadcast to 255.255.255.255 on port 80.
+
 Network discovery
 -----------------
 
@@ -179,3 +198,5 @@ Todo
 
 * Support for other devices using the Broadlink protocol (various smart home devices)
 * Figure out what the format of the data packets actually is.
+* Deal with the response after AP Mode WiFi network setup.
+