Skip to content
Snippets Groups Projects
Commit b27e0320 authored by thiebolt's avatar thiebolt
Browse files

updated _http_get with WIFIClient newer API

parent ed1678c1
No related branches found
No related tags found
1 merge request!3Feature SDK upgrade
(c) F.Thiebolt Université Toulouse3, Laboratoire IRIT
#
# neOCampus operation
# (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT
=== upcoming feature-SDKupgrade
Bumps to esp32 2.0.4
Bumps to esp8266 3.0.2
- we're still using the deprecated SPIFFS filesystem
- updated boards.local.txt
- _http_get now makes use of newer API involving a WIFIClient variable
- uniformized sntp includes for all ESP :)
TBC that NTP servers sent by the DHCP server are in use
- WIFImanager now used without mod
TBC that options appears valid when setting up the device
- switched noise ISR from ICACHE_RAM_ATTR to newer IRAM_ATTR
[esp32]
- recompiled lwip for NTP server support from DHCP answer (IDF 4.4.2)
[esp8266]
- analogWrite now makes use of analogWriteRange set to 1023 to match previous
defaults
- setting up defaults parittionning IRAM to 32kb (usual defaults) in
boards.local.txt
=== Release 220328
- save WiFi credentials even if wrongly typed or end device has not been able
......
(c) F.Thiebolt Université Toulouse3, Laboratoire IRIT
#
# neOCampus operation
# (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT
=== (upcoming) HW Release neOSensorV5.2
- add 0805 cap for those ESP32 that miss it on EN pin
......
......@@ -11,6 +11,7 @@ All this work was undertaken at Université Toulouse 3 / IRIT laboratory in the
![neOSensorv5](/images/neOSensorV5.jpg)
## NEWS ##
* **[Aug.22]** bumps to esp8266 3.0.2; bumps to esp32 2.0.4 along with recompiled lwip
* **[Nov.21]** added support for various serial sensors like PMSx003, SDS011 and IKEA Vindriktning :D
* **[Aug.21]** added support for digital inputs (PIR & switches)
introduced the cooldown approach and data integration
......@@ -39,8 +40,8 @@ First of all, you ought to install esp32, esp8266 or CubeCell support in your Ar
| Device | Release | Arduino Board Manager json file |
|----------|---------|------------------------------------------------------------------------------------------------------------|
| esp8266 | 2.7.1 | https://arduino.esp8266.com/stable/package_esp8266com_index.json |
| esp32 | 1.0.6 | https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json |
| esp8266 | 3.0.2 | https://arduino.esp8266.com/stable/package_esp8266com_index.json |
| esp32 | 2.0.4 | https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json |
| CubeCell | *latest* | https://github.com/HelTecAutomation/CubeCell-Arduino/releases/download/V1.3.0/package_CubeCell_index.json |
| stm32 | *latest* | https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json |
......
......@@ -26,6 +26,8 @@ neOSensor.build.vtable_flags=-DVTABLES_IN_FLASH
neOSensor.build.exception_flags=-fno-exceptions
neOSensor.build.stdcpp_lib=-lstdc++
neOSensor.build.sslflags=
# [aug.22] set default 32KB balanced IRAM / ICACHE
neOSensor.build.mmuflags=-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000
neOSensor.build.debug_port=
neOSensor.build.debug_level=
......
......@@ -245,15 +245,21 @@ bool setupWiFi( wifiParametersMgt *wp ) {
// TM1637 7 segment display parameters
WiFiManagerParameter p_sevenSegTM1637("sevenSegTM1637", "TM1637 7-seg (DIO=2,CLK=SCL)", "T", 2, _customHtml_checkbox, WFM_LABEL_AFTER);
if( wp->isEnabled7segTM1637() ) {
// [Jun.18] HACK that requires modification in WiFiManager
WiFiManagerParameter p_sevenSegTM1637("sevenSegTM1637", "TM1637 7-seg (DIO=2,CLK=SCL)", "T", 2, _customHtml_checkbox_checked, WFM_LABEL_AFTER);
#warning "REMOVE HACK below !"
/* [Jun.18] HACK that requires modification in WiFiManager
p_sevenSegTM1637._customHTML = _customHtml_checkbox_checked;
*/
}
// PIR sensor
WiFiManagerParameter p_PIRsensor("PIRsensor", "PIR sensor (pin=5)", "T", 2, _customHtml_checkbox, WFM_LABEL_AFTER);
if( wp->isEnabledPIR() ) {
// [Jun.18] HACK that requires modification in WiFiManager
WiFiManagerParameter p_PIRsensor("PIRsensor", "PIR sensor (pin=5)", "T", 2, _customHtml_checkbox_checked, WFM_LABEL_AFTER);
#warning "REMOVE HACK below !"
/* [Jun.18] HACK that requires modification in WiFiManager
p_PIRsensor._customHTML = _customHtml_checkbox_checked;
*/
}
......@@ -503,9 +509,10 @@ const char *getCurTime( const char *fmt ) {
*/
bool _http_get( const char *url, char *buf, size_t bufsize, const char *login, const char *passwd ) {
WiFiClient client;
HTTPClient http;
http.begin(url);
http.begin(client, url);
log_debug(F("\n[HTTP] GET url : ")); log_debug(url); log_flush();
// authentication ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment