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
493e50fe
Commit
493e50fe
authored
1 year ago
by
francois
Browse files
Options
Downloads
Patches
Plain Diff
Realease 231027
parent
f4685cdd
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
ChangeLog.txt
+5
-0
5 additions, 0 deletions
ChangeLog.txt
neosensor/libraries/boards/neosensor.h
+1
-1
1 addition, 1 deletion
neosensor/libraries/boards/neosensor.h
neosensor/libraries/neocampus/wifiParametersMgt.cpp
+6
-5
6 additions, 5 deletions
neosensor/libraries/neocampus/wifiParametersMgt.cpp
with
12 additions
and
6 deletions
ChangeLog.txt
+
5
−
0
View file @
493e50fe
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
# devices BUT not set as globally available for firmware upgrades
# devices BUT not set as globally available for firmware upgrades
# (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT
# (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT
=== Release 231027 for esp32 only (Arduino Core ESP32 2.0.11)
Added support to save WiFi credentials retrieved from JSON file to get automatically
saved in NVS WiFi credentials area if this later does not already exists
=== [jul.23] SDK upgrade ===
=== [jul.23] SDK upgrade ===
Updated to latest esp32 core Arduino (i.e 2.0.11)
Updated to latest esp32 core Arduino (i.e 2.0.11)
...
...
This diff is collapsed.
Click to expand it.
neosensor/libraries/boards/neosensor.h
+
1
−
1
View file @
493e50fe
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
*/
*/
#define BOARD_NAME "neOSensor"
#define BOARD_NAME "neOSensor"
#define BOARD_REVISION 1.2
#define BOARD_REVISION 1.2
#define BOARD_FWREV 23
0528
// Firmware revision <year><month><day> in 2 digits each
#define BOARD_FWREV 23
1027
// Firmware revision <year><month><day> in 2 digits each
...
...
This diff is collapsed.
Click to expand it.
neosensor/libraries/neocampus/wifiParametersMgt.cpp
+
6
−
5
View file @
493e50fe
...
@@ -569,18 +569,19 @@ for (JsonObject::iterator it=root.begin(); it!=root.end(); ++it) {
...
@@ -569,18 +569,19 @@ for (JsonObject::iterator it=root.begin(); it!=root.end(); ++it) {
* their wifi credentials in the NVS area
* their wifi credentials in the NVS area
*/
*/
Preferences
_nvs
;
Preferences
_nvs
;
if
(
_nvs
.
begin
(
WIFI_NVS_NAMESPACE
,
false
)
)
{
// readwrite mode
if
(
!
_nvs
.
begin
(
WIFI_NVS_NAMESPACE
,
true
)
)
{
// read-only to check if it exists
if
(
!
_nvs
.
isKey
(
WIFI_NVS_SSID_KEY
)
and
!
_nvs
.
isKey
(
WIFI_NVS_PASS_KEY
)
)
{
log_debug
(
F
(
"
\n
[wifiParams] copying SSID credentials to NVS WiFi namespace ..."
));
log_flush
();
log_debug
(
F
(
"
\n
[wifiParams] copying SSID credentials to NVS WiFi namespace ..."
));
log_flush
();
if
(
_nvs
.
begin
(
WIFI_NVS_NAMESPACE
,
false
)
)
{
// open NVS WiFi credentials area in RW mode
if
(
_nvs
.
putBytes
(
WIFI_NVS_SSID_KEY
,
_ssid
,
strlen
(
_ssid
)
+
1
)
!=
strlen
(
_ssid
)
+
1
)
{
if
(
_nvs
.
putBytes
(
WIFI_NVS_SSID_KEY
,
_ssid
,
strlen
(
_ssid
)
+
1
)
!=
strlen
(
_ssid
)
+
1
)
{
log_error
(
F
(
"
\n
[wifiParams] ERROR while saving SSID to NVS ?!?!"
));
log_flush
();
log_error
(
F
(
"
\n
[wifiParams] ERROR while saving SSID to NVS ?!?!"
));
log_flush
();
}
}
if
(
_nvs
.
putBytes
(
WIFI_NVS_PASS_KEY
,
_pass
,
strlen
(
_pass
)
+
1
)
!=
strlen
(
_pass
)
+
1
)
{
if
(
_nvs
.
putBytes
(
WIFI_NVS_PASS_KEY
,
_pass
,
strlen
(
_pass
)
+
1
)
!=
strlen
(
_pass
)
+
1
)
{
log_error
(
F
(
"
\n
[wifiParams] ERROR while saving PASS to NVS ?!?!"
));
log_flush
();
log_error
(
F
(
"
\n
[wifiParams] ERROR while saving PASS to NVS ?!?!"
));
log_flush
();
}
}
// close NVS namespace
_nvs
.
end
();
}
}
// close NVS namespace
_nvs
.
end
();
}
}
#endif
/* ESP32 */
#endif
/* ESP32 */
return
true
;
return
true
;
...
...
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