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. |
These functions manage the soft access point mode.
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. |