From 7ffbe0604c216d1ea26cc4e1a5458195abf3b62c Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Thu, 21 Jul 2022 14:52:01 +0200 Subject: [PATCH] Not really making progress... --- ESPTest/src/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ESPTest/src/main.cpp b/ESPTest/src/main.cpp index 6cd1b08..86a1142 100644 --- a/ESPTest/src/main.cpp +++ b/ESPTest/src/main.cpp @@ -17,6 +17,21 @@ void toggleLED() digitalWrite(LED, LOW); } +uint8_t temp = 0; +void packet_cb(uint8 *buf, uint16 len) +{ + if (temp < 20) + { + temp++; + Serial.printf("%5d", len); + } + else + { + temp = 0; + Serial.println(); + } +} + void setup() { #ifdef ESP8266 @@ -36,6 +51,8 @@ void setup() Serial.println(); Serial.print("IP: "); Serial.println(WiFi.localIP()); + wifi_promiscuous_enable(true); + wifi_set_promiscuous_rx_cb(packet_cb); } void loop()