Skip to content
Snippets Groups Projects
Commit 57c636f9 authored by francois's avatar francois
Browse files

update

parent 19639e1e
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,8 @@
* - noise detector (8bits DAC MCP4706)
* ---
*
* F.Thieolt Jan.23 added option to force 802.11b WiFi protocol
* in order to overcome the DHCP issue
* F.Thiebolt Nov.21 esp32 added serial link definition
* F.Thiebolt Jul.21 esp32 added PIR sensor @ GPIO4
* esp32 added switch INCR_SW @ GPIO18
......@@ -42,7 +44,24 @@
*/
#define BOARD_NAME "neOSensor"
#define BOARD_REVISION 1.2
#define BOARD_FWREV 230109 // Firmware revision <year><month><day> in 2 digits each
#define BOARD_FWREV 230111 // Firmware revision <year><month><day> in 2 digits each
/* #############################################################################
* ### ###
* ### WiFi protocol enforcement ###
* ### ###
* [Jan.23] ESP SDK bug activated by WiFi GWs firmware upgrades
* We offer the opportunity to FORCE a specific WiFi protocol
* [WARNING]: this is reboot PERSISTANT i.e once set you need to manually
* set another value
*
* #############################################################################
*/
#ifndef FORCE_WIFI_PROTOCOL
#define FORCE_WIFI_PROTOCOL 1
#endif // FORCE_WIFI_PROTOCOL
/* #############################################################################
......
......@@ -9,9 +9,6 @@
* (c) F.Thiebolt / neOCampus operation - Université Toulouse 3
*
* ---
* WARNING: [jan.23] WiFiManager 2.0.15-rc1 does not list WiFi networks available !?!?!
* ==> UPGRADE WiFiManager for bsp_update branch <==
* ---
* NOTES:
* - 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)
......@@ -646,7 +643,8 @@ void display_wifi_protocol( wifi_interface_t ifx=WIFI_IF_STA ) {
return;
}
log_debug(F("\nWIFI protocols = 0x"));log_debug(cur_protocols,HEX);log_flush();
log_debug(F("\n# WIFI protocols = 0x"));log_debug(cur_protocols,HEX);log_flush();
if( cur_protocols & WIFI_PROTOCOL_11N ) {
log_debug(F("\n\tWiFi_Protocol_11n"));
}
......@@ -670,15 +668,18 @@ void earlySetup( void ) {
* we decided to set WiFi physical mode explicitly
* BEWARE IT IS PERSISTENT across reboot, flash ...
*/
#if defined(ESP8266)
WiFi.setPhyMode(WIFI_PHY_MODE_11B); // [jan.23] 11B or 11G SOLVED OUR DHCP issue !!!
#elif defined(ESP32)
// set PERSISTANT mode for station
WiFi.mode(WIFI_STA);
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B); // maybe check ret_code ?
//esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G);
//esp_wifi_config_11b_rate(WIFI_IF_STA,true); // to suppress 802.11B
#endif
#ifdef FORCE_WIFI_PROTOCOL
#warning "WiFi protocol enforcement is active !!"
#if defined(ESP8266)
WiFi.setPhyMode(WIFI_PHY_MODE_11B); // [jan.23] 11B or 11G SOLVED OUR DHCP issue !!!
#elif defined(ESP32)
// set PERSISTANT mode for station
WiFi.mode(WIFI_STA);
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B); // maybe check ret_code ?
//esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G);
//esp_wifi_config_11b_rate(WIFI_IF_STA,true); // to suppress 802.11B
#endif
#endif /* FORCE_WIFI_PROTOCOL */
// WiFi.disconnect(true); // to erase default credentials
WiFi.setAutoReconnect(false);
......
......@@ -18,6 +18,7 @@
#define SET_WIFI_PROTOCOL 1
/* Global variables */
#error "Change SSID/passwd !!"
const char* ssid = "neOCampus";
const char* password = "XXXXXXX";
esp_err_t _err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment