Skip to content

Commit

Permalink
Version 2.4.2-beta1
Browse files Browse the repository at this point in the history
For testing purposes!

Changes since 2.4.1:

Fix: disable storage and usage of wifi parameters on ESP32 NVS partition
  • Loading branch information
arjenhiemstra committed Sep 27, 2022
1 parent 092128e commit 7f6d76f
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 17 deletions.
8 changes: 4 additions & 4 deletions compiled_firmware_files/firmware.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"2": {
"latest_fw": "2.4.1",
"link": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.4.1.bin",
"latest_beta_fw": "2.4.0-beta2",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.4.0-beta2.bin"
"latest_beta_fw": "2.4.2-beta1",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.4.2-beta1.bin"
},
"NON-CVE 1": {
"latest_fw": "2.4.1",
"link": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.4.1.bin",
"latest_beta_fw": "2.4.0-beta2",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.4.0-beta2.bin"
"latest_beta_fw": "2.4.2-beta1",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.4.2-beta1.bin"
}
}
}
Binary file not shown.
Binary file not shown.
32 changes: 27 additions & 5 deletions software/NRG_itho_wifi/src/task_syscontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ void wifiInit()
logInput("Setup: Wifi config load failed");
setupWiFiAP();
}
else if (!connectWiFiSTA())
else if (!connectWiFiSTA(true))
{
logInput("Setup: Wifi connect STA failed");
setupWiFiAP();
Expand Down Expand Up @@ -469,31 +469,54 @@ void setupWiFiAP()
logInput("wifi AP mode started");
}

bool connectWiFiSTA()
bool connectWiFiSTA(bool restore)
{

wifiModeAP = false;
D_LOG("Connecting to wireless network...\n");

WiFi.persistent(false); // Do not use SDK storage of SSID/WPA parameters
// Do not use SDK storage of SSID/WPA parameters
WiFi.persistent(false);

// Set wifi mode to STA for next step (clear config)
if (!WiFi.mode(WIFI_STA))
D_LOG("Unable to set WiFi mode to STA\n");

if (!WiFi.disconnect(true))
// Clear any saved wifi config
if (restore)
{
esp_err_t wifi_restore = esp_wifi_restore();
D_LOG("esp_wifi_restore: %s\n", esp_err_to_name(wifi_restore));
}
// Disconnect any existing connections and clear
if (!WiFi.disconnect(true, true))
D_LOG("Unable to set wifi disconnect\n");

// Reset wifi mode to NULL
if (!WiFi.mode(WIFI_MODE_NULL))
D_LOG("Unable to set WiFi mode to NULL\n");

// Set hostname
bool setHostname_result = WiFi.setHostname(hostName());
D_LOG("WiFi.setHostname: %s\n", setHostname_result ? "OK" : "NOK");

// No AutoReconnect
if (!WiFi.setAutoReconnect(false))
D_LOG("Unable to set auto reconnect\n");

delay(200);

// Begin init of actual wifi connection

// Set correct mode
if (!WiFi.mode(WIFI_STA))
D_LOG("Unable to set WiFi mode\n");

// Do not use flash storage for wifi settings
esp_err_t wifi_set_storage = esp_wifi_set_storage(WIFI_STORAGE_RAM);
D_LOG("esp_wifi_set_storage: %s\n", esp_err_to_name(wifi_set_storage));

// No power saving
esp_err_t wifi_set_ps = esp_wifi_set_ps(WIFI_PS_NONE);
D_LOG("esp_wifi_set_ps: %s\n", esp_err_to_name(wifi_set_ps));

Expand Down Expand Up @@ -819,4 +842,3 @@ bool ithoI2CCommand(uint8_t remoteIndex, const char *command, cmdOrigin origin)

return true;
}

3 changes: 2 additions & 1 deletion software/NRG_itho_wifi/src/task_syscontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ void TaskSysControl(void *pvParameters);
void execSystemControlTasks();
void wifiInit();
void setupWiFiAP();
bool connectWiFiSTA();
bool connectWiFiSTA(bool restore = false);
void initSensor();
void initSensor();
void init_vRemote();
bool ithoInitCheck();
Expand Down
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

#define FWVERSION "2.4.1"
#define FWVERSION "2.4.2-beta1"
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/webroot/controls_js_gz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

const unsigned char controls_js_gz[] = {
0x1f, 0x8b, 0x8, 0x0, 0xfc, 0xa7, 0x32, 0x63, 0x2, 0xff, 0xed, 0x7d, 0xeb, 0x7a, 0xdb, 0x38, 0x92, 0xe8, 0x7f, 0x3f, 0x5, 0x9a, 0xc9, 0x8c, 0xa4, 0x6d, 0x89, 0x12, 0x25, 0xf9, 0xee, 0x68, 0xbe, 0xb4, 0x33, 0x99, 0xe4, 0x6c, 0xd2, 0xc9, 0xc6,
0x1f, 0x8b, 0x8, 0x0, 0x30, 0xde, 0x32, 0x63, 0x2, 0xff, 0xed, 0x7d, 0xeb, 0x7a, 0xdb, 0x38, 0x92, 0xe8, 0x7f, 0x3f, 0x5, 0x9a, 0xc9, 0x8c, 0xa4, 0x6d, 0x89, 0x12, 0x25, 0xf9, 0xee, 0x68, 0xbe, 0xb4, 0x33, 0x99, 0xe4, 0x6c, 0xd2, 0xc9, 0xc6,
0xe9, 0xf4, 0x7e, 0x27, 0x9d, 0xb5, 0x69, 0x91, 0xb2, 0x38, 0xa1, 0x44, 0x35, 0x49, 0xf9, 0x32, 0x19, 0xbf, 0xc1, 0x7e, 0xdf, 0xfe, 0x3c, 0xef, 0x77, 0x9e, 0xe4, 0x54, 0x15, 0x2e, 0x4, 0x78, 0x93, 0x64, 0x3b, 0xe9, 0x9e, 0x99, 0xb3,
0x3b, 0x1d, 0x53, 0x40, 0xa1, 0x50, 0x28, 0x14, 0x80, 0x42, 0xa1, 0x50, 0xd8, 0xba, 0x74, 0x63, 0x36, 0x8e, 0x96, 0xf3, 0x94, 0x3d, 0x61, 0xbd, 0xc3, 0x2d, 0xfc, 0x19, 0xa4, 0xd3, 0xe8, 0x34, 0x8c, 0xae, 0x72, 0x29, 0x33, 0xdf, 0xb,
0x96, 0x33, 0x48, 0x74, 0xfa, 0xbb, 0x5a, 0xf2, 0x34, 0xb8, 0x98, 0x42, 0x62, 0x7f, 0x7b, 0xc8, 0x13, 0x13, 0x7f, 0x9e, 0x44, 0x31, 0xa4, 0x74, 0x9c, 0xc3, 0xad, 0xad, 0xc4, 0x4f, 0x92, 0x20, 0x9a, 0x9f, 0xa4, 0x51, 0xec, 0x5e, 0xf8,
Expand Down
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/webroot/edit_html_gz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

const unsigned char edit_html_gz[] = {
0x1f, 0x8b, 0x8, 0x0, 0xfc, 0xa7, 0x32, 0x63, 0x2, 0xff, 0xe5, 0x5d, 0x6b, 0x5b, 0xdb, 0x48, 0xb2, 0xfe, 0x3e, 0xbf, 0x42, 0x28, 0xbb, 0x83, 0xb4, 0xd8, 0x92, 0x4d, 0x2, 0x21, 0x6, 0x93, 0xe5, 0x1a, 0x8, 0xd7, 0x70, 0xd, 0xc9, 0xc9, 0xd9,
0x1f, 0x8b, 0x8, 0x0, 0x30, 0xde, 0x32, 0x63, 0x2, 0xff, 0xe5, 0x5d, 0x6b, 0x5b, 0xdb, 0x48, 0xb2, 0xfe, 0x3e, 0xbf, 0x42, 0x28, 0xbb, 0x83, 0xb4, 0xd8, 0x92, 0x4d, 0x2, 0x21, 0x6, 0x93, 0xe5, 0x1a, 0x8, 0xd7, 0x70, 0xd, 0xc9, 0xc9, 0xd9,
0x47, 0x96, 0xda, 0xb6, 0x40, 0x96, 0x14, 0xa9, 0x8d, 0x6d, 0x76, 0x73, 0x7e, 0xfb, 0xa9, 0xea, 0x96, 0xe4, 0xd6, 0xd5, 0x98, 0xc9, 0xec, 0xce, 0x9c, 0x93, 0xcc, 0x13, 0x84, 0xfa, 0x56, 0x5d, 0x5d, 0x5d, 0xf5, 0x56, 0x75, 0xb5, 0x66,
0x63, 0x61, 0xf7, 0x6c, 0xe7, 0xea, 0xee, 0x7c, 0x4f, 0xea, 0xd3, 0x81, 0xf3, 0x8b, 0x4, 0x7f, 0xce, 0xaf, 0xb7, 0x8f, 0xf, 0x77, 0x24, 0xb9, 0xae, 0xeb, 0xb7, 0xaf, 0x77, 0x74, 0x7d, 0xf7, 0x6a, 0x57, 0xfa, 0x7c, 0x70, 0x75, 0x72,
0x2c, 0x35, 0xb5, 0x86, 0x74, 0x15, 0x18, 0x6e, 0x68, 0x53, 0xdb, 0x73, 0xd, 0x47, 0xd7, 0xf7, 0x4e, 0x65, 0x49, 0xee, 0x53, 0xea, 0xb7, 0x74, 0x7d, 0x34, 0x1a, 0x69, 0xa3, 0xd7, 0x9a, 0x17, 0xf4, 0xf4, 0xab, 0xb, 0x7d, 0x8c, 0xfd,
Expand Down
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/webroot/favicon_png_gz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

const unsigned char favicon_png_gz[] = {
0x1f, 0x8b, 0x8, 0x0, 0xfc, 0xa7, 0x32, 0x63, 0x2, 0xff, 0x1, 0x66, 0x9, 0x99, 0xf6, 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x20, 0x8, 0x6,
0x1f, 0x8b, 0x8, 0x0, 0x30, 0xde, 0x32, 0x63, 0x2, 0xff, 0x1, 0x66, 0x9, 0x99, 0xf6, 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x20, 0x8, 0x6,
0x0, 0x0, 0x0, 0x73, 0x7a, 0x7a, 0xf4, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc4, 0x0, 0x0, 0xe, 0xc4, 0x1, 0x95, 0x2b, 0xe, 0x1b, 0x0, 0x0, 0x9, 0x18, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0x9d,
0x97, 0x7b, 0x8c, 0x55, 0xd7, 0x75, 0x87, 0xbf, 0xb5, 0xcf, 0xb9, 0xe7, 0xbe, 0x66, 0xc6, 0xb7, 0x74, 0x5e, 0x19, 0x3f, 0x42, 0x46, 0x13, 0xec, 0xa2, 0xf8, 0x95, 0x46, 0x36, 0x6, 0x6c, 0x6, 0x8c, 0x61, 0x18, 0x83, 0x54, 0x48, 0x9a,
0x54, 0x6e, 0xdd, 0x34, 0xa9, 0x9c, 0xda, 0xea, 0xc3, 0xb5, 0x10, 0x42, 0x96, 0x8b, 0x90, 0x85, 0xa8, 0x85, 0x28, 0xb2, 0xa2, 0xa4, 0x71, 0x49, 0x42, 0x1d, 0xc7, 0x72, 0x12, 0x3b, 0x6a, 0xe2, 0xda, 0x63, 0x66, 0x8c, 0x4d, 0x61, 0x50,
Expand Down
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/webroot/index_html_gz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

const unsigned char index_html_gz[] = {
0x1f, 0x8b, 0x8, 0x0, 0xfc, 0xa7, 0x32, 0x63, 0x2, 0xff, 0xad, 0x96, 0x5f, 0x6f, 0xd3, 0x30, 0x10, 0xc0, 0xdf, 0xfb, 0x29, 0x4c, 0x10, 0x8, 0x24, 0xd2, 0x74, 0xf, 0x13, 0x68, 0x4d, 0x2a, 0x21, 0xd0, 0xc4, 0x24, 0x90, 0x60, 0xc, 0xf6, 0x88,
0x1f, 0x8b, 0x8, 0x0, 0x30, 0xde, 0x32, 0x63, 0x2, 0xff, 0xad, 0x96, 0x5f, 0x6f, 0xd3, 0x30, 0x10, 0xc0, 0xdf, 0xfb, 0x29, 0x4c, 0x10, 0x8, 0x24, 0xd2, 0x74, 0xf, 0x13, 0x68, 0x4d, 0x2a, 0x21, 0xd0, 0xc4, 0x24, 0x90, 0x60, 0xc, 0xf6, 0x88,
0xdc, 0xf8, 0xda, 0xdc, 0x70, 0x6c, 0x63, 0x5f, 0xba, 0x96, 0x4f, 0x8f, 0x9d, 0xa4, 0x5d, 0xff, 0x24, 0x9a, 0x44, 0x96, 0x97, 0xc4, 0xbe, 0xf3, 0xfd, 0xce, 0xe7, 0x73, 0xee, 0xd2, 0x67, 0x42, 0xe7, 0xb4, 0x31, 0xc0, 0xa, 0x2a, 0xe5,
0x6c, 0x94, 0x86, 0x17, 0x93, 0x5c, 0x2d, 0xb3, 0x8, 0x54, 0x34, 0x1b, 0xf9, 0x19, 0xe0, 0x62, 0x36, 0x62, 0xfe, 0x49, 0x4b, 0x20, 0xce, 0xf2, 0x82, 0x5b, 0x7, 0x94, 0x45, 0x15, 0x2d, 0xe2, 0x77, 0xd1, 0xbe, 0x48, 0xf1, 0x12, 0xb2,
0x68, 0x85, 0x70, 0x6f, 0xb4, 0xa5, 0x88, 0xe5, 0x5a, 0x11, 0x28, 0xaf, 0x7a, 0x8f, 0x82, 0x8a, 0x4c, 0xc0, 0xa, 0x73, 0x88, 0xeb, 0xc1, 0x1b, 0x86, 0xa, 0x9, 0xb9, 0x8c, 0x5d, 0xce, 0x25, 0x64, 0x67, 0xe3, 0x49, 0x87, 0x29, 0x1,
Expand Down
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/webroot/pure_min_css_gz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

const unsigned char pure_min_css_gz[] = {
0x1f, 0x8b, 0x8, 0x0, 0x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x8a, 0x6e, 0x7f, 0xda, 0x4c, 0xb3, 0xfa, 0xf0, 0x78, 0xa4, 0x44,
Expand Down
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/src/webroot/zepto_min_js_gz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

const unsigned char zepto_min_js_gz[] = {
0x1f, 0x8b, 0x8, 0x0, 0xfc, 0xa7, 0x32, 0x63, 0x2, 0xff, 0xb5, 0x3d, 0x6b, 0x77, 0xd3, 0xd6, 0x96, 0xdf, 0xe7, 0x57, 0xc8, 0x1a, 0xa6, 0x4b, 0x22, 0x8e, 0x92, 0x30, 0xf3, 0x65, 0x1c, 0x82, 0x17, 0xa5, 0xd0, 0x72, 0xb, 0x81, 0x4b, 0xd2, 0x96,
0x1f, 0x8b, 0x8, 0x0, 0x30, 0xde, 0x32, 0x63, 0x2, 0xff, 0xb5, 0x3d, 0x6b, 0x77, 0xd3, 0xd6, 0x96, 0xdf, 0xe7, 0x57, 0xc8, 0x1a, 0xa6, 0x4b, 0x22, 0x8e, 0x92, 0x30, 0xf3, 0x65, 0x1c, 0x82, 0x17, 0xa5, 0xd0, 0x72, 0xb, 0x81, 0x4b, 0xd2, 0x96,
0xe2, 0xa4, 0x5d, 0xb2, 0x7d, 0x9c, 0x8, 0x64, 0xc9, 0x95, 0xe4, 0x3c, 0x20, 0x99, 0xdf, 0x3e, 0xfb, 0x75, 0x5e, 0xb2, 0xe4, 0xc2, 0x9d, 0x35, 0xab, 0xac, 0x46, 0x3a, 0x3a, 0xcf, 0x7d, 0xf6, 0xd9, 0xef, 0xb3, 0xbd, 0xf7, 0x30, 0xf8,
0xa0, 0x56, 0x4d, 0x19, 0x5c, 0x1d, 0x24, 0x8f, 0x92, 0xfd, 0x60, 0x37, 0xf8, 0x4c, 0xaf, 0xea, 0x4a, 0x15, 0x4d, 0x90, 0x7e, 0x4c, 0x6f, 0x82, 0x45, 0x59, 0x2d, 0x83, 0x4c, 0xe9, 0x4f, 0x1f, 0xeb, 0x64, 0x56, 0x2e, 0xf7, 0xf2, 0x6c,
0xa6, 0x8a, 0x5a, 0x5, 0xf, 0xf7, 0xfe, 0x6d, 0xb0, 0x58, 0x17, 0xb3, 0x26, 0x2b, 0x8b, 0x20, 0x6a, 0x86, 0x81, 0x8a, 0x83, 0x2f, 0x41, 0xa8, 0x8b, 0xc2, 0xe0, 0xe8, 0x28, 0x68, 0x6e, 0x57, 0xaa, 0x5c, 0x4, 0x73, 0xb5, 0xc8, 0xa,
Expand Down

0 comments on commit 7f6d76f

Please sign in to comment.