API Reference Manual
r5073
|
Functions | |
int | wlp_set_mode (uint8_t mode) |
Set the Wi-Fi mode to AP or STA. | |
int | wlp_get_mode (uint8_t *mode) |
Check if the device is currently in AP or STA mode. | |
int | wlp_set_channel (uint8_t channel) |
Set the channel. Only supported when mode is WLP_MODE_AP. | |
int | wlp_conf_ap (int hidden, int beacon_intvl, int inact_tmo, const char *country) |
Configure parameters for access point mode. |
These functions manage the access point mode.
int wlp_conf_ap | ( | int | hidden, |
int | beacon_intvl, | ||
int | inact_tmo, | ||
const char * | country | ||
) |
Configure parameters for access point mode.
Configure the parameters that will be used when the device is in access point mode, WL_MODE_AP.
hidden | can be set to non-zero in order to configure the device with hidden SSID. This means that the device will not broadcast its SSID, but it will still respond to clients that already knows the SSID. |
beacon_intvl | specifies interval in which beacons are transmitted by the device. This parameter does not have any effect if hidden is 0 |
inact_tmo | specifies the idle time in minutes before the device will disconnect an inactive client. |
country | specifies the region that should be advertised by the device. Will not be changed if NULL. |
int wlp_get_mode | ( | uint8_t * | mode | ) |
Check if the device is currently in AP or STA mode.
wlp_get_mode() will be return the current operation mode of the Wi-Fi device. Since the operation mode is persistent between power-cycles, it is generally a good idea to call this function at startup to ensure the desired operation mode.
mode | will hold the current mode upon successful return. This will be either WL_MODE_STA or WL_MODE_AP. |
int wlp_set_channel | ( | uint8_t | channel | ) |
Set the channel. Only supported when mode is WLP_MODE_AP.
This function is only supported when wlp_get_mode() returns WLP_MODE_AP. wlp_set_channel() must be called before wlp_linkup() to have effect.
int wlp_set_mode | ( | uint8_t | mode | ) |
Set the Wi-Fi mode to AP or STA.
wlp_set_mode() will configure the Wi-Fi device to operate either as a station or as an access point. The current mode can be obtained through wlp_get_mode(). Note that the mode configured through wlp_set_mode() only takes effect after wlp_reset() has been called. The configured mode persists after power-cycling the device.
mode | is the mode to configure. This must be either WL_MODE_STA or WL_MODE_AP. |