Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
neOCampus-arduino
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GIS-neOCampus
neOSensor
neOCampus-arduino
Commits
57c636f9
Commit
57c636f9
authored
2 years ago
by
francois
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
19639e1e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
neosensor/libraries/boards/neosensor.h
+20
-1
20 additions, 1 deletion
neosensor/libraries/boards/neosensor.h
neosensor/neosensor.ino
+14
-13
14 additions, 13 deletions
neosensor/neosensor.ino
tests/WiFi_simple/WiFi_simple.ino
+1
-0
1 addition, 0 deletions
tests/WiFi_simple/WiFi_simple.ino
with
35 additions
and
14 deletions
neosensor/libraries/boards/neosensor.h
+
20
−
1
View file @
57c636f9
...
...
@@ -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
/* #############################################################################
...
...
This diff is collapsed.
Click to expand it.
neosensor/neosensor.ino
+
14
−
13
View file @
57c636f9
...
...
@@ -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
(
"
\n
WIFI 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\t
WiFi_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
);
...
...
This diff is collapsed.
Click to expand it.
tests/WiFi_simple/WiFi_simple.ino
+
1
−
0
View file @
57c636f9
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment