{SOLVED} poor wifi performance
Posted: Sun Jun 28, 2020 7:18 pm
hello,
the performance and stability of the network are really poor. I'm not sure where to look for the issues. Your advice will be highly appreciated.
The network performance of this board is piss poor when it is connected to a router ( 6 feet/2m away):
ping from the laptop:
The only code i have running is :
where "loadConfiguration" parses and loads SSID/pass from the SPIFF stored json file.
and the network portion is just "WIFI.begin call with some "dressing up" :
i have ESP-WROOM 32 dev board.
the performance and stability of the network are really poor. I'm not sure where to look for the issues. Your advice will be highly appreciated.
The network performance of this board is piss poor when it is connected to a router ( 6 feet/2m away):
ping from the laptop:
Code: Select all
From 192.168.1.5 icmp_seq=1031 Destination Host Unreachable
64 bytes from 192.168.1.14: icmp_seq=1039 ttl=255 time=566 ms
64 bytes from 192.168.1.14: icmp_seq=1045 ttl=255 time=502 ms
64 bytes from 192.168.1.14: icmp_seq=1053 ttl=255 time=1357 ms
64 bytes from 192.168.1.14: icmp_seq=1054 ttl=255 time=335 ms
64 bytes from 192.168.1.14: icmp_seq=1062 ttl=255 time=1149 ms
64 bytes from 192.168.1.14: icmp_seq=1063 ttl=255 time=127 ms
From 192.168.1.5 icmp_seq=1069 Destination Host Unreachable
From 192.168.1.5 icmp_seq=1070 Destination Host Unreachable
From 192.168.1.5 icmp_seq=1071 Destination Host Unreachable
From 192.168.1.5 icmp_seq=1072 Destination Host Unreachable
Code: Select all
void setup() {
Serial.begin(115200);
delay(3000);
esp_log_level_set("*", ESP_LOG_VERBOSE);
// Create event Group for use by all tasks
eventGroup = xEventGroupCreate(); //check if NULL NOT returned.
if (eventGroup == NULL) {
printf("Event group was not created \n");
Serial.println("Event group was not created");
}
if (loadConfiguration(filename,config) != true) {
init_config();
};
Serial.println("Starting Network ....");
Start_Net();
and the network portion is just "WIFI.begin call with some "dressing up" :
Code: Select all
void Start_Net ( void ) {
Serial.begin( 115200 );
sleep(3);
#if defined(ESP32)
WiFi.setHostname( config.hostname );
#else
WiFi.hostname( config.hostname );
#endif
// try to connect to existing network
WiFi.begin( config.ssid, config.password );
Serial.printf( "\n\nTry to connect to existing network \n" );
{
uint8_t timeout = 45;
// Wait for connection, 5s timeout
do {
delay( 1000 );
// Serial.print( "." );
Serial.print(WiFi.status());
timeout--;
} while ( timeout && WiFi.status() != WL_CONNECTED );
// not connected -> create hotspot
if ( WiFi.status() != WL_CONNECTED ) {
Serial.print( "\n\nCreating hotspot" );
WiFi.mode( WIFI_AP );
WiFi.softAPConfig( apIP, apIP, IPAddress( 255, 255, 255, 0 ) );
Serial.printf("Start_Net: unable to connect to the network. Starting AP with the SSID - %s ",config.ssid);
// init_config();
WiFi.softAP( config.ssid );
timeout = 5;
do {
delay( 500 );
Serial.print( "." );
timeout--;
} while ( timeout );
}
}
dnsServer.start( DNS_PORT, "*", apIP );
Serial.println( "\n\nWiFi parameters:" );
Serial.print( "Mode: " );
Serial.println( WiFi.getMode() == WIFI_AP ? "Station" : "Client" );
Serial.print( "IP address: " );
Serial.println( WiFi.getMode() == WIFI_AP ? WiFi.softAPIP() : WiFi.localIP() );
}
i have ESP-WROOM 32 dev board.