18 #ifndef WHD_STA_INTERFACE_H 19 #define WHD_STA_INTERFACE_H 21 #include "netsocket/WiFiInterface.h" 22 #include "netsocket/EMACInterface.h" 23 #include "netsocket/OnboardNetworkStack.h" 24 #include "WhdAccessPoint.h" 26 #include "whd_interface.h" 27 #include "whd_types_int.h" 43 virtual int init_ols(
void *whd,
void *ip)
56 virtual void deinit_ols(
void) {}
60 WHD_EMAC &emac = WHD_EMAC::get_instance(),
131 _blocking = blocking;
169 int is_interface_connected();
172 int get_bssid(uint8_t *bssid);
177 int whd_log_print(
void);
180 int whd_log_read(
char *buffer,
int buffer_size);
186 int wifi_get_iovar_value(
const char *iovar, uint32_t *value);
189 int wifi_set_iovar_value(
const char *iovar, uint32_t value);
192 int wifi_set_ioctl_value(uint32_t ioctl, uint32_t value) ;
195 int wifi_get_ioctl_value(uint32_t ioctl, uint32_t *value);
198 int wifi_get_ioctl_buffer(uint32_t ioctl, uint8_t *buffer, uint16_t len);
201 int wifi_set_ioctl_buffer(uint32_t ioctl, uint8_t *buffer, uint16_t len);
204 int wifi_get_ifp(whd_interface_t *ifp);
207 int wifi_set_up(
void);
210 int wifi_set_down(
void);
213 int wifi_set_coex_config(whd_coex_config_t *coex_config);
237 int ret = _olm->sleep();
247 int ret = _olm->wake();
252 int internal_scan(
WiFiAccessPoint *aps,
unsigned count, scan_result_type sres_type);
Common interface between Wi-Fi devices.
EMACInterface class Implementation of the NetworkInterface for an EMAC-based driver.
int scan(WiFiAccessPoint *res, unsigned count)
Scan for available networks in WiFiAccessPoint format.
WhdSTAInterface class Implementation of the NetworkStack for the WHD.
signed int nsapi_error_t
Type used to represent error codes.
int8_t get_rssi()
Gets the current radio signal strength for active connection.
mbed OS API for onboard IP stack abstraction
int set_olm(OlmInterface *olm)
Set Offload Manager Information NOTE: Only allowed while disconnected.
int net_suspended()
Network stack is suspended.
nsapi_error_t set_credentials(const char *ssid, const char *pass, nsapi_security_t security=NSAPI_SECURITY_NONE)
Set the WiFi network credentials.
nsapi_error_t set_channel(uint8_t channel)
Set the WiFi network channel - NOT SUPPORTED.
nsapi_error_t disconnect()
Stop the interface.
enum nsapi_security nsapi_security_t
Enum of encryption types.
int net_resuming()
Network stack is resuming.
static OnboardNetworkStack & get_default_instance()
Return the default on-board network stack.
nsapi_error_t set_blocking(bool blocking)
Set blocking status of interface.
static OlmInterface & get_default_instance()
Get the default OLM interface.
nsapi_error_t connect()
Start the interface.
virtual nsapi_connection_status_t get_connection_status() const
Get the connection status.
int scan_whd(WhdAccessPoint *res, unsigned count)
Scan for available networks in WhdAccessPoint format.