diff --git a/arduinoIDE_esp8266_boards/boards.local.txt b/arduinoIDE_esp8266_boards/boards.local.txt index 95194cb873cac74e46f8c4fcfc6e0f8ae43b40d0..5142dc21e6c6278fe0800b17edc71325c16a8ab8 100644 --- a/arduinoIDE_esp8266_boards/boards.local.txt +++ b/arduinoIDE_esp8266_boards/boards.local.txt @@ -64,8 +64,9 @@ neOSensor.menu.ResetMethod.ck.upload.resetmethod=--before no_reset --after soft_ neOSensor.menu.ResetMethod.nodemcu=dtr (aka nodemcu) neOSensor.menu.ResetMethod.nodemcu.upload.resetmethod=--before default_reset --after hard_reset -neOSensor.menu.baud.921600=921600 -neOSensor.menu.baud.921600.upload.speed=921600 +# [jan.23] disabled 921600 that may cause upload failures on some ESP8266 boards +#neOSensor.menu.baud.921600=921600 +#neOSensor.menu.baud.921600.upload.speed=921600 neOSensor.menu.baud.115200=115200 neOSensor.menu.baud.115200.upload.speed=115200 diff --git a/neosensor/libraries/neocampus/neocampus.h b/neosensor/libraries/neocampus/neocampus.h index 782b37d5ac2be698603c5aefb5a31b6dd3647c4f..fb79e97d86311b466adddf3a6897f4b7be060c4d 100644 --- a/neosensor/libraries/neocampus/neocampus.h +++ b/neosensor/libraries/neocampus/neocampus.h @@ -42,7 +42,7 @@ typedef uint32_t firmwareRev_t; * Get max simultaneous listening TCP connections */ #if defined(ESP8266) - #define MAX_TCP_CONNECTIONS MEMP_NUM_TCP_PCB_LISTEN + #define MAX_TCP_CONNECTIONS MEMP_NUM_TCP_PCB #elif defined(ESP32) #define MAX_TCP_CONNECTIONS CONFIG_LWIP_MAX_LISTENING_TCP #endif diff --git a/neosensor/neosensor.ino b/neosensor/neosensor.ino index ac93644080383fad04c1cc7ff9849759f177a470..46e2723a3ec887f1657f4981f0f5187c75316013 100644 --- a/neosensor/neosensor.ino +++ b/neosensor/neosensor.ino @@ -13,7 +13,6 @@ * ==> UPGRADE WiFiManager for bsp_update branch <== * --- * NOTES: - * - [ESP8266]MEMP_NUM_TCP_PCB= 8 (MAX simulteaneous listening TCP connections) * - you need to 'deploy' our boards definitions (run the deploy.sh script) * - select your board from the Arduino IDE boards menu (located end of list) * - a compilation flag tells which bord it is (i.e NEOSENSOR_AIRQUALITY) @@ -27,12 +26,12 @@ * * --- * TODO: - * - remove WiFi.setPhyMode(WIFI_PHY_MODE_11G) once DHCP issue would have been solved * - esp8266 now features a configTzTime() in newer API * - loadSensoConfig --> avoid data duplication, implement an iterator * - remove DISABLE_SSL compilation flag * --- * F.Thiebolt jan.23 some cleanup about MAX_TCP connection that is defined at LWIP compile time + * WiFi.setPhyMode(WIFI_PHY_MODE_11G) SOLVE THE looonnngggg DHCP issue * F.Thiebolt nov.21 corrected timezone definition for esp32 * F.Thiebolt sep.21 added display module support (e.g oled or 7segment displays) * F.Thiebolt aug.21 added digital inputs support (e.g PIR sensor) @@ -644,9 +643,12 @@ void earlySetup( void ) { /* [jan.23] due to numerous DHCP issues, and following issue https://github.com/esp8266/Arduino/issues/8299 * we decided to set WiFi physical mode explicitly */ -#ifdef ESP8266 +#if defined(ESP8266) WiFi.setPhyMode(WIFI_PHY_MODE_11G); // [jan.23] does it solve esp8266 DHCP issue ??? not really sure -#endif /* ESP8266 */ +#elif defined(ESP32) + //wifi_set_phy_mode(PHY_MODE_11B); + WIFI_PROTOCOL_11B +#endif // WiFi.disconnect(true); // to erase default credentials WiFi.setAutoReconnect(false);