|
|
@ -13,9 +13,8 @@ |
|
|
|
#include "task_w600.h" |
|
|
|
|
|
|
|
#include "app_config.h" |
|
|
|
#include "../msp/uart0.h" |
|
|
|
#include "../msp/uart2.h" |
|
|
|
#include "../tpc/at0d0a.h" |
|
|
|
#include "../msp/uart0.h" |
|
|
|
|
|
|
|
struct _s_task_gm35_gprs_ s_task_gm35_flow; |
|
|
|
|
|
|
@ -74,6 +73,14 @@ void L3_uart2_exp_protocol(TS_Handle_0d0a *p) |
|
|
|
{ |
|
|
|
s_task_gm35_flow.ins_ok = 1; |
|
|
|
} |
|
|
|
if(Lc_strStartsWith(pPara,"WIFI GOT IP")) |
|
|
|
{ |
|
|
|
s_task_gm35_flow.wifi_ok = 1; |
|
|
|
} |
|
|
|
if(Lc_strStartsWith(pPara,"CONNECT")) |
|
|
|
{ |
|
|
|
s_task_gm35_flow.wifi_ok = 1; |
|
|
|
} |
|
|
|
|
|
|
|
p->ok = 0; |
|
|
|
} |
|
|
@ -132,7 +139,7 @@ void L3_task_gm35_flow_init(U8 mode) |
|
|
|
#define TTSS_TASK_GM35_FLOW_AP_WAIT 0x21 |
|
|
|
|
|
|
|
|
|
|
|
#define INS_TIMEOUT 2 |
|
|
|
#define INS_TIMEOUT 5 |
|
|
|
#define GM35_SEND_DATA_INTERVAL 300 |
|
|
|
#define GM35_SEND_HEART_INTERVAL 60 |
|
|
|
#define GM35_SEND_CIPSTATUS_INTERVAL 5 |
|
|
@ -184,11 +191,12 @@ void L2_task_gm35_flow_handle(struct _s_task_gm35_gprs_ *s) |
|
|
|
TTSS_Task_step(TTSS_TASK_GM35_FLOW_ST_WIFI) |
|
|
|
L3_gm35_send_str(AT_INS_ST_WIFI); |
|
|
|
s->ins_ok = 0; |
|
|
|
s->wifi_ok = 0; |
|
|
|
s->ins_stmp = s_nos_tick.t_1s; |
|
|
|
L2_task_go_Tdelay(TTSS_TASK_GM35_FLOW_ST_WIFI_WAIT,D_Tdelay_300ms); |
|
|
|
|
|
|
|
TTSS_Task_step(TTSS_TASK_GM35_FLOW_ST_WIFI_WAIT) |
|
|
|
if(1 == s->ins_ok) |
|
|
|
if(1 == s->ins_ok && 1 == s->wifi_ok) |
|
|
|
{ |
|
|
|
L2_task_go_Tdelay(TTSS_TASK_GM35_FLOW_ST_CIPMUX0,0); |
|
|
|
} |
|
|
@ -217,7 +225,7 @@ void L2_task_gm35_flow_handle(struct _s_task_gm35_gprs_ *s) |
|
|
|
L3_gm35_send_str(AT_INS_ST_TCP); |
|
|
|
s->ins_ok = 0; |
|
|
|
s->ins_stmp = s_nos_tick.t_1s; |
|
|
|
L2_task_go_Tdelay(TTSS_TASK_GM35_FLOW_ST_TCP_WAIT,D_Tdelay_300ms); |
|
|
|
L2_task_go_Tdelay(TTSS_TASK_GM35_FLOW_ST_TCP_WAIT,D_Tdelay_5s); |
|
|
|
|
|
|
|
TTSS_Task_step(TTSS_TASK_GM35_FLOW_ST_TCP_WAIT) |
|
|
|
if(1 == s->ins_ok) |
|
|
@ -253,6 +261,7 @@ void L2_task_gm35_flow_handle(struct _s_task_gm35_gprs_ *s) |
|
|
|
|
|
|
|
TTSS_Task_step(TTSS_TASK_GM35_FLOW_ST_DATA) |
|
|
|
L0_uart0_uc('A'); |
|
|
|
L0_uart2_sendstr("abcdefg"); |
|
|
|
L2_task_go_Tdelay(TTSS_TASK_GM35_FLOW_ST_DATA,D_Tdelay_5s); |
|
|
|
|
|
|
|
|
|
|
@ -264,7 +273,6 @@ void L2_task_gm35_flow_handle(struct _s_task_gm35_gprs_ *s) |
|
|
|
|
|
|
|
TTSS_Task_step(TTSS_TASK_GM35_FLOW_AP) |
|
|
|
L0_uart0_uc('C'); |
|
|
|
L0_uart2_sendstr("abcdefg"); |
|
|
|
L2_task_go_Tdelay(TTSS_TASK_GM35_FLOW_ST_WAIT,D_Tdelay_10s); |
|
|
|
|
|
|
|
TTSS_Task_end(); |
|
|
|