File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
arc_design_contest/2018/Smart_Power_Saving_System_of_3D_Remote_Interaction/ARC Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 44# #
55
66# Application name
7- APPL ?= test
7+ APPL ?= NCKU_Smart_Power_Saving_System_of_3D_Remote_Interaction
88
99# Optimization Level
1010# Please Refer to toolchain_xxx.mk for this option
@@ -47,7 +47,7 @@ TOOLCHAIN ?= gnu
4747#
4848# root dir of embARC
4949#
50- EMBARC_ROOT = ../..
50+ EMBARC_ROOT = ../../../../..
5151
5252MID_SEL = common
5353
Original file line number Diff line number Diff line change @@ -181,12 +181,16 @@ int vlsi_esp8266_mode_set(VLSI_ESP *obj)
181181
182182int vlsi_esp8266_connect (VLSI_ESP * obj , char * ssid , char * key )
183183{
184- char cmd [] = "AT+CWJAP_CUR=\"VLSILAB_2G2\",\"vlsi95514\"\r\n" ;
185- /* EMBARC_PRINTF("wifi cmd: %s\ r\n", cmd); */
184+ /**To simplify the flow, I directly assigned the cmd*/
185+ char cmd [] = "AT+CWJAP_CUR=\"ssid\",\"passwd\"\ r\n";
186186
187+ if (strstr (cmd , ssid ) == NULL )
188+ {
189+ EMBARC_PRINTF ("Make shure the ssid and key in cmd string (vlsi_esp8266.c 189) are correct \r\n" );
190+ return AT_ERROR ;
191+ }
187192 obj -> uart -> uart_write (cmd , sizeof (cmd ));
188193
189- /* int f = vlsi_esp8266_get_repley(obj, NULL, 100); */
190194 int f = vlsi_esp8266_wait_repley (obj );
191195 return f ;
192196}
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ int vlsi_esp8266_mode_set(VLSI_ESP *obj);
6666
6767/** \brief esp8266 connect
6868* Connect to the AP by given it ssid and key.
69+ * This function still not very robust, make sure the ssid and key in this function are correct.
6970*/
7071int vlsi_esp8266_connect (VLSI_ESP * obj , char * ssid , char * key );
7172
You can’t perform that action at this time.
0 commit comments