![Mediatek Labs LinkIt Connect 7681 Developer'S Manual Download Page 57](http://html1.mh-extra.com/html/mediatek-labs/linkit-connect-7681/linkit-connect-7681_developers-manual_1760804057.webp)
MediaTek LinkIt™ Connect 7681 Developer's Guide
© 2015, 2016 MediaTek Inc.
Page 52 of 65
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
Figure 25 The reset switch on the LinkIt Connect 7681 development board
6.3.
Use Log to debug
MT7681 provides features for outputting debug messages to a log on UART. To enable this
feature, set
PRINT_FLAG
in
iot_custom.c
to
TRUE
as follows:
bool PRINT_FLAG
=
TRUE
;
6.3.1.
Using log to debug in Station mode
If MT7681 is in station mode with
PRINT_FLAG=TRUE
and is connected to a wireless AP defined by
Smart Connection, the following is a typical debug log:
==> Recovery Mode /* start to running recovery/Calibration image*/
<== Recovery Mode /* end to running recovery/Calibration image*/
(-) /* start to running station image*/
SM=0, Sub=0 /* Change to “WIFI_STATE_INIT” */
SM=1, Sub=0 /* Change to “WIFI_STATE_SMTCNT” */
[WTask]5001 /*--output timer log period to notice system alive--*/
SM=2, Sub=0 /* Change to “WIFI_STATE_SCAN” */
SM=3, Sub=0 /* Change to “WIFI_STATE_AUTH”, going to send Auth
Request*/
Auth with:ssid = RalinkAP, auth mode = 0
, /* target AP’s SSID and AuthMode
*/
SM=3, Sub=1 /* Change to “WIFI_STATE_AUTH” waiting for Auth
Response*/
SM=4, Sub=0 /* Change to “WIFI_STATE_ASSOC”, going to send Assoc
Request*/
SM=4, Sub=1 /* Change to “WIFI_STATE_ASSOC”, waiting Assoc Response
*/
[WTask]10005
SM=5, Sub=0 /* Change to “WIFI_STATE_4WAY”, start to 4 way
handshake*/
SM=6, Sub=0 /* Change to “WIFI_STATE_CONNED”, start to get IP*/
[WTask]15006
Got IP:192.168.2.12
/* Got IP from target AP*/
[WTask]20009