Ignore repeat master discover after slave has joined network.

Slave responds and logs only on first discover from a given master MAC;
subsequent broadcasts on the same network are silently ignored.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-18 22:21:08 +02:00
co-authored by Cursor
parent b592401e78
commit 81e479ecd1
2 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ WiFi is brought up in STA mode (no AP association). Channel = `app_config.networ
**Master:** task `espnow_disc` sends `DISCOVER` every **500 ms** on the configured network. Logs `slave joined id=… mac=… ver=…` when a new slave is seen (up to 16 entries).
**Slave:** on matching `DISCOVER`, unicast `SLAVE_INFO` back to the master source MAC.
**Slave:** on first matching `DISCOVER`, logs `joined network N, master …`, sends `SLAVE_INFO` once, then ignores further discovers from that master (no repeat log or reply).
Monitor via USB-JTAG (`/dev/ttyACM0`) while using a USB-serial adapter on **GPIO2/3** (`/dev/ttyUSB0`) for UART — they are different interfaces.