![Mediatek Labs LinkIt Скачать руководство пользователя страница 36](http://html1.mh-extra.com/html/mediatek-labs/linkit/linkit_developers-manual_1760805036.webp)
MediaTek LinkIt™ Development
Platform for RTOS Wi-Fi Developer's
Guide
© 2015 - 2017 MediaTek Inc.
Page 32 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.
char * model_name = "MTK Wireless Device Test";
char * model_number = "MTK7687 Test";
char * serial_number = "87654321";
os_memset(&input_devinfo, 0, sizeof(input_devinfo));
//copy device_name
if (strlen(device_name) < WIFI_WPS_DEVICE_NAME_LENGTH)
os_memcpy(input_devinfo.device_name,
device_name,strlen(device_name));
else {
LOG_E(minisupp, "device_name length is too long\n");
return -1;
}
//copy manufacturer
if (strlen(manufacturer) < WIFI_WPS_MANUFACTURER_LENGTH)
os_memcpy(input_devinfo.manufacturer,manufacturer,strlen(manufacturer));
else {
LOG_E(minisupp, "manufacture length is too long\n");
return -1;
}
//Set model_name as manufacturer
//Set model_number as manufacturer
//Set serial_number as manufacturer
......
return wifi_wps_config_set_device_info(&input_devinfo);
}
2)
Call the function
wifi_wps_config_get_device_info()
to retrieve the device information, once it’s
already set.
An
example implementation shows how to get device information.
wifi_wps_device_info_t output_devinfo;
int32_t wps_get_device_info_example()
{
os_memset(&output_devinfo, 0, sizeof(output_devinfo));
return wifi_wps_config_get_device_info(&output_devinfo);
}
3)
Call
wifi_wps_config_set_auto_connection()
to disable WPS auto-connection.
An example implementation to disable the auto-connection is shown below.
int32_t wps_disable_auto_connection_example()
{
bool auto_conn = false;
return wifi_wps_config_set_auto_connection(auto_conn);
}
2.7.1.1.
Get WPS auto-connection control status.
1)
Call the function
wifi_wps_config_get_auto_connection()
to retrieve the auto-connection
control status.