MediaTek LinkIt™ Connect 7681 Developer's Guide
© 2015, 2016 MediaTek Inc.
Page 43 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.
5.2.
Configuring MT7681 as an AP
This section describes how to code MT7681 so that it acts as an AP and lets other devices (such as
mobile phones) connect to it and retrieve data. The steps to achieve this are as follows:
1)
Set the default configuration of MT7681 to AP mode.
Set the default configuration (SSID, password, and authentication mode) in the macro
ap_pub.c
,
as follows:
#define AP_MODE_OPEN 0
#define AP_MODE_WPAPSK_TKIP 1
#define AP_MODE_WPA2PSK_AES 2
#define AP_MODE_WPA1WPA2PSK_TKIPAESMIX 3
/*MT7681’s Default Authtication mode in AP mode*/
#define DEFAULT_AP_MODE AP_MODE_WPA1WPA2PSK_TKIPAESMIX
/*MT7681’s Default SSID in AP mode*/
#define Default_Ssid "MT7681_AP1"
/*MT7681’s Default Password in AP mode*/
#define Default_Password "12345678"
If there are no valid AP settings in Flash MT7681 uses these default settings, which are
stored to Flash by
load_ap_cfg()
when MT7681 starts up.
The position of the AP setting in the Flash is shown in Figure 24.
Figure 24 The position of the AP setting in Flash
The AP configuration can be changed while MT7681 is running using the AT command
AT#SoftApConf -s[SSID] -p[Password] -c[Channel] -a[AuthMode]
. This command will not
store the modified AP settings to Flash, to do this the AT command
AT#SoftApConf -m0
is used.
2)
Boot MT7681 to AP mode
During startup the boot loader reads the
Firmware Boot Index
setting from Flash to
determine whether the Station image or AP image is to be loaded to SRAM and run. For
more information see 4.3, “Firmware boot up flow”.
Changing the value of
Firmware Boot Index
during Recovery mode by sending AT
command
AT#FLASH -s0x18001 -v1
will instruct MT7681 to boot to AP mode.