update OTA code
This commit is contained in:
parent
7e2a7a567c
commit
961517db0a
10
main/main.c
10
main/main.c
@ -12,6 +12,7 @@
|
|||||||
#include "ota.h"
|
#include "ota.h"
|
||||||
#include "MCP39F501.h"
|
#include "MCP39F501.h"
|
||||||
#include "wifi_OTA.h"
|
#include "wifi_OTA.h"
|
||||||
|
#include "wifi_Init.h"
|
||||||
|
|
||||||
#define IMEI "353165803930522"
|
#define IMEI "353165803930522"
|
||||||
|
|
||||||
@ -48,10 +49,13 @@ void app_main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGI(TAG," -------------> Wifi Connected ... :)");
|
|
||||||
port_blue_led_on();
|
|
||||||
|
|
||||||
// wifi_ota_start_firmware_update(IMEI);
|
port_blue_led_on();
|
||||||
|
wifi_first_init();
|
||||||
|
Connect_wifi_sta(WIFI_MODE_STA);
|
||||||
|
ESP_LOGI(TAG," -------------> Wifi Connected ... :)");
|
||||||
|
|
||||||
|
wifi_ota_start_firmware_update(IMEI);
|
||||||
|
|
||||||
|
|
||||||
while(1){
|
while(1){
|
||||||
|
|||||||
@ -209,6 +209,7 @@ esp_err_t Connect_wifi_sta(uint8_t mode)
|
|||||||
{
|
{
|
||||||
/* Connecting to the network that has been registered since the last onboarding process
|
/* Connecting to the network that has been registered since the last onboarding process
|
||||||
* This if-block will be executed when doing the CHECK-IN process */
|
* This if-block will be executed when doing the CHECK-IN process */
|
||||||
|
ESP_LOGI(TAG," Device Onboarded.....Reading WiFi Credentials....");
|
||||||
nvm_read_wifi_credentials(Sta_Ssid,Sta_Pwd);
|
nvm_read_wifi_credentials(Sta_Ssid,Sta_Pwd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user