Not really making progress...
This commit is contained in:
parent
5067438b9d
commit
7ffbe0604c
1 changed files with 17 additions and 0 deletions
|
@ -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()
|
||||
|
|
Reference in a new issue