From 7e5a75a01f6be5e113b6adacf2a9e1315a5c672f Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Sat, 10 May 2025 05:45:57 +0300 Subject: [PATCH] Revert sending mavlink udp packets in unicast This requires more complex approach as client ip may change between reconnections --- flix/wifi.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flix/wifi.ino b/flix/wifi.ino index 8e55388..e0d2957 100644 --- a/flix/wifi.ino +++ b/flix/wifi.ino @@ -20,12 +20,11 @@ void setupWiFi() { print("Setup Wi-Fi\n"); WiFi.softAP(WIFI_SSID, WIFI_PASSWORD); udp.begin(WIFI_UDP_PORT); - udp.beginPacket("255.255.255.255", WIFI_UDP_REMOTE_PORT); // broadcast packets until connected } void sendWiFi(const uint8_t *buf, int len) { if (WiFi.softAPIP() == IPAddress(0, 0, 0, 0) && WiFi.status() != WL_CONNECTED) return; - udp.beginPacket(); + udp.beginPacket(WiFi.softAPBroadcastIP(), WIFI_UDP_REMOTE_PORT); udp.write(buf, len); udp.endPacket(); }