sdk-ameba-v4.0c_180328/doc/api_doc/group__wpsp2p.html

883 lines
46 KiB
HTML
Raw Normal View History

2019-04-02 08:34:25 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>SDK3.5: WPS/P2P</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">SDK3.5
</div>
<div id="projectbrief">This document shows Ameba SDK 3.5 APIs</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">WPS/P2P<div class="ingroups"><a class="el" href="group__sdk.html">Ameba SDK</a> &raquo; <a class="el" href="group__wlan.html">WLAN</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>WPS/P2P functions.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3e3f943110223e15e113f0ef73866393"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init</a> (u8 *dev_addr, int go_intent, u8 listen_ch, u8 op_ch)</td></tr>
<tr class="memdesc:ga3e3f943110223e15e113f0ef73866393"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize P2P data. <a href="#ga3e3f943110223e15e113f0ef73866393">More...</a><br /></td></tr>
<tr class="separator:ga3e3f943110223e15e113f0ef73866393"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga86743f64ee19679fecff0a9de5b19f79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga86743f64ee19679fecff0a9de5b19f79">wifi_p2p_deinit</a> ()</td></tr>
<tr class="memdesc:ga86743f64ee19679fecff0a9de5b19f79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitialize P2P data. <a href="#ga86743f64ee19679fecff0a9de5b19f79">More...</a><br /></td></tr>
<tr class="separator:ga86743f64ee19679fecff0a9de5b19f79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8f9ed42cc808573bc5bc2d0081210c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:gad8f9ed42cc808573bc5bc2d0081210c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to start WiFi Direct mode for commonly use. Can refer to ATWG in atcmd_wifi.c.<br />
After executing this command, P2P resource will be allocated and the driver enter P2P mode. <a href="#gad8f9ed42cc808573bc5bc2d0081210c0">More...</a><br /></td></tr>
<tr class="separator:gad8f9ed42cc808573bc5bc2d0081210c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9603e3f2c23951bea7395db01d4c349d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga9603e3f2c23951bea7395db01d4c349d">cmd_wifi_p2p_stop</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:ga9603e3f2c23951bea7395db01d4c349d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to stop WiFi Direct mode for commonly use. Can refer to ATWH in atcmd_wifi.c.<br />
After execute this command, WLAN driver will release P2P resources and turn off Wi-Fi. <a href="#ga9603e3f2c23951bea7395db01d4c349d">More...</a><br /></td></tr>
<tr class="separator:ga9603e3f2c23951bea7395db01d4c349d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf1d617ae261ce1555470003fa0f4d73d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gaf1d617ae261ce1555470003fa0f4d73d">cmd_p2p_info</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:gaf1d617ae261ce1555470003fa0f4d73d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to show P2P role, P2P group information, and memory usage. Can refer to ATWN in atcmd_wifi.c. <a href="#gaf1d617ae261ce1555470003fa0f4d73d">More...</a><br /></td></tr>
<tr class="separator:gaf1d617ae261ce1555470003fa0f4d73d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad06f1d33ed0dd46836f8f5caa15d7c65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gad06f1d33ed0dd46836f8f5caa15d7c65">wifi_p2p_set_dev_name</a> (const char *dev_name)</td></tr>
<tr class="memdesc:gad06f1d33ed0dd46836f8f5caa15d7c65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the device name in WPS ie and P2P ie. <a href="#gad06f1d33ed0dd46836f8f5caa15d7c65">More...</a><br /></td></tr>
<tr class="separator:gad06f1d33ed0dd46836f8f5caa15d7c65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga794d0ddb4b9d9a0cfef91dff24e86b8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga794d0ddb4b9d9a0cfef91dff24e86b8a">wifi_p2p_set_manufacturer</a> (const char *manufacturer)</td></tr>
<tr class="memdesc:ga794d0ddb4b9d9a0cfef91dff24e86b8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the manufacturer in WPS ie. <a href="#ga794d0ddb4b9d9a0cfef91dff24e86b8a">More...</a><br /></td></tr>
<tr class="separator:ga794d0ddb4b9d9a0cfef91dff24e86b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga449f85ab694d97c048fb219e253e68c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga449f85ab694d97c048fb219e253e68c9">wifi_p2p_set_model_name</a> (const char *model_name)</td></tr>
<tr class="memdesc:ga449f85ab694d97c048fb219e253e68c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the model name in WPS ie. <a href="#ga449f85ab694d97c048fb219e253e68c9">More...</a><br /></td></tr>
<tr class="separator:ga449f85ab694d97c048fb219e253e68c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b7f34e3106e8790a8dcfaac5b674e82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga8b7f34e3106e8790a8dcfaac5b674e82">wifi_p2p_set_model_number</a> (const char *model_number)</td></tr>
<tr class="memdesc:ga8b7f34e3106e8790a8dcfaac5b674e82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the model number in WPS ie. <a href="#ga8b7f34e3106e8790a8dcfaac5b674e82">More...</a><br /></td></tr>
<tr class="separator:ga8b7f34e3106e8790a8dcfaac5b674e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5f5bd3ff472c03fe32c70cca378bd838"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga5f5bd3ff472c03fe32c70cca378bd838">wifi_p2p_set_serial_number</a> (const char *serial_number)</td></tr>
<tr class="memdesc:ga5f5bd3ff472c03fe32c70cca378bd838"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the serial number in WPS ie. <a href="#ga5f5bd3ff472c03fe32c70cca378bd838">More...</a><br /></td></tr>
<tr class="separator:ga5f5bd3ff472c03fe32c70cca378bd838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50baf0e5fc9f8bd4b563983a42b9848e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga50baf0e5fc9f8bd4b563983a42b9848e">wifi_p2p_set_pri_dev_type</a> (const u8 *pri_dev_type)</td></tr>
<tr class="memdesc:ga50baf0e5fc9f8bd4b563983a42b9848e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the primary device type in WPS ie and P2P ie. <a href="#ga50baf0e5fc9f8bd4b563983a42b9848e">More...</a><br /></td></tr>
<tr class="separator:ga50baf0e5fc9f8bd4b563983a42b9848e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac39af0ffa11d695bb7120bf1f8c3d5e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gac39af0ffa11d695bb7120bf1f8c3d5e4">wifi_p2p_set_ssid</a> (const char *ssid_in)</td></tr>
<tr class="memdesc:gac39af0ffa11d695bb7120bf1f8c3d5e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the GO SSID. <a href="#gac39af0ffa11d695bb7120bf1f8c3d5e4">More...</a><br /></td></tr>
<tr class="separator:gac39af0ffa11d695bb7120bf1f8c3d5e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf10aee0b412d8356e7f0546b39321289"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gaf10aee0b412d8356e7f0546b39321289">wifi_p2p_init_auto_go_params</a> (void *res, u8 *passphrase, u8 channel)</td></tr>
<tr class="memdesc:gaf10aee0b412d8356e7f0546b39321289"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Wi-Fi Direct GO parameters. <a href="#gaf10aee0b412d8356e7f0546b39321289">More...</a><br /></td></tr>
<tr class="separator:gaf10aee0b412d8356e7f0546b39321289"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3248b704cd49bbf0daff82c5757c666f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga3248b704cd49bbf0daff82c5757c666f">wifi_p2p_start_auto_go</a> (void *res)</td></tr>
<tr class="memdesc:ga3248b704cd49bbf0daff82c5757c666f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start Wi-Fi Direct GO. <a href="#ga3248b704cd49bbf0daff82c5757c666f">More...</a><br /></td></tr>
<tr class="separator:ga3248b704cd49bbf0daff82c5757c666f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35963faf47862aed48714219aeb80d5b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga35963faf47862aed48714219aeb80d5b">cmd_wifi_p2p_auto_go_start</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:ga35963faf47862aed48714219aeb80d5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to start WiFi Direct GO mode for commonly use. Can refer to ATWg in atcmd_wifi.c. <a href="#ga35963faf47862aed48714219aeb80d5b">More...</a><br /></td></tr>
<tr class="separator:ga35963faf47862aed48714219aeb80d5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad33c69a157ef3729357931c354b56f73"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gad33c69a157ef3729357931c354b56f73">wps_start</a> (u16 wps_config, char *pin, u8 channel, char *ssid)</td></tr>
<tr class="memdesc:gad33c69a157ef3729357931c354b56f73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start WPS enrollee process. <a href="#gad33c69a157ef3729357931c354b56f73">More...</a><br /></td></tr>
<tr class="separator:gad33c69a157ef3729357931c354b56f73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga16e1acca2142409c753decc0ed3339f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#ga16e1acca2142409c753decc0ed3339f9">cmd_wps</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:ga16e1acca2142409c753decc0ed3339f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to start WPS enrollee process for commonly use. Can refer to ATWW in atcmd_wifi.c. <a href="#ga16e1acca2142409c753decc0ed3339f9">More...</a><br /></td></tr>
<tr class="separator:ga16e1acca2142409c753decc0ed3339f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab194b9d674806a9b7c0f19ef72a650a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gab194b9d674806a9b7c0f19ef72a650a8">wifi_start_ap_wps_thread</a> (u16 config_methods, char *pin)</td></tr>
<tr class="memdesc:gab194b9d674806a9b7c0f19ef72a650a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a WPS registrar thread. <a href="#gab194b9d674806a9b7c0f19ef72a650a8">More...</a><br /></td></tr>
<tr class="separator:gab194b9d674806a9b7c0f19ef72a650a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc1bdd6b0a29f97ef0cc6e7739e5ee4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpsp2p.html#gafc1bdd6b0a29f97ef0cc6e7739e5ee4c">cmd_ap_wps</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:gafc1bdd6b0a29f97ef0cc6e7739e5ee4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to start WPS registrar process for commonly use. Can refer to ATWw in atcmd_wifi.c. <a href="#gafc1bdd6b0a29f97ef0cc6e7739e5ee4c">More...</a><br /></td></tr>
<tr class="separator:gafc1bdd6b0a29f97ef0cc6e7739e5ee4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>WPS/P2P functions. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gafc1bdd6b0a29f97ef0cc6e7739e5ee4c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cmd_ap_wps </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Command to start WPS registrar process for commonly use. Can refer to ATWw in atcmd_wifi.c. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be in SoftAP mode. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Command line argument. Argument count. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Command line argument. Argument vector. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Command style for example:<ul>
<li>cmd_ap_wps pbc</li>
<li>cmd_ap_wps pin</li>
<li>cmd_ap_wps pin 12345678 </li>
</ul>
</dd>
<dd>
Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_WPS_AP are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="gaf1d617ae261ce1555470003fa0f4d73d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cmd_p2p_info </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Command to show P2P role, P2P group information, and memory usage. Can refer to ATWN in atcmd_wifi.c. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Command line argument. Argument count. Just let it be NULL. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Command line argument. Argument vector. Just let it be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Command style:<ul>
<li>cmd_p2p_info </li>
</ul>
</dd>
<dd>
Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga35963faf47862aed48714219aeb80d5b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int cmd_wifi_p2p_auto_go_start </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Command to start WiFi Direct GO mode for commonly use. Can refer to ATWg in atcmd_wifi.c. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Command line argument. Argument count. Just let it be NULL. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Command line argument. Argument vector. Just let it be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if success, otherwise return -1. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Command style:<ul>
<li>cmd_wifi_p2p_auto_go_start </li>
</ul>
</dd>
<dd>
Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="gad8f9ed42cc808573bc5bc2d0081210c0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cmd_wifi_p2p_start </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Command to start WiFi Direct mode for commonly use. Can refer to ATWG in atcmd_wifi.c.<br />
After executing this command, P2P resource will be allocated and the driver enter P2P mode. </p>
<dl class="section warning"><dt>Warning</dt><dd>If the started Wi-Fi Direct mode is no longer needed, please make sure to invoke <a class="el" href="group__wpsp2p.html#ga9603e3f2c23951bea7395db01d4c349d">cmd_wifi_p2p_stop()</a> before doing other procedures. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Command line argument. Argument count. Just let it be NULL. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Command line argument. Argument vector. Just let it be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Command style:<ul>
<li>cmd_wifi_p2p_start </li>
</ul>
</dd>
<dd>
Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga9603e3f2c23951bea7395db01d4c349d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cmd_wifi_p2p_stop </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Command to stop WiFi Direct mode for commonly use. Can refer to ATWH in atcmd_wifi.c.<br />
After execute this command, WLAN driver will release P2P resources and turn off Wi-Fi. </p>
<dl class="section warning"><dt>Warning</dt><dd>This command must be invoked if the enabled Wi-Fi Direct mode is no longer used. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Command line argument. Argument count. Just let it be NULL. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Command line argument. Argument vector. Just let it be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Command style:<ul>
<li>cmd_wifi_p2p_stop </li>
</ul>
</dd>
<dd>
Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga16e1acca2142409c753decc0ed3339f9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cmd_wps </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Command to start WPS enrollee process for commonly use. Can refer to ATWW in atcmd_wifi.c. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using <a class="el" href="group__nic.html#ga68f622ff9eed3e1c5eed390c571ad978">wifi_on()</a>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Command line argument. Argument count. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Command line argument. Argument vector. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Command style for example:<ul>
<li>cmd_wps pbc</li>
<li>cmd_wps pin</li>
<li>cmd_wps pin 12345678 </li>
</ul>
</dd>
<dd>
Please make sure CONFIG_ENABLE_WPS is enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga86743f64ee19679fecff0a9de5b19f79"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_deinit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deinitialize P2P data. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga3e3f943110223e15e113f0ef73866393"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wifi_p2p_init </td>
<td>(</td>
<td class="paramtype">u8 *&#160;</td>
<td class="paramname"><em>dev_addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>go_intent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&#160;</td>
<td class="paramname"><em>listen_ch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&#160;</td>
<td class="paramname"><em>op_ch</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize P2P data. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dev_addr</td><td>The device address. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">go_intent</td><td>The GO intent. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">listen_ch</td><td>The listen channel. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">op_ch</td><td>The operation channel. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, otherwise return -1. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h.<br />
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to understand the process of starting P2P mode. </dd></dl>
</div>
</div>
<a class="anchor" id="gaf10aee0b412d8356e7f0546b39321289"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_init_auto_go_params </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>res</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8 *&#160;</td>
<td class="paramname"><em>passphrase</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&#160;</td>
<td class="paramname"><em>channel</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the Wi-Fi Direct GO parameters. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>The location where the set parameters will be stored. (p2p_go_neg_results) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">passphrase</td><td>The GO passphrase. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>The operation channel. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="gad06f1d33ed0dd46836f8f5caa15d7c65"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_dev_name </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>dev_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the device name in WPS ie and P2P ie. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dev_name</td><td>Device name to be set. The max string length is 32 bytes. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga794d0ddb4b9d9a0cfef91dff24e86b8a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_manufacturer </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>manufacturer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the manufacturer in WPS ie. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">manufacturer</td><td>Manufacturer to be set. The max string length is 64 bytes. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga449f85ab694d97c048fb219e253e68c9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_model_name </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>model_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the model name in WPS ie. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">model_name</td><td>Model name to be set. The max string length is 32 bytes. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga8b7f34e3106e8790a8dcfaac5b674e82"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_model_number </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>model_number</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the model number in WPS ie. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">model_number</td><td>Model number to be set. The max string length is 32 bytes. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga50baf0e5fc9f8bd4b563983a42b9848e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_pri_dev_type </td>
<td>(</td>
<td class="paramtype">const u8 *&#160;</td>
<td class="paramname"><em>pri_dev_type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the primary device type in WPS ie and P2P ie. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pri_dev_type</td><td>Primary device type to be set. The string length is 8 bytes.<br />
The first two bytes are category ID, and the last two bytes are subcategory ID. The middle four bytes are 0x 00-50-F2-04. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga5f5bd3ff472c03fe32c70cca378bd838"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_serial_number </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>serial_number</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the serial number in WPS ie. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">serial_number</td><td>Serial number to be set. The max string length is 32 bytes. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="gac39af0ffa11d695bb7120bf1f8c3d5e4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_p2p_set_ssid </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>ssid_in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the GO SSID. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ssid_in</td><td>Ssid_in will be set as GO SSID. The string length is between 1 byte and 32 bytes. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h. </dd></dl>
</div>
</div>
<a class="anchor" id="ga3248b704cd49bbf0daff82c5757c666f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wifi_p2p_start_auto_go </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>res</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start Wi-Fi Direct GO. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using wifi_on(RTW_MODE_P2P) and P2P be initialized by using <a class="el" href="group__wpsp2p.html#ga3e3f943110223e15e113f0ef73866393">wifi_p2p_init()</a>. </dd>
<dd>
You can reference <a class="el" href="group__wpsp2p.html#gad8f9ed42cc808573bc5bc2d0081210c0">cmd_wifi_p2p_start()</a> to initialize them. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">res</td><td>The parameters for GO negotiation. (p2p_go_neg_results) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_P2P are enabled in platform_opts.h.<br />
You can reference <a class="el" href="group__wpsp2p.html#ga35963faf47862aed48714219aeb80d5b">cmd_wifi_p2p_auto_go_start()</a> to understand the process of opening the P2P automatic GO. </dd></dl>
</div>
</div>
<a class="anchor" id="gab194b9d674806a9b7c0f19ef72a650a8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wifi_start_ap_wps_thread </td>
<td>(</td>
<td class="paramtype">u16&#160;</td>
<td class="paramname"><em>config_methods</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>pin</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start a WPS registrar thread. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be in SoftAP mode. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">config_methods</td><td>WPS configure method. Options are: WPS_CONFIG_DISPLAY, WPS_CONFIG_KEYPAD, and WPS_CONFIG_PUSHBUTTON. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>PIN number. Can be set to NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS and CONFIG_ENABLE_WPS_AP are enabled in platform_opts.h.<br />
You can reference <a class="el" href="group__wpsp2p.html#gafc1bdd6b0a29f97ef0cc6e7739e5ee4c">cmd_ap_wps()</a> to know how to choose input parameters. </dd></dl>
</div>
</div>
<a class="anchor" id="gad33c69a157ef3729357931c354b56f73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wps_start </td>
<td>(</td>
<td class="paramtype">u16&#160;</td>
<td class="paramname"><em>wps_config</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&#160;</td>
<td class="paramname"><em>channel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>ssid</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start WPS enrollee process. </p>
<dl class="section warning"><dt>Warning</dt><dd>Before invoking this function, the Wi-Fi should be enabled by using <a class="el" href="group__nic.html#ga68f622ff9eed3e1c5eed390c571ad978">wifi_on()</a>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">wps_config</td><td>WPS configure method. Options are: WPS_CONFIG_DISPLAY, WPS_CONFIG_KEYPAD, and WPS_CONFIG_PUSHBUTTON. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>PIN number. Can be set to NULL if using WPS_CONFIG_PUSHBUTTON. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel. Currently un-used, can be set to 0. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ssid</td><td>Target network SSID. Can be set to NULL if no target network specified. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Please make sure CONFIG_ENABLE_WPS is enabled in platform_opts.h.<br />
You can reference <a class="el" href="group__wpsp2p.html#ga16e1acca2142409c753decc0ed3339f9">cmd_wps()</a> to know how to choose input parameters. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>