Skip to content

Commit 49de8e6

Browse files
committed
fix some problem
1 parent 84d0ae0 commit 49de8e6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

arc_design_contest/2018/Smart_Power_Saving_System_of_3D_Remote_Interaction/ARC/makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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

5252
MID_SEL = common
5353

arc_design_contest/2018/Smart_Power_Saving_System_of_3D_Remote_Interaction/ARC/vlsi_esp8266.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,16 @@ int vlsi_esp8266_mode_set(VLSI_ESP *obj)
181181

182182
int 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
}

arc_design_contest/2018/Smart_Power_Saving_System_of_3D_Remote_Interaction/ARC/vlsi_esp8266.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
*/
7071
int vlsi_esp8266_connect(VLSI_ESP *obj, char* ssid, char* key);
7172

0 commit comments

Comments
 (0)