SDK3.5
This document shows Ameba SDK 3.5 APIs
|
WPS/P2P functions. More...
Functions | |
int | wifi_p2p_init (u8 *dev_addr, int go_intent, u8 listen_ch, u8 op_ch) |
Initialize P2P data. More... | |
void | wifi_p2p_deinit () |
Deinitialize P2P data. More... | |
void | cmd_wifi_p2p_start (int argc, char **argv) |
Command to start WiFi Direct mode for commonly use. Can refer to ATWG in atcmd_wifi.c. After executing this command, P2P resource will be allocated and the driver enter P2P mode. More... | |
void | cmd_wifi_p2p_stop (int argc, char **argv) |
Command to stop WiFi Direct mode for commonly use. Can refer to ATWH in atcmd_wifi.c. After execute this command, WLAN driver will release P2P resources and turn off Wi-Fi. More... | |
void | cmd_p2p_info (int argc, char **argv) |
Command to show P2P role, P2P group information, and memory usage. Can refer to ATWN in atcmd_wifi.c. More... | |
void | wifi_p2p_set_dev_name (const char *dev_name) |
Set the device name in WPS ie and P2P ie. More... | |
void | wifi_p2p_set_manufacturer (const char *manufacturer) |
Set the manufacturer in WPS ie. More... | |
void | wifi_p2p_set_model_name (const char *model_name) |
Set the model name in WPS ie. More... | |
void | wifi_p2p_set_model_number (const char *model_number) |
Set the model number in WPS ie. More... | |
void | wifi_p2p_set_serial_number (const char *serial_number) |
Set the serial number in WPS ie. More... | |
void | wifi_p2p_set_pri_dev_type (const u8 *pri_dev_type) |
Set the primary device type in WPS ie and P2P ie. More... | |
void | wifi_p2p_set_ssid (const char *ssid_in) |
Set the GO SSID. More... | |
void | wifi_p2p_init_auto_go_params (void *res, u8 *passphrase, u8 channel) |
Initialize the Wi-Fi Direct GO parameters. More... | |
int | wifi_p2p_start_auto_go (void *res) |
Start Wi-Fi Direct GO. More... | |
int | cmd_wifi_p2p_auto_go_start (int argc, char **argv) |
Command to start WiFi Direct GO mode for commonly use. Can refer to ATWg in atcmd_wifi.c. More... | |
int | wps_start (u16 wps_config, char *pin, u8 channel, char *ssid) |
Start WPS enrollee process. More... | |
void | cmd_wps (int argc, char **argv) |
Command to start WPS enrollee process for commonly use. Can refer to ATWW in atcmd_wifi.c. More... | |
void | wifi_start_ap_wps_thread (u16 config_methods, char *pin) |
Start a WPS registrar thread. More... | |
void | cmd_ap_wps (int argc, char **argv) |
Command to start WPS registrar process for commonly use. Can refer to ATWw in atcmd_wifi.c. More... | |
WPS/P2P functions.
void cmd_ap_wps | ( | int | argc, |
char ** | argv | ||
) |
Command to start WPS registrar process for commonly use. Can refer to ATWw in atcmd_wifi.c.
[in] | argc | Command line argument. Argument count. |
[in] | argv | Command line argument. Argument vector. |
void cmd_p2p_info | ( | int | argc, |
char ** | argv | ||
) |
Command to show P2P role, P2P group information, and memory usage. Can refer to ATWN in atcmd_wifi.c.
[in] | argc | Command line argument. Argument count. Just let it be NULL. |
[in] | argv | Command line argument. Argument vector. Just let it be NULL. |
int cmd_wifi_p2p_auto_go_start | ( | int | argc, |
char ** | argv | ||
) |
Command to start WiFi Direct GO mode for commonly use. Can refer to ATWg in atcmd_wifi.c.
[in] | argc | Command line argument. Argument count. Just let it be NULL. |
[in] | argv | Command line argument. Argument vector. Just let it be NULL. |
void cmd_wifi_p2p_start | ( | int | argc, |
char ** | argv | ||
) |
Command to start WiFi Direct mode for commonly use. Can refer to ATWG in atcmd_wifi.c.
After executing this command, P2P resource will be allocated and the driver enter P2P mode.
[in] | argc | Command line argument. Argument count. Just let it be NULL. |
[in] | argv | Command line argument. Argument vector. Just let it be NULL. |
void cmd_wifi_p2p_stop | ( | int | argc, |
char ** | argv | ||
) |
Command to stop WiFi Direct mode for commonly use. Can refer to ATWH in atcmd_wifi.c.
After execute this command, WLAN driver will release P2P resources and turn off Wi-Fi.
[in] | argc | Command line argument. Argument count. Just let it be NULL. |
[in] | argv | Command line argument. Argument vector. Just let it be NULL. |
void cmd_wps | ( | int | argc, |
char ** | argv | ||
) |
Command to start WPS enrollee process for commonly use. Can refer to ATWW in atcmd_wifi.c.
[in] | argc | Command line argument. Argument count. |
[in] | argv | Command line argument. Argument vector. |
void wifi_p2p_deinit | ( | ) |
Deinitialize P2P data.
None |
int wifi_p2p_init | ( | u8 * | dev_addr, |
int | go_intent, | ||
u8 | listen_ch, | ||
u8 | op_ch | ||
) |
Initialize P2P data.
[in] | dev_addr | The device address. |
[in] | go_intent | The GO intent. |
[in] | listen_ch | The listen channel. |
[in] | op_ch | The operation channel. |
void wifi_p2p_init_auto_go_params | ( | void * | res, |
u8 * | passphrase, | ||
u8 | channel | ||
) |
Initialize the Wi-Fi Direct GO parameters.
[out] | res | The location where the set parameters will be stored. (p2p_go_neg_results) |
[in] | passphrase | The GO passphrase. |
[in] | channel | The operation channel. |
void wifi_p2p_set_dev_name | ( | const char * | dev_name | ) |
Set the device name in WPS ie and P2P ie.
[in] | dev_name | Device name to be set. The max string length is 32 bytes. |
void wifi_p2p_set_manufacturer | ( | const char * | manufacturer | ) |
Set the manufacturer in WPS ie.
[in] | manufacturer | Manufacturer to be set. The max string length is 64 bytes. |
void wifi_p2p_set_model_name | ( | const char * | model_name | ) |
Set the model name in WPS ie.
[in] | model_name | Model name to be set. The max string length is 32 bytes. |
void wifi_p2p_set_model_number | ( | const char * | model_number | ) |
Set the model number in WPS ie.
[in] | model_number | Model number to be set. The max string length is 32 bytes. |
void wifi_p2p_set_pri_dev_type | ( | const u8 * | pri_dev_type | ) |
Set the primary device type in WPS ie and P2P ie.
[in] | pri_dev_type | Primary device type to be set. The string length is 8 bytes. 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. |
void wifi_p2p_set_serial_number | ( | const char * | serial_number | ) |
Set the serial number in WPS ie.
[in] | serial_number | Serial number to be set. The max string length is 32 bytes. |
void wifi_p2p_set_ssid | ( | const char * | ssid_in | ) |
Set the GO SSID.
[in] | ssid_in | Ssid_in will be set as GO SSID. The string length is between 1 byte and 32 bytes. |
int wifi_p2p_start_auto_go | ( | void * | res | ) |
Start Wi-Fi Direct GO.
[in] | res | The parameters for GO negotiation. (p2p_go_neg_results) |
void wifi_start_ap_wps_thread | ( | u16 | config_methods, |
char * | pin | ||
) |
Start a WPS registrar thread.
[in] | config_methods | WPS configure method. Options are: WPS_CONFIG_DISPLAY, WPS_CONFIG_KEYPAD, and WPS_CONFIG_PUSHBUTTON. |
[in] | pin | PIN number. Can be set to NULL. |
int wps_start | ( | u16 | wps_config, |
char * | pin, | ||
u8 | channel, | ||
char * | ssid | ||
) |
Start WPS enrollee process.
[in] | wps_config | WPS configure method. Options are: WPS_CONFIG_DISPLAY, WPS_CONFIG_KEYPAD, and WPS_CONFIG_PUSHBUTTON. |
[in] | pin | PIN number. Can be set to NULL if using WPS_CONFIG_PUSHBUTTON. |
[in] | channel | Channel. Currently un-used, can be set to 0. |
[in] | ssid | Target network SSID. Can be set to NULL if no target network specified. |