![Mediatek Labs LinkIt Developer'S Manual Download Page 24](http://html1.mh-extra.com/html/mediatek-labs/linkit/linkit_developers-manual_1760805024.webp)
MediaTek LinkIt™ Development
Platform for RTOS Wi-Fi Developer's
Guide
© 2015 - 2017 MediaTek Inc.
Page 20 of 36
This document contains information that is proprietary to MediaTek Inc. (“MediaTek”) and/or its licensor(s).
Any unauthorized use, reproduction or disclosure of this document in whole or in part is strictly prohibited.
•
The AP and APCLI should have the same bandwidth in repeater mode.
•
The AP and APCLI should stay on the same channel as the remote AP.
•
The repeater mode doesn’t support WPS.
•
The repeater mode doesn’t support power saving option.
The following Wi-Fi APIs cannot operate in repeater mode, as shown in Table 7.
Table 7. The functions not supported in repeater mode
API
API
wifi_wps_connection_by_pin()
wifi_config_set_dtim_interval()
wifi_wps_config_set_device_info
()
wifi_config_get_dtim_interval()
wifi_wps_config_get_device_info
()
wifi_config_set_listen_interval()
wifi_wps_config_set_auto_connec
ti ()
wifi_config_get_listen_interval()
wifi_wps_config_get_auto_connec
ti ()
wifi_wps_config_get_pin_code()
wifi_wps_connection_by_pbc()
There are two methods to configure the Wi-Fi module in repeater mode:
•
Using the static method to initialize the repeater mode at system reboot with the
wifi_init()
API.
•
Using the dynamic method to provide Wi-Fi settings in the configuration APIs. The new settings take
effect once the APIs reload.
2.3.2.
Using the static method
Before applying this method, a few assumptions to make:
•
The repeater operates on channel 6 with allocated bandwidth of 20MHz.
•
The AP port is configured with an SSID of "
SSID_2
", the authorization mode is WPA-PSK, AES encrypted,
and the password is "
87654321
".
•
The AP Client port is configured with an SSID of "SSID_1", the authorization mode is WPA/WPA2-PSK and
TKIP+AES encrypted and the password is "12345678".
1)
Define a configuration structure.
wifi_config_t config = {0};
2)
Set the parameters of the
wifi_config_t
structure.
config.opmode = WIFI_MODE_REPEATER;
strcpy((char *)config.sta_config.ssid, "SSID_1");
config.sta_config.ssid_length = strlen("SSID_1");
strcpy((char *)config.sta_config.password, "12345678");
config.sta_config.password_length = strlen("12345678");
strcpy((char *)config.ap_config.ssid, "SSID_2");
config.ap_config.ssid_length = strlen("SSID_2");
config.ap_config.auth_mode = WIFI_AUTH_MODE_WPA_PSK;
config.ap_config.encrypt_type = WIFI_ENCRYPT_TYPE_AES_ENABLED;
strcpy((char *)config.ap_config.password, "87654321");
config.ap_config.password_length = strlen("87654321");