Commit 32fe0911 by zhanggf4

ssl_api OTA and Smartconfig.

parent 6a38409e
......@@ -136,7 +136,6 @@ int IOTDev_GetAttribute(UINT32 attribute_id, OCTData *attr)
return E_SUCCESS;
}
int iOta = 0;
int IOTDev_ExecuteAction(UINT32 action_id, OCTData *param)
{
UINT32 attribute_id[1];
......@@ -153,9 +152,6 @@ int IOTDev_ExecuteAction(UINT32 action_id, OCTData *param)
log_debug0("zcf execute action(%08x) onoff=%d\n", (unsigned int)action_id, (int)(param->value.Integer.Integer));
printf("##########execute action %d\n", param->value.Integer.Integer);
attribute_id[0] = GARDGET_PLUG_ATTRIBUTE_ONOFF;
if ((iOta ++) > 6) {
IOTOTA_Start("1");
}
break;
case GARDGET_PLUG_ACTION_OTA_CHECK:
log_debug0("execute action(%08x) ota check\n", action_id);
......
......@@ -402,6 +402,23 @@ int IOTSysP_ParamSave(void *param,int size)
return E_SUCCESS;
}
int IOTSysP_GetMemParam(void *mem, int size)
{
return E_FAILED;
}
int IOTSysP_SetMemParam(void *mem, int size)
{
#if 0
if(system_rtc_mem_write(64,mem,size) != 0)
{
return E_SUCCESS;
}
#endif
return E_FAILED;
}
static int IOTSys_Check_Flash_Size(void)
{
return E_SUCCESS;
......
......@@ -629,6 +629,7 @@ int IOTCloudI_Firmware(void)
UINT32 retval = E_FAILED;
cJSON *request = NULL;
SendMsgUnit *sendmsg = NULL;
char version[16];
//check cloud connected status
CheckCloudIfConnected();
......@@ -649,7 +650,8 @@ int IOTCloudI_Firmware(void)
}
//{"version":1000}
cJSON_AddNumberToObject(request, "version", atoi(IOTDev_AdapterVersion()));
memset(version, 0, sizeof(version));
cJSON_AddNumberToObject(request, "version", atoi(IOTDev_AdapterVersion(version)));
cJSON_AddStringToObject(request, "os_version", IOTDEVICE_OSVERSION);
cJSON_AddStringToObject(request, "country_code", IOTDEVICE_COUNTRYCODE);
cJSON_AddItemToObject(sendmsg->root, "request", request);
......
......@@ -136,30 +136,26 @@ int IOTConfRI_CertSize(void)
UINT32 IOTConfRI_HubType(void)
{
return 1000102;//firmInfo.hub_type;hub type (1000101/1000102)
return firmInfo.hub_type;
}
const char *IOTConfRI_HubVendor(void)
{
//return "lenovo rtos wifi";//firmInfo.hub_vendor;
return firmInfo.hub_vendor;
}
UINT32 IOTConfRI_GadgetTypeID(void)
{
//return 203;//firmInfo.gadget_type_id;
return firmInfo.gadget_type_id;
}
const char *IOTConfRI_GadgetVendor(void)
{
//return "lenovo plug";//firmInfo.gadget_vendor;
return firmInfo.gadget_vendor;
}
eRelLevel IOTConfRI_Cloud(void)
{
//return RELEASE_LEVEL_PVT;//firmInfo.cloud;
return firmInfo.cloud;
}
......@@ -173,7 +169,6 @@ const char *IOTConfRI_CloudStr(void)
const char *IOTConfRI_PD(char p[68])
{
char temp = 0;
return "lenovo_rtos_wifi";
memset(p, 0, sizeof(p));
memcpy(&p[0], firmInfo.pd0, 8); memcpy(&p[8], firmInfo.pd1, 8);
memcpy(&p[16], firmInfo.pd2, 8); memcpy(&p[24], firmInfo.pd3, 8);
......@@ -191,7 +186,6 @@ const char *IOTConfRI_PD(char p[68])
const char *IOTConfRI_PK(char p[68])
{
char temp = 0;
//return "5680d0b9613502e2ff8851b7ce914514";
memset(p, 0, sizeof(p));
memcpy(&p[0], firmInfo.pk0, 8); memcpy(&p[8], firmInfo.pk1, 8);
memcpy(&p[16], firmInfo.pk2, 8); memcpy(&p[24], firmInfo.pk3, 8);
......@@ -601,6 +595,72 @@ int IOTConfI_GetRefreshToken(char **token, char **spdid)
return E_SUCCESS;
}
/* ------------------------------------------------- *
* 保存内存的数据,用于热重启
* ------------------------------------------------- */
#define MEMPARAM_DATA_SIZE (512-128)
#define MEMPARAM_MAGICNUM (0xCB267FAA)
typedef struct {
UINT32 magicNumber;
int type;
char data[MEMPARAM_DATA_SIZE];
}MemParam;
int IOTConfMI_Get(int type, void *mem, int size)
{
MemParam memparam;
memset(&memparam, 0, sizeof(MemParam));
if(IOTSysP_GetMemParam((void*)&memparam, size) != E_SUCCESS) {
return E_FAILED;
}
if(memparam.magicNumber != MEMPARAM_MAGICNUM || memparam.type != type){
log_debug0("invalid data\n");
return E_INVALID;
}
if(mem != NULL && size > 0) {
memcpy(mem, memparam.data, size);
}
return E_SUCCESS;
}
int IOTConfMI_Set(int type, void *mem, int size)
{
MemParam memparam;
if(size > MEMPARAM_DATA_SIZE) {
return E_PARAM_ERROR;
}
memset(&memparam, 0, sizeof(MemParam));
memparam.magicNumber = MEMPARAM_MAGICNUM;
memparam.type = type;
if(mem != NULL && size > 0) {
memcpy(memparam.data, mem, size);
}
return IOTSysP_SetMemParam((void*)&memparam, size);
}
int IOTConfMI_Clear(void)
{
MemParam memparam;
memset(&memparam, 0, sizeof(MemParam));
return IOTSysP_SetMemParam((void*)&memparam,sizeof(MemParam));
}
int IOTConf_QuickRestart(void)
{
UINT32 magicNumber = 0x00;
if(IOTSysP_GetMemParam((void *)&magicNumber,sizeof(magicNumber)) != E_SUCCESS)
{
return 0;
}
if(magicNumber == MEMPARAM_MAGICNUM)
{
return 1;
}
return 0;
}
void IOTConfI_Exit(void)
{
if(g_access_token != NULL) {
......@@ -637,8 +697,7 @@ int IOTConfI_Init(void)
return E_FAILED;
}
}
printf ("sdkParam.wifiFlag %d\n", sdkParam.wifiFlag);
g_usrDataSize = sdkParam.usrDataSize <= 0 ? 0 : sdkParam.usrDataSize;
g_wifiFlag = sdkParam.wifiFlag <= 0 ? 0 : sdkParam.wifiFlag;
g_otaFlag = sdkParam.otaFlag <= 0 ? 0 : sdkParam.otaFlag;
......
......@@ -34,5 +34,14 @@ int IOTConfI_SetOtaFlag(int otaResult);
int IOTConfI_SetRefreshToken(char *token, char *spdid);
int IOTConfI_GetRefreshToken(char **token, char **spdid);
/* ====================
* 内存参数读写区(热重启)
*/
#define MEMPARAM_TYPE_NONE (0)
#define MEMPARAM_TYPE_AUTH_FAILED (1)
int IOTConfMI_Get(int type, void *mem, int size);
int IOTConfMI_Set(int type, void *mem, int size);
int IOTConfMI_Clear(void);
#endif //!_CONFIGDATA_HEADER_
......@@ -4,7 +4,7 @@
#include "datatype.h"
#include "rtos.h"
#define VERSION "0.2.0.20180606"
#define VERSION "0.2.4.20180614"
typedef struct {
char uuid[SHORTSTRING];
......
......@@ -13,6 +13,11 @@ void IOTConfI_Exit(void);
int IOTSDK_Init(void)
{
int retval = E_FAILED;
if(IOTConfRI_Cloud()==RELEASE_LEVEL_API) {
IOTDM_LogLevel(-1);
}
retval = IOTConfI_Init();
if(retval == E_SUCCESS) {
int v1,v2,v3;char version[32];
......@@ -25,7 +30,8 @@ int IOTSDK_Init(void)
os_printf("GadgetTypeID: %d\n", IOTConfRI_GadgetTypeID());
os_printf("MAC Address : %s\n", IOTSys_Mac());
os_printf("SDK Version : %s\n", version);
os_printf("ADA Version : %s\n", IOTDev_AdapterVersion());
memset(version, 0, sizeof(version));
os_printf("ADA Version : %s\n", IOTDev_AdapterVersion((version)));
os_printf("Server : %s\n", IOTConfRI_CloudStr());
os_printf("==========================================\n");
} else {
......
......@@ -11,6 +11,7 @@ typedef struct
char serverlevel[8];
char pre_code[128];
char time_zone[32];
char reserved[16];
}ApInfo;
int IOTWifi_Start(int force, ApInfo *apInfo);
......
......@@ -5,10 +5,6 @@
#include "datatype.h"
#include "device.h"
/* Usser configure. */
/* Wifi config 512 bit (0x80000 - 0x200 ).*/
const char *IOTSys_Mac(void);
void IOTSys_Reboot(void);
UINT32 IOTSysP_Random(int max);
......@@ -32,7 +28,7 @@ void IOTDev_Event(DMEvent *event);
DeviceInformation *IOTDev_DeviceInformation(void);
int IOTDev_GetAttribute(UINT32 attribute_id, OCTData *attr);
int IOTDev_ExecuteAction(UINT32 action_id, OCTData *param);
const char * IOTDev_AdapterVersion(void);
const char * IOTDev_AdapterVersion(char *version);
int IOTWebsocket_Init(void);
void IOTWebsocket_Exit(void);
......
......@@ -47,6 +47,7 @@ typedef long long INT64;
#define E_WRITE (-22)
#define E_AUTH_WAIT (-23)
#define E_ACCEPT_TEM_UNAVAIL (-24)
// release version
typedef enum {
......
......@@ -107,54 +107,103 @@ static int content_length(char *buffer,
}
return -1;
}
static char *httpreq_sslreceive(
static int httpreq_sslread(
SSL_Handle handle,
char *recv_buf, UINT32 buff_length)
char *recv_buf, UINT32 buff_length,
int *content_len)
{
int recv_len = 0;
int content_len = 0;
int retval = E_FAILED;
log_assert(handle != NULL);
log_assert(recv_buf != NULL);
log_assert(buff_length > 0);
log_assert(content_len > 0);
recv_len = IOTSSL_Read(handle, buff_length, recv_buf);
if(recv_len < 0) {
if(recv_len <= 0) {
log_error("Read response error(%d)\n", recv_len);
goto failed;
}
log_debug0("recv_data: (%d)%s\n", recv_len, recv_buf);
content_len = content_length(recv_buf, "Content-Length", recv_len);
if(content_len < 0) {
content_len = content_length(recv_buf, "content-cength", recv_len);
if(content_len < 0) {
*content_len = content_length(recv_buf, "Content-Length", recv_len);
if(*content_len < 0) {
*content_len = content_length(recv_buf, "content-cength", recv_len);
if(*content_len < 0) {
log_error("Get Content_Length failed\n");
recv_len = -1;
goto failed;
}
}
log_debug0("Get Content_Length: %d\n", content_len);
if(content_len > 0) {
char *pbody = recv_buf + recv_len - content_len;
log_debug0("Get response body:%s\n", pbody);
return pbody;
log_debug0("Get Content_Length: %d\n", *content_len);
failed:
return recv_len;
}
static int httpreq_sslreadn(
SSL_Handle handle,
int content_len,
int read_sizemax,
writedata_cb cb, void *param)
{
int receive_size;
int receive_reseved = read_sizemax;
char *recv_buff = NULL;
log_assert(handle != NULL);
log_assert(content_len > 0);
log_assert(read_sizemax > 0);
log_assert(cb != NULL);
log_debug0("download file size=%d\n", content_len);
recv_buff = IOTM_Malloc(read_sizemax);
if(recv_buff == NULL) {
log_error("insufficient memory\n");
goto failed;
}
receive_size = (content_len >= read_sizemax)?read_sizemax:content_len;
while(1) {
int received;
// read firmware file context...
memset(recv_buff, 0, read_sizemax);
received = IOTSSL_Readn(handle, receive_size, recv_buff);
if(received <= 0) {
log_error("Read response error(%d)\n", received);
goto failed;
}
log_debug2("read (%d)..\n", received);
cb(recv_buff, received, param);
receive_reseved -= received;
log_debug2("received:%d / %d\n", receive_reseved, content_len);
if(receive_reseved == 0) {
break;
}
log_assert(receive_reseved > 0);
if(receive_reseved >= read_sizemax) {
receive_size = read_sizemax;
} else {
receive_size = receive_reseved;
}
msleep(10);
}
return recv_buf;
return E_SUCCESS;
failed:
return NULL;
return E_FAILED;
}
static int iothttp_request(
const char *server_name, int server_port,
const char *cert, const char *req_url, int req,
char **headers, char *data, int data_len,
char *response)
char *response, int read_sizemax, writedata_cb cb, void *param)
{
#define HTTPS_RECEIVE_BUFFER (1024)
char *recv_buff = NULL;
char *recv_data = NULL;
int recv_len = NULL;
int retval = E_FAILED;
int content_len = 0;
SSL_Handle handle = NULL;
log_assert(req == 0 || req == 1);
......@@ -165,15 +214,16 @@ static int iothttp_request(
// connect
handle = IOTSSL_New(server_name, server_port, cert);
if(handle == NULL) {
return E_FAILED;
log_assert(IOTSSL_GetError() != E_SUCCESS);
return IOTSSL_GetError();
}
// send
// send request
if(httpreq_sslsend(handle, server_name, headers, req_url, req,
data, (data==NULL?0:iots_strlen(data))) != E_SUCCESS) {
log_error("Https send failed\n");
goto failed;
}
// receive
// receive header
recv_buff = IOTM_Malloc(HTTPS_RECEIVE_BUFFER);
if(recv_buff == NULL) {
log_error("insufficient memory\n");
......@@ -181,14 +231,30 @@ static int iothttp_request(
}
memset(recv_buff,0,HTTPS_RECEIVE_BUFFER);
recv_data = httpreq_sslreceive(handle, recv_buff, HTTPS_RECEIVE_BUFFER);
if(recv_data == NULL) {
recv_len = httpreq_sslread(handle, recv_buff, HTTPS_RECEIVE_BUFFER,
&content_len);
if(recv_len <= 0) {
goto failed;
}
log_assert(content_len >= 0);
if(response != NULL) {
iots_strcpy(response, recv_data);
if(content_len > 0) {
char *pbody = recv_buff + recv_len - content_len;
iots_strcpy(response, pbody);
} else {
iots_strcpy(response, recv_buff);
}
}
IOTM_Free(recv_buff);
recv_buff = NULL;
// download files
if(content_len > 0 && read_sizemax > 0) {
if(httpreq_sslreadn(handle, content_len, read_sizemax, cb, param) != E_SUCCESS) {
goto failed;
}
}
retval = E_SUCCESS;
failed:
if(recv_buff != NULL) {
......@@ -208,7 +274,7 @@ int IOTHTTP_Get(
char **headers, char *data, int data_len,
char *response)
{
return iothttp_request(server_name, server_port, cert, req_url, 0, headers, data, data_len, response);
return iothttp_request(server_name, server_port, cert, req_url, 0, headers, data, data_len, response, 0, NULL, NULL);
}
int IOTHTTP_Post(
const char *server_name, int server_port,
......@@ -216,6 +282,13 @@ int IOTHTTP_Post(
char **headers, char *data, int data_len,
char *response)
{
return iothttp_request(server_name, server_port, cert, req_url, 1, headers, data, data_len, response);
return iothttp_request(server_name, server_port, cert, req_url, 1, headers, data, data_len, response, 0, NULL, NULL);
}
int IOTHTTP_Download(
const char *server_name, int server_port, const char *cert,
const char *req_url, int read_sizemax, writedata_cb cb, void *param)
{
return iothttp_request(server_name, server_port, cert, req_url, 0,
NULL, NULL, 0, NULL, read_sizemax, cb, param);
}
......@@ -35,6 +35,7 @@ int IOTQueue_UnitsNumber(void *Qhandle);
int IOTEncode_MD5(const char *inStr, unsigned int inlen, unsigned char *outStr);
int IOTEncode_MD5_Hex(const char *inStr, unsigned int inlen, unsigned char *outStr);
typedef int (*writedata_cb)(void *data, UINT32 size, void *param);
int IOTHTTP_Get(const char *server_name, int server_port,
const char *cert, const char *req_url,
char **headers, char *data, int data_len,
......@@ -43,13 +44,21 @@ int IOTHTTP_Post(const char *server_name, int server_port,
const char *cert, const char *req_url,
char **headers, char *data, int data_len,
char *response);
int IOTHTTP_Download(
const char *server_name, int server_port, const char *cert,
const char *req_url, int read_sizemax, writedata_cb cb, void *param);
typedef void* SSL_Handle;
void IOTSSL_Destroy(SSL_Handle handle);
SSL_Handle IOTSSL_New(const char *server_name, int server_port, const char *cert);
int IOTSSL_GetError(void);
int IOTSSL_Read(SSL_Handle handle, UINT32 read_length, void *read_buf);
int IOTSSL_Readn(SSL_Handle handle, UINT32 read_length, void *read_buf);
int IOTSSL_Write(SSL_Handle handle, char *data, int data_len);
SSL_Handle IOTSSL_ServerNew(const char *server_ip, int server_port,
const char *cert, int cert_len, const char *key, int key_len);
int IOTSSL_ServerAccept(SSL_Handle handle);
int IOTSSL_ServerShutdown(SSL_Handle handle);
#endif //!IOT_COMMON_HEADER
......@@ -8,13 +8,11 @@
#define BUFFER_SIZE 2048
#define OPENSSL_RECV_BUF_ONE_LEN 1024
#define OPENSSL_RECV_BUF_ALL_LEN 4096
#define OPENSSL_RECV_BUF_ALL_LEN 2048
#define OPENSSL_LOCAL_TCP_PORT 8443
#define OPENSSL_THREAD_NAME "openssl"
#define OPENSSL_THREAD_STACK_WORDS 2048
#define OPENSSL_THREAD_PRORIOTY 6
#define OPENSSL_FRAGMENT_SIZE 2048
typedef enum {
GET,
......
......@@ -2,16 +2,15 @@
//#include <stdlib.h>
//#include <stdio.h>
#include "cJSON.h"
#include "main.h"
//#include "iotcommon.h"
#include "iotcommon.h"
#include "redefine.h"
#include "datatype.h"
#include "iotsdk.h"
#include "rtos.h"
#include "include/device.h"
#include "iotsdk.h"
#include "configdata.h"
#define MODULE_TAG "WifiConfig"
#include "log.h"
#include "iotsdk_wifi.h"
#include "datatype.h"
#include "security_func.h"
#include "cmsis_os.h"
......@@ -37,11 +36,18 @@ int IOTWifi_Start(int force,ApInfo *apInfo)
int retval = E_FAILED;
char code_challenge[36];
char code_verifier[16];
char version[16];
DMEvent event;
char *country_code = "cn"; //US.
log_assert(apInfo != NULL);
if(IOTConfMI_Get(MEMPARAM_TYPE_AUTH_FAILED, apInfo, sizeof(ApInfo)) == E_SUCCESS) {
log_assert(sizeof(apInfo->reserved) == sizeof(code_verifier));
memcpy(code_verifier, apInfo->reserved, sizeof(apInfo->reserved));
log_debug0("get mem param: %s->%s->%s->%s\n", apInfo->ssid, apInfo->pwd, apInfo->reserved, apInfo->pre_code);
IOTConfMI_Clear();
goto sta_auth;
}
event.event = IOTDM_EVENT_NETWORK_CONFIG;
if(!force && IOTConf_GetWifiFlag()) {
log_debug0("wifi is already configed\n");
......@@ -66,11 +72,11 @@ int IOTWifi_Start(int force,ApInfo *apInfo)
memset(code_verifier, 0, sizeof(code_verifier));
iots_sprintfs(code_verifier, sizeof(code_verifier), "%d%d", IOTSysP_Random(10000), IOTSysP_Random(10000));
printf("code_verifier %s\n", code_verifier);
memset(code_challenge, 0, sizeof(code_challenge));
IOTEncode_MD5_Hex(code_verifier, iots_strlen(code_verifier), code_challenge);
memset(buffer, 0, BUFFER_LENGTH);
memset(version, 0, sizeof(version));
iots_sprintfs(buffer, sizeof(buffer),
"{\"hubtype\":\"%d\", "
"\"macaddr\":\"%s\", "
......@@ -82,7 +88,7 @@ int IOTWifi_Start(int force,ApInfo *apInfo)
(const unsigned char *)IOTSys_Mac(),
country_code,
IOTConfRI_CloudStr(),
IOTDev_AdapterVersion(), code_challenge);
IOTDev_AdapterVersion(version), code_challenge);
log_debug0("softap started, then start https server, response=%s\n", buffer);
if(Wificonfig_StartHttpsServer(buffer,apInfo) != E_SUCCESS) {
......@@ -95,6 +101,7 @@ int IOTWifi_Start(int force,ApInfo *apInfo)
log_error("softap stop failed\n");
}
sta_auth:
log_debug0("softap stoped, then do staticon config\n");
if(IOTWifiP_StationConfig(apInfo->ssid,apInfo->pwd) != E_SUCCESS) {
log_error("station config failed\n");
......@@ -116,7 +123,7 @@ int IOTWifi_Start(int force,ApInfo *apInfo)
ssleep(2);
}
log_debug0("station connect success, then set wificonfig flag\n");
log_debug0("station connect success, then get access token\n");
{
int retry = 10;
while(retry-- > 0) {
......@@ -135,6 +142,14 @@ int IOTWifi_Start(int force,ApInfo *apInfo)
}
if(retval == E_SUCCESS) {
retval = IOTConfI_SetWifiFlag(1);
} else if(retval == E_NO_MEMORY) {
log_assert(sizeof(apInfo->reserved) == sizeof(code_verifier));
memcpy(apInfo->reserved, code_verifier, sizeof(apInfo->reserved));
log_debug0("set mem param: %s->%s->%s->%s\n", apInfo->ssid, apInfo->pwd, apInfo->reserved, apInfo->pre_code);
if(IOTConfMI_Set(MEMPARAM_TYPE_AUTH_FAILED, apInfo, sizeof(ApInfo)) == E_SUCCESS) {
log_debug0("check no memeory to restart\n");
IOTSys_Reboot();
}
}
failed:
if(buffer != NULL) {
......
......@@ -108,78 +108,10 @@ void user_task(void *arg)
return;
}
if(xTaskCreate(main_task, ((const char*)"main_task"), 1024*4, NULL, tskIDLE_PRIORITY + 3 + PRIORITIE_OFFSET, NULL) != pdPASS)
if(xTaskCreate(main_task, ((const char*)"main_task"), 1024*1 + 512, NULL, tskIDLE_PRIORITY + 3 + PRIORITIE_OFFSET, NULL) != pdPASS)
printf("\n\r%s xTaskCreate(init_thread) failed", __FUNCTION__);
for(;;) {
rtw_msleep_os(6000);
}
#if 0
IOTDM_LogLevel(2);
rtw_msleep_os(3000);
rtc_write(1528804180);
if(IOTRtos_init()!= 0) {
printf("RTOS init failed\n");
return;
}
if(IOTSDK_Init()!= 0) {
printf("confit init failed\n");
return;
}
rtw_msleep_os(3000);
if(!IOTConf_GetWifiFlag()) {
softap:
printf("Enter softap_task\r\n");
g_pstInfo = malloc(sizeof(ApInfo));
if(g_pstInfo == NULL)
{
printf("Malloc failed\n");
return;
}
memset(g_pstInfo, 0, sizeof(ApInfo));
IOTWifi_Start(0,g_pstInfo);
log_debug0("delete softap task......\n");
if(strlen(g_pstInfo->utc) != 0)
{
memset(g_utc,0,sizeof(g_utc));
memcpy(g_utc,g_pstInfo->utc, strlen(g_pstInfo->utc));
}
if(g_pstInfo != NULL)
{
free(g_pstInfo);
g_pstInfo = NULL;
}
}else {
while (1) {
if (0 != IOTWifi_ConnectWifiByConf()) {
printf("Connect Falied\r\n");
//goto softap;
} else {
break;
}
if (!IOTConf_GetWifiFlag()) {
goto softap;
}
}
rtw_msleep_os(3000);
}
//xSemaphoreGive(mutex);
//vTaskDelete(NULL);
IOTDM_Loop();
for(;;) {
rtw_msleep_os(6000);
printf("user_thread alive \n");
}
#endif
vTaskDelete(NULL);
}
void user_thread(void *param)
......
......@@ -157,6 +157,7 @@ static void ApUpgradeTask(void *arg)
IOTOTA_ApOTAStart();
log_debug0("delete ap upgrade task\n");
vTaskDelete(NULL);
IOT_GetHeapSize();
}
int IOTWifiP_SoftapStart(const char *hotspot)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment