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
Copy file name to clipboardExpand all lines: docs/PROTOCOL.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ All line-oriented. The Flipper parser matches on the leading token.
37
37
|`BYE mac=<AA:BB:...>`| A station left the AP — the Flipper drops it from the live client list. |
38
38
|`IP mac=<AA:BB:...> ip=<ip>`| DHCP assigned a station its IP (MAC resolved from the soft-AP table). Falls back to `IP ip=<ip>` when the MAC can't be resolved; the Flipper then pairs it to the most recent client without an IP. |
39
39
|`CRED ip=<ip>&<field>=<val>&...`| A form was submitted — the client IP plus every submitted field, url-encoded. One line per submission. |
40
-
|`PING`| Liveness beacon, emitted ~every 2s. The Flipper uses it to detect an unplugged board (no `PING`/traffic for 5s ⇒ link lost); it's dropped from the console so it doesn't spam. |
40
+
|`PING FTRP <ver>`| Liveness + identity beacon, emitted ~every 2s. The magic `FTRP` marks the board as running Flytrap firmware (detection keys off *this*, not "any bytes", so a board flashed with something else isn't adopted), and `<ver>` is the wire-protocol version — the Flipper prompts an update when it's behind `FLYTRAP_FW_VERSION`. Also drives unplug detection (no beacon/traffic for 5s ⇒ link lost). Dropped from the console so it doesn't spam. |
41
41
42
42
## Handshake
43
43
@@ -57,15 +57,20 @@ Flipper ESP
57
57
| <---- IP mac=... ip=...(DHCP leases it an address)
58
58
| <---- CRED ip=...&... (a form is submitted)
59
59
| <---- BYE mac=... (the phone leaves)
60
-
| <---- PING (~every 2s, all the while)
60
+
| <---- PING FTRP <ver> (~every 2s, all the while)
61
61
| |
62
62
| stop\n / reset\n ----> | (tear down / reboot)
63
63
```
64
64
65
-
If the ESP emits `STATUS boot` mid-session (it rebooted), the Flipper re-sends
66
-
`sethtml` automatically to recover. If `PING` (and all other traffic) stops for
67
-
5s, the Flipper flags the link as lost and the dashboard shows **Board
68
-
disconnected** until the board returns.
65
+
Before the handshake the Flipper first **detects** the board by waiting for a
0 commit comments