![]() |
m2mb API docs
25.21.002
m2mb API sets documentation
|
Header file for m2mb_wlan APIs. More...
Go to the source code of this file.
Data Structures | |
| struct | M2MB_WLAN_SSID_S |
| struct | M2MB_WLAN_MAC_S |
| struct | M2MB_WLAN_CONFIG_LEGACY_S |
| struct | M2MB_WLAN_SCAN_MSG_S |
| Scan request. More... | |
| struct | M2MB_WLAN_BSS_SCAN_INFO_S |
| Structure of members for scan results. More... | |
| struct | M2MB_WLAN_SCAN_IND_S |
| Scan indication. More... | |
| struct | M2MB_CON_IND_S |
| Connection event info for both AP and STA modes. More... | |
| struct | M2MB_DISCON_IND_S |
| Disconnection event info for both AP and STA modes. More... | |
| struct | M2MB_WLAN_AP_CLIENT_INFO_S |
| AP client info. More... | |
| struct | M2MB_WLAN_AP_CLIENT_MSG_S |
| AP client info request. More... | |
| struct | M2MB_WLAN_AP_CLIENT_IND_S |
| Client info indication. More... | |
| struct | M2MB_WLAN_MAC_ADDR_STRING_S |
| struct | M2MB_WLAN_MAC_ADDR_LIST_S |
| struct | M2MB_WLAN_ERROR_MSG_S |
| WLAN error info request. More... | |
| struct | M2MB_WLAN_PING_RESULT_T |
| struct | M2MB_WLAN_PING_COMPLETE_T |
| struct | M2MB_WLAN_CON_INFO_S |
Macros | |
| #define | M2MB_WLAN_MAC_LEN 6 |
| #define | M2MB_WLAN_MAC_STR_LEN 18 |
| #define | M2MB_WLAN_MAC_SEPERATOR ':' |
| #define | M2MB_WLAN_MAX_SSID_LEN 32 |
| #define | M2MB_WLAN_MIN_PASSPHRASE_LEN 8 |
| #define | M2MB_WLAN_MAX_PASSPHRASE_LEN 64 |
| #define | M2MB_WLAN_MIN_WEP_KEY_SIZE 10 |
| #define | M2MB_WLAN_MAX_WEP_KEY_SIZE 26 |
| #define | M2MB_WLAN_WPS_MAX_KEY_LEN 64 |
| #define | M2MB_WLAN_SCAN_TYPE_BLOCKING 1 |
| #define | M2MB_WLAN_SCAN_TYPE_NON_BLOCKING 0 |
| #define | M2MB_WLAN_BROADCAST_ENABLE 1 |
| #define | M2MB_WLAN_BROADCAST_DISABLE 0 |
| #define | M2MB_WLAN_MIN_EAP_IDENTITY_LEN 8 |
| #define | M2MB_WLAN_MAX_EAP_IDENTITY_LEN 64 |
| #define | M2MB_WLAN_MIN_EAP_PASSWORD_LEN 8 |
| #define | M2MB_WLAN_MAX_EAP_PASSWORD_LEN 64 |
| #define | M2MB_WLAN_MIN_EAP_PRIV_KEY_PASSWD_LEN 8 |
| #define | M2MB_WLAN_MAX_EAP_PRIV_KEY_PASSWD_LEN 64 |
| #define | M2MB_MAX_FILE_READ_LEN 256 |
| #define | M2MB_WLAN_MAC_STR_MAX_SIZE 20 |
Typedefs | |
| typedef HANDLE | M2MB_WLAN_HANDLE |
| typedef HANDLE | M2MB_WLAN_IF_HANDLE |
| typedef struct M2MB_WLAN_SSID_S | M2MB_WLAN_SSID_T |
| typedef struct M2MB_WLAN_MAC_S | M2MB_WLAN_MAC_T |
| typedef struct M2MB_WLAN_CONFIG_LEGACY_S | M2MB_WLAN_CONFIG_LEGACY_T |
| typedef struct M2MB_WLAN_SCAN_MSG_S | M2MB_WLAN_SCAN_MSG_T |
| Scan request. More... | |
| typedef struct M2MB_WLAN_BSS_SCAN_INFO_S | M2MB_WLAN_BSS_SCAN_INFO_T |
| Structure of members for scan results. More... | |
| typedef struct M2MB_WLAN_SCAN_IND_S | M2MB_WLAN_SCAN_IND_T |
| Scan indication. More... | |
| typedef struct M2MB_CON_IND_S | M2MB_CON_IND_T |
| Connection event info for both AP and STA modes. More... | |
| typedef struct M2MB_DISCON_IND_S | M2MB_DISCON_IND_T |
| Disconnection event info for both AP and STA modes. More... | |
| typedef struct M2MB_WLAN_AP_CLIENT_INFO_S | M2MB_WLAN_AP_CLIENT_INFO_T |
| AP client info. More... | |
| typedef struct M2MB_WLAN_AP_CLIENT_MSG_S | M2MB_WLAN_AP_CLIENT_MSG_T |
| AP client info request. More... | |
| typedef struct M2MB_WLAN_AP_CLIENT_IND_S | M2MB_WLAN_AP_CLIENT_IND_T |
| Client info indication. More... | |
| typedef struct M2MB_WLAN_MAC_ADDR_STRING_S | M2MB_WLAN_MAC_ADDR_STRING_T |
| typedef struct M2MB_WLAN_MAC_ADDR_LIST_S | M2MB_WLAN_MAC_ADDR_LIST_T |
| typedef struct M2MB_WLAN_ERROR_MSG_S | M2MB_WLAN_ERROR_MSG_T |
| WLAN error info request. More... | |
| typedef struct M2MB_WLAN_CON_INFO_S | M2MB_WLAN_CON_INFO_T |
| typedef void(* | m2mb_wlan_ind_callback) (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_IND_E wlan_event, UINT16 resp_size, void *resp_struct, void *userdata) |
Enumerations | |
| enum | M2MB_WLAN_PROTOCOL_TYPE_E { M2MB_WLAN_PROTOCOL_TYPE_B_ONLY, M2MB_WLAN_PROTOCOL_TYPE_B_G, M2MB_WLAN_PROTOCOL_TYPE_B_G_N, M2MB_WLAN_PROTOCOL_TYPE_A_N, M2MB_WLAN_PROTOCOL_TYPE_A_N_AC } |
| enum | M2MB_WLAN_AUTH_TYPE_E { M2MB_WLAN_AUTH_TYPE_NONE = 0, M2MB_WLAN_AUTH_TYPE_WPA = 1, M2MB_WLAN_AUTH_TYPE_WPA2 = 2, M2MB_WLAN_AUTH_TYPE_WPA_PSK = 3, M2MB_WLAN_AUTH_TYPE_WPA2_PSK = 4, M2MB_WLAN_AUTH_TYPE_WPA2_EAP = 5, M2MB_WLAN_AUTH_TYPE_WPA3 = 6, M2MB_WLAN_AUTH_TYPE_WEP = 8, M2MB_WLAN_AUTH_TYPE_INVALID } |
| Different authentication modes supported by WLAN. More... | |
| enum | M2MB_WLAN_AP_SEC_TYPE_E { M2MB_WLAN_AP_SEC_TYPE_DISABLE = 0, M2MB_WLAN_AP_SEC_TYPE_WPA1 = 1, M2MB_WLAN_AP_SEC_TYPE_WPA2 = 2, M2MB_WLAN_AP_SEC_TYPE_WPA1_WPA2 = 3, M2MB_WLAN_AP_SEC_TYPE_WPA3 = 4, M2MB_WLAN_AP_SEC_TYPE_INVALID } |
| enum | M2MB_WLAN_SECURITY_MODE_E { M2MB_WLAN_SECURITY_MODE_OPEN = 0, M2MB_WLAN_SECURITY_MODE_WEP = 1, M2MB_WLAN_SECURITY_MODE_WPA_PSK = 2, M2MB_WLAN_SECURITY_MODE_WPA_EAP = 3, M2MB_WLAN_SECURITY_MODE_WPA_EAP_PSK = 4, M2MB_WLAN_SECURITY_MODE_WPA3_SAE = 5, M2MB_WLAN_SECURITY_MODE_INVALID } |
| enum | M2MB_WLAN_ENCRYPT_TYPE_E { M2MB_WLAN_ENCRYPT_TYPE_NONE = 0, M2MB_WLAN_ENCRYPT_TYPE_WEP = 1, M2MB_WLAN_ENCRYPT_TYPE_TKIP = 2, M2MB_WLAN_ENCRYPT_TYPE_AES = 3, M2MB_WLAN_ENCRYPT_TYPE_TKIP_AES = 4, M2MB_WLAN_ENCRYPT_TYPE_INVALID } |
| Different encryption modes supported by WLAN. More... | |
| enum | M2MB_WLAN_RESPONSE_E { M2MB_WLAN_SUCCESS = 0, M2MB_WLAN_ERROR_BAD_ARG = -1, M2MB_WLAN_ERROR_OUT_OF_BUFFER = -2, M2MB_WLAN_ERROR_TIMEOUT = -3, M2MB_WLAN_ERROR_NETWORK = -4, M2MB_WLAN_ERROR_MEMORY = -5, M2MB_WLAN_ERROR_CALLBACK = -6, M2MB_WLAN_ERROR_ASYNC_THREAD = -7, M2MB_WLAN_ERROR_OP_NOT_ALLOWED = -8, M2MB_WLAN_ERROR_OP_FAILED = -9, M2MB_WLAN_ERROR_NO_INTERNET = -10, M2MB_WLAN_ERROR_SUPPORN_AP_MODE = -11, M2MB_WLAN_ERROR_SUPPORN_CLIENT_MODE = -12, M2MB_WLAN_ERROR_DRIVER_FAIELD = -13, M2MB_WLAN_ERROR_CONNECTION_FAILED = -14, M2MB_WLAN_ERROR_OP_NOT_SUPPORTED = -99 } |
| WLAN APIs response enum. More... | |
| enum | M2MB_DISASSOC_REASON_T { M2MB_WLAN_NO_NETWORK_AVAIL = 0x01, M2MB_WLAN_LOST_LINK = 0x02, M2MB_WLAN_DISCONNECT_CMD = 0x03, M2MB_WLAN_BSS_DISCONNECTED = 0x04, M2MB_WLAN_AUTH_FAILED = 0x05, M2MB_WLAN_ASSOC_FAILED = 0x06, M2MB_WLAN_NO_RESOURCES_AVAIL = 0x07, M2MB_WLAN_CSERV_DISCONNECT = 0x08, M2MB_WLAN_INVALID_PROFILE = 0x0a, M2MB_WLAN_DOT11H_CHANNEL_SWITCH = 0x0b, M2MB_WLAN_PROFILE_MISMATCH = 0x0c, M2MB_WLAN_CONNECTION_EVICTED = 0x0d, M2MB_WLAN_IBSS_MERGE = 0x0e, M2MB_WLAN_EXCESS_TX_RETRY = 0x0f, M2MB_WLAN_SEC_HS_TO_RECV_M1 = 0x10, M2MB_WLAN_SEC_HS_TO_RECV_M3 = 0x11, M2MB_WLAN_TKIP_COUNTERMEASURES = 0x12, M2MB_WLAN_SCAN_FAIL = 0x13, M2MB_L3_FAIL = 0x14 } |
| Disconnection reason. More... | |
| enum | M2MB_WLAN_CON_EVENT_ID_E { M2MB_WLAN_CON_STA, M2MB_WLAN_CON_AP, M2MB_WLAN_CON_PEER } |
| WLAN connect event id. More... | |
| enum | M2MB_WLAN_IND_E { M2MB_WLAN_SCAN_IND_CB, M2MB_WLAN_SCAN_COMPLETE_CB, M2MB_WLAN_CONNECT_CB, M2MB_WLAN_DISCONNECT_CB, M2MB_WLAN_PROFILE_PNO_CB, M2MB_WLAN_EVENT_WPS_CB, M2MB_WLAN_EVENT_PROMISCOUS_CB, M2MB_WLAN_AP_CLIENT_IND_CB, M2MB_WLAN_AP_CLIENT_INFO_DONE_CB, M2MB_WLAN_PING_IND_CB, M2MB_WLAN_PING_COMPLETE_CB, M2MB_WLAN_CLIENT_STATE_IND_CB, M2MB_WLAN_UNSOLICIT_IND_CB } |
| Events for an application registered CB functions. More... | |
| enum | M2MB_WLAN_SCAN_TYPE_E { M2MB_WLAN_SCAN_ACTIVE, M2MB_WLAN_SCAN_PASSIVE } |
| Scan method. More... | |
| enum | M2MB_WLAN_SCAN_FORMAT_E { M2MB_WLAN_SCAN_NORMAL, M2MB_WLAN_SCAN_IW_RAW } |
| Scan result format. More... | |
| enum | M2MB_WLAN_OP_MODE_E { M2MB_WLAN_OP_MODE_STA, M2MB_WLAN_OP_MODE_AP, M2MB_WLAN_OP_MODE_AP_STA, M2MB_WLAN_OP_MODE_AP_AP, M2MB_WLAN_OP_MODE_STA_STA } |
| WLAN module operating modes. More... | |
| enum | M2MB_WLAN_MODE_E { M2MB_WLAN_MODE_STATION, M2MB_WLAN_MODE_ACCESS_POINT, M2MB_WLAN_MODE_ADHOC, M2MB_WLAN_MODE_INVALID } |
| WLAN interface operating modes. More... | |
| enum | M2MB_WLAN_DEV_ID_E { M2MB_WLAN_DEV_0, M2MB_WLAN_DEV_1, M2MB_WLAN_DEV_2, M2MB_WLAN_DEV_3, M2MB_WLAN_DEV_MAX } |
| WLAN device id or interface id. More... | |
| enum | M2MB_WLAN_BIN_ID_E { M2MB_WLAN_BIN_BDWLAN, M2MB_WLAN_BIN_OTP } |
| enum | M2MB_WLAN_START_STATUS_E { M2MB_WLAN_START_STATUS_OFF = 0, M2MB_WLAN_START_STATUS_ON, M2MB_WLAN_START_STATUS_AUTO } |
| enum | M2MB_WLAN_ACTION_E { M2MB_WLAN_SET_SSID, M2MB_WLAN_GET_SSID, M2MB_WLAN_SET_CHANNEL, M2MB_WLAN_GET_CHANNEL, M2MB_WLAN_SET_MAC_ADDRESS, M2MB_WLAN_GET_MAC_ADDRESS, M2MB_WLAN_SET_OPERATION_MODE, M2MB_WLAN_GET_OPERATION_MODE, M2MB_WLAN_SET_LISTEN_INTERVAL, M2MB_WLAN_GET_LISTEN_INTERVAL, M2MB_WLAN_SET_DTIM_INTERVAL, M2MB_WLAN_GET_DTIM_INTERVAL, M2MB_WLAN_SET_AP_ENABLE_HIDDEN_MODE, M2MB_WLAN_GET_AP_ENABLE_HIDDEN_MODE, M2MB_WLAN_SET_STA_KEEP_ALIVE_IN_SEC, M2MB_WLAN_GET_STA_KEEP_ALIVE_IN_SEC, M2MB_WLAN_SET_BEACON_INTERVAL_TU, M2MB_WLAN_GET_BEACON_INTERVAL_TU, M2MB_WLAN_SET_BMISS_CONFIG, M2MB_WLAN_GET_BMISS_CONFIG, M2MB_WLAN_SET_RSSI, M2MB_WLAN_GET_RSSI, M2MB_WLAN_SET_TX_POWER, M2MB_WLAN_GET_TX_POWER, M2MB_WLAN_SET_REG_DOMAIN, M2MB_WLAN_GET_REG_DOMAIN, M2MB_WLAN_SET_TX_RATE, M2MB_WLAN_GET_TX_RATE, M2MB_WLAN_SET_POWER_SAVE_MODE, M2MB_WLAN_GET_POWER_SAVE_MODE, M2MB_WLAN_SET_POWER_SAVE_POLICY, M2MB_WLAN_GET_POWER_SAVE_POLICY, M2MB_WLAN_SET_PHY_MODE, M2MB_WLAN_GET_PHY_MODE, M2MB_WLAN_SET_AUTH_TYPE, M2MB_WLAN_GET_AUTH_TYPE, M2MB_WLAN_SET_AUTH_TYPE_NUM, M2MB_WLAN_GET_AUTH_TYPE_NUM, M2MB_WLAN_SET_ENCRYPTION_TYPE, M2MB_WLAN_GET_ENCRYPTION_TYPE, M2MB_WLAN_SET_ENCRYPTION_TYPE_NUM, M2MB_WLAN_GET_ENCRYPTION_TYPE_NUM, M2MB_WLAN_SET_SECURITY_MODE, M2MB_WLAN_GET_SECURITY_MODE, M2MB_WLAN_SET_BSSID, M2MB_WLAN_GET_BSSID, M2MB_WLAN_SET_WPA_PSK, M2MB_WLAN_GET_WPA_PSK, M2MB_WLAN_SET_SECURITY_PASSPHRASE, M2MB_WLAN_GET_SECURITY_PASSPHRASE, M2MB_WLAN_SET_WEP_KEY_INDEX, M2MB_WLAN_GET_WEP_KEY_INDEX, M2MB_WLAN_SET_WEP_KEY_PAIR, M2MB_WLAN_GET_WEP_KEY_PAIR, M2MB_WLAN_SET_WPS_CREDENTIALS, M2MB_WLAN_GET_WPS_CREDENTIALS, M2MB_WLAN_SET_STATS, M2MB_WLAN_GET_STATS, M2MB_WLAN_SET_PNO_INFO, M2MB_WLAN_GET_PNO_INFO, M2MB_WLAN_SET_PROFILE_INFO, M2MB_WLAN_GET_PROFILE_INFO, M2MB_WLAN_SET_COUNTRY_CODE, M2MB_WLAN_GET_COUNTRY_CODE, M2MB_WLAN_SET_11N_HT, M2MB_WLAN_GET_11N_HT, M2MB_WLAN_SET_AP_WPS_SUPPORT, M2MB_WLAN_GET_AP_WPS_SUPPORT, M2MB_WLAN_SET_PROMISC_FILTER_INFO, M2MB_WLAN_GET_PROMISC_FILTER_INFO, M2MB_WLAN_SET_PROMISC_CMD, M2MB_WLAN_GET_PROMISC_CMD, M2MB_WLAN_SET_EAP_8021X, M2MB_WLAN_GET_EAP_8021X, M2MB_WLAN_SET_INACTIVITY_TIME_IN_MIN, M2MB_WLAN_GET_INACTIVITY_TIME_IN_MIN, M2MB_WLAN_SET_SCAN_TIME, M2MB_WLAN_GET_SCAN_TIME, M2MB_WLAN_SET_IND, M2MB_WLAN_GET_IND, M2MB_WLAN_SET_MAC_FILTER, M2MB_WLAN_GET_MAC_FILTER, M2MB_WLAN_SET_MAC_ACCEPT, M2MB_WLAN_GET_MAC_ACCEPT, M2MB_WLAN_SET_MAC_DENY, M2MB_WLAN_GET_MAC_DENY, M2MB_WLAN_SET_PDP_CID, M2MB_WLAN_GET_PDP_CID, M2MB_WLAN_SET_EAP_METHOD, M2MB_WLAN_GET_EAP_METHOD, M2MB_WLAN_SET_EAP_IDENTITY, M2MB_WLAN_GET_EAP_IDENTITY, M2MB_WLAN_SET_EAP_PASSWORD, M2MB_WLAN_GET_EAP_PASSWORD, M2MB_WLAN_SET_EAP_PRIV_KEY_PASSWD, M2MB_WLAN_GET_EAP_PRIV_KEY_PASSWD, M2MB_WLAN_ACTION_MAX } |
| WLAN interface set or get flags. More... | |
| enum | M2MB_WLAN_ICMP_PING_CFG_E { M2MB_WLAN_ICMP_PING_DISABLE, M2MB_WLAN_ICMP_PING_ENABLE } |
| enum | M2MB_WLAN_EAP_METHOD_E { M2MB_WLAN_EAP_METHOD_PEAPV0_MSCHAPV2 = 0, M2MB_WLAN_EAP_METHOD_PEAPV1_GTC, M2MB_WLAN_EAP_METHOD_TTLS_MSCHAPV2, M2MB_WLAN_EAP_METHOD_TTLS_GTC, M2MB_WLAN_EAP_METHOD_TLS } |
| enum | M2MB_WLAN_EAP_CERT_TYPE_E { M2MB_WLAN_EAP_CERT_TYPE_CA_CERT = 0, M2MB_WLAN_EAP_CERT_TYPE_CLI_CERT, M2MB_WLAN_EAP_CERT_TYPE_KEY } |
Functions | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_init (M2MB_WLAN_HANDLE *h) |
| m2mb_wlan_init initializes WLAN service for current client More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_deinit (M2MB_WLAN_HANDLE h) |
| m2mb_wlan_deinit deinitializes WLAN service. It will shut down the wlan module. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_interface_init (M2MB_WLAN_IF_HANDLE *ifh, M2MB_WLAN_HANDLE h, M2MB_WLAN_DEV_ID_E device_id, m2mb_wlan_ind_callback callback, void *userdata) |
| WLAN Interface Initialization. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_interface_start (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_MODE_E mode) |
| WLAN Interface bring up or start. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_interface_stop (M2MB_WLAN_IF_HANDLE ifh) |
| WLAN Interface bring down or stop. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_interface_deinit (M2MB_WLAN_IF_HANDLE ifh) |
| Removes the interface from the WLAN driver. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_conf (M2MB_WLAN_IF_HANDLE ifh, UINT8 argc,...) |
| m2mb_wlan_conf sets/gets some WLAN parameters. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_scan (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_SCAN_MSG_T *scan_req) |
| This API is used to initiate a wireless scan to find nearby access points m2mb_wlan_init, m2mb_wlan_interface_init and wlan_interface_start should call before calling m2mb_wlan_scan. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_scan_abort (M2MB_WLAN_IF_HANDLE ifh) |
| Abort the current scan operation. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_connect (M2MB_WLAN_IF_HANDLE ifh, UINT8 *ssid) |
| This API is part of connect process in non-AP station mode. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_disconnect (M2MB_WLAN_IF_HANDLE ifh) |
| Disconnects a device from a network. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_mode_set (M2MB_WLAN_HANDLE h, M2MB_WLAN_OP_MODE_E mode) |
| Configure WLAN mode. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_mode_get (M2MB_WLAN_HANDLE h, M2MB_WLAN_OP_MODE_E *mode) |
| Get WLAN operating mode. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_hostapd_set (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_DEV_ID_E dev_id, INT8 *conf_buf, UINT32 conf_size) |
| Update hostapd.conf file. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_bd_set (M2MB_WLAN_HANDLE h, M2MB_WLAN_BIN_ID_E bin_id, INT8 *bin_buf, UINT32 bin_size, UINT32 offset, UINT8 eof_flag) |
| Add or update wlan custom bin file. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_bd_get (M2MB_WLAN_HANDLE h, M2MB_WLAN_BIN_ID_E bin_id, UINT32 *bin_size) |
| Get status of the currently added wlan board data firmware file or otp file. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_ap_client_info_get (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_AP_CLIENT_MSG_T *client_req) |
| This API is used to get client inofrmation in AP mode. m2mb_wlan_init, m2mb_wlan_interface_init and wlan_interface_start should call before calling m2mb_wlan_ap_client_info_get. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_error_info_get (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_ERROR_MSG_T *err_msg) |
| Get WLAN last error. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_hostapd_get_sec_config (M2MB_WLAN_HANDLE h, M2MB_WLAN_DEV_ID_E device_id, M2MB_WLAN_AP_SEC_TYPE_E *sec_type, M2MB_WLAN_SECURITY_MODE_E *key_mgmt, M2MB_WLAN_ENCRYPT_TYPE_E *pairwise, INT8 *key) |
| Set Security Configuration in hostapd file. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_hostapd_set_sec_config (M2MB_WLAN_HANDLE h, M2MB_WLAN_DEV_ID_E device_id, M2MB_WLAN_AP_SEC_TYPE_E sec_type, M2MB_WLAN_SECURITY_MODE_E sec_mode, M2MB_WLAN_ENCRYPT_TYPE_E enc_type, INT8 *key) |
| Set Security Configuration in hostapd file. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_ping_req (M2MB_WLAN_IF_HANDLE ifh, char *addrstr, INT32 retry_count, INT32 pkt_size, INT32 timeout, INT32 ttl) |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_interface_status_get (M2MB_WLAN_HANDLE h, M2MB_WLAN_DEV_ID_E if_id, int *if_status) |
| Get the status of WLAN Interface. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_cfg_get (M2MB_WLAN_HANDLE h, M2MB_WLAN_CONFIG_LEGACY_T *cfg_legacy) |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_cfg_set (M2MB_WLAN_HANDLE h, M2MB_WLAN_CONFIG_LEGACY_T *cfg_legacy) |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_clock_set (M2MB_WLAN_HANDLE wlan_hdl, int clock_val) |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_clock_get (M2MB_WLAN_HANDLE wlan_hdl, int *clock_val) |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_module_select (M2MB_WLAN_HANDLE wlan_hdl, int module_id) |
| Select WE866Cx module. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_start_state_get (M2MB_WLAN_HANDLE wlan_hdl, int *wlan_start_state) |
| Check WLAN start state. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_driver_cfg_restore (M2MB_WLAN_HANDLE wlan_hdl, int dfs_master_flag) |
| Restore driver config. More... | |
| M2MB_WLAN_RESPONSE_E | m2mb_wlan_le910cx_dfs_set (M2MB_WLAN_HANDLE wlan_hdl, int dfs_enable) |
| Dynamic Frequency Selection Master enable or disable. More... | |
| int | m2mb_wlan_le910cx_con_info_get (M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_CON_INFO_T *pConInfo) |
| Device Information. More... | |
| bool | m2mb_wlan_le910cx_is_connected (M2MB_WLAN_IF_HANDLE ifh) |
| Check if WLAN is already enabled. More... | |
Header file for m2mb_wlan APIs.
m2m/m2m_generic/common/m2mb_inc/m2mb_wlan.h
m2mb_wlan APIs provide actions and events for WLAN management.
| #define M2MB_WLAN_BROADCAST_DISABLE 0 |
Disable wlan Broadcast
| #define M2MB_WLAN_BROADCAST_ENABLE 1 |
Enable wlan Broadcast
| #define M2MB_WLAN_MAC_LEN 6 |
Length of MAC address
| #define M2MB_WLAN_MAX_EAP_IDENTITY_LEN 64 |
Maximum length of EAP identity
| #define M2MB_WLAN_MAX_EAP_PASSWORD_LEN 64 |
Maximum length of EAP password
| #define M2MB_WLAN_MAX_EAP_PRIV_KEY_PASSWD_LEN 64 |
Maximum length of EAP Key password
| #define M2MB_WLAN_MAX_PASSPHRASE_LEN 64 |
Maximum length of passphrase
| #define M2MB_WLAN_MAX_SSID_LEN 32 |
Maximum length of SSID
| #define M2MB_WLAN_MAX_WEP_KEY_SIZE 26 |
Maximum WEP key size
| #define M2MB_WLAN_MIN_EAP_IDENTITY_LEN 8 |
Minimum length of EAP identity
| #define M2MB_WLAN_MIN_EAP_PASSWORD_LEN 8 |
Minimum length of EAP password
| #define M2MB_WLAN_MIN_EAP_PRIV_KEY_PASSWD_LEN 8 |
Minimum length of EAP Key password
| #define M2MB_WLAN_MIN_PASSPHRASE_LEN 8 |
Minimum length of passphrase
| #define M2MB_WLAN_MIN_WEP_KEY_SIZE 10 |
Minimum WEP key size
| #define M2MB_WLAN_WPS_MAX_KEY_LEN 64 |
Maximum size of WPS key in bytes
| typedef struct M2MB_CON_IND_S M2MB_CON_IND_T |
Connection event info for both AP and STA modes.
Data structure that presents connect event information from the driver to the application. The application uses this data structure to interpret the event payload received with an M2MB_WLAN_CONNECT_CB or M2MB_WLAN_CONNECT_FAIL_CB events.
| typedef struct M2MB_DISCON_IND_S M2MB_DISCON_IND_T |
Disconnection event info for both AP and STA modes.
Data structure that presents dis-connect event information from the driver to the application. The application uses this data structure to interpret the event payload received with an M2MB_WLAN_DISCONNECT_CB event.
| typedef struct M2MB_WLAN_AP_CLIENT_IND_S M2MB_WLAN_AP_CLIENT_IND_T |
Client info indication.
Data structure that is used to send AP client information from driver to application
| typedef struct M2MB_WLAN_AP_CLIENT_INFO_S M2MB_WLAN_AP_CLIENT_INFO_T |
AP client info.
Data structure that presents AP client information. IT contains client information such as MAC addresses, IP addresses, Host names, Tx/Rx statistics.
| typedef struct M2MB_WLAN_AP_CLIENT_MSG_S M2MB_WLAN_AP_CLIENT_MSG_T |
AP client info request.
Data structure that is used to get AP client information from application to driver.
| typedef struct M2MB_WLAN_BSS_SCAN_INFO_S M2MB_WLAN_BSS_SCAN_INFO_T |
Structure of members for scan results.
Structure for storing scan results. User application should send the array of this structure as a parameter to get filled when scan completed by the driver. This structure can be passed as one of the parameters for the m2mb_wlan_scan function.
| typedef struct M2MB_WLAN_ERROR_MSG_S M2MB_WLAN_ERROR_MSG_T |
WLAN error info request.
Data structure that is used to get last error information from driver to application.
| typedef struct M2MB_WLAN_SCAN_IND_S M2MB_WLAN_SCAN_IND_T |
Scan indication.
Data structure that is used to send scan result from driver to application
| typedef struct M2MB_WLAN_SCAN_MSG_S M2MB_WLAN_SCAN_MSG_T |
Scan request.
Data structure that is used to start scan operation from application to driver. The driver uses this data structure to start scan operation.
Disconnection reason.
Identifies the disconnection reason.
| enum M2MB_WLAN_ACTION_E |
WLAN interface set or get flags.
Enumeration of flags which are used to set or get the parameters to the driver and from the driver. Some flags may support both set and get functionalities.
Different authentication modes supported by WLAN.
Enumeration that identifies authentication modes supported by the WLAN subsystem. The application sets the required authentication from one of these modes using m2mb_wlan_set_param() with M2MB_WLAN_PARAM_AUTH_TYPE as the flag.
| enum M2MB_WLAN_DEV_ID_E |
Different encryption modes supported by WLAN.
Enumeration that identifies encryption modes supported by the WLAN subsystem. The application sets the required encryption from one of these modes using m2mb_wlan_set_param() with M2MB_WLAN_PARAM_ENCRYPTION_TYPE as the flag.
| enum M2MB_WLAN_IND_E |
Events for an application registered CB functions.
WLAN driver invokes an application-registered callback function to indicate various asynchronous events to the application. This data structure enumerates the list of various event IDs for which the WLAN driver invokes the application-registered callback function.
| enum M2MB_WLAN_MODE_E |
WLAN interface operating modes.
Enumeration that provides a list of supported operating modes for each virtual device.
| enum M2MB_WLAN_OP_MODE_E |
WLAN module operating modes.
Enumeration that provides a list of supported operating modes
| enum M2MB_WLAN_RESPONSE_E |
WLAN APIs response enum.
Scan result format.
Scan result can have one of the below format. Normal result is returned in standard message structure. raw result will be returned in char array buffer and raw format is used only for backward compatibilty.
| Enumerator | |
|---|---|
| M2MB_WLAN_SCAN_NORMAL | Normal scan result |
| M2MB_WLAN_SCAN_IW_RAW | Extended result in raw format |
Scan method.
A client can use two scanning methods: active and passive. During an active scan, the client radio transmits a probe request and listens for a probe response from an AP. With a passive scan, the client radio listens on each channel for beacons sent periodically by an AP. A passive scan generally takes more time, since the client must listen and wait for a beacon versus actively probing to find an AP
| Enumerator | |
|---|---|
| M2MB_WLAN_SCAN_ACTIVE | Active scan |
| M2MB_WLAN_SCAN_PASSIVE | Passive scan |
| M2MB_WLAN_RESPONSE_E m2mb_wlan_ap_client_info_get | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| M2MB_WLAN_AP_CLIENT_MSG_T * | client_req | ||
| ) |
This API is used to get client inofrmation in AP mode. m2mb_wlan_init, m2mb_wlan_interface_init and wlan_interface_start should call before calling m2mb_wlan_ap_client_info_get.
This function get the client information.
Blocking call: WLAN driver fill the user buffer with connected client information and result count. If number of connected clients is greater than application provided buffer then driver will fill only max available buffers ('max_cnt' entries).
Non-blocking call: User callback function gets the asynchronous event for client information. AP client info indication event is used by driver to send client info to application. Each indication may contain one or more client information which is informed using result count. At of the result is indicated via separate asynchronous event. Non-blocking method is useful if client list is large and application does not have enough memory.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | *client_req | Refer M2MB_WLAN_AP_CLIENT_MSG_T structure |
In case of non-blocking call m2mb_wlan_ap_client_info_get will return immediately and M2MB_WLAN_AP_CLIENT_INFO_DONE_CB will be indicated once all the client information is sent to application.
M2MB_WLAN_AP_CLIENT_IND_CB will be generated for client result.
m2mb_wlan_ap_client_info_get( ifh, client_req);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_bd_get | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_BIN_ID_E | bin_id, | ||
| UINT32 * | bin_size | ||
| ) |
Get status of the currently added wlan board data firmware file or otp file.
This API allows the user to read the sttaus of currently added firmware file. If it returns size as 0, it means there are no added wlan board data firmware file. If the size is lager than 0, it means there are added firmware file.
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | bin_id | Binary ID or binary index |
| [in] | bin_size | Size to write |
m2mb_wlan_bd_get(h, bin_id, bin_size):
| M2MB_WLAN_RESPONSE_E m2mb_wlan_bd_set | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_BIN_ID_E | bin_id, | ||
| INT8 * | bin_buf, | ||
| UINT32 | bin_size, | ||
| UINT32 | offset, | ||
| UINT8 | eof_flag | ||
| ) |
Add or update wlan custom bin file.
This API allows the user to allows to add or change the wlan board data firmware file or otp file.
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | bin_id | Binary ID or binary index |
| [in] | bin_buf | Buffer containing the file content |
| [in] | bin_size | Size to write |
| [in] | offset | Binary offset |
| [in] | eof_flag | End of file flag which indicates its last chunk to write. |
m2mb_wlan_bd_set(h, bin_id, bin_buf, bin_size, offset, eof_flag);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_conf | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| UINT8 | argc, | ||
| ... | |||
| ) |
m2mb_wlan_conf sets/gets some WLAN parameters.
m2mb_wlan_conf sets/gets WLAN parameters listed in the M2MB_WLAN_ACTION_E enum.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | argc | It determines the number of parameters that follows, plus one (e.g.: if two parameters follow, argc is 3) |
| [in] | ... | It determines the action (among the ones listed in M2MB_WLAN_ACTION_E), while the parameters that follow depend on the action (see following note for further details) |
Description: set the SSID. If the device is in AP mode, this SSID will acts like SSID for the network. If the device is in STA mode, SSID will be the SSID of the network to which STA wants to connect
Params(in): ifh(M2MB_WLAN_IF_HANDLE), argc(UINT8), action(M2MB_WLAN_ACTION_E), dev_id(M2MB_WLAN_DEV_ID_E), ssid(M2MB_WLAN_SSID_T *)
M2MB_WLAN_SSID_T ssid; m2mb_wlan_conf(ifh, 3, M2MB_WLAN_SET_SSID, &ssid);
Action: M2MB_WLAN_GET_SSID
Description: get the SSID.
Params(in): ifh(M2MB_WLAN_IF_HANDLE), argc(UINT8), action(M2MB_WLAN_ACTION_E),
ssid(M2MB_WLAN_SSID_T *)
- example: get SSID
M2MB_WLAN_SSID_T ssid;
m2mb_wlan_conf(ifh, 3, M2MB_WLAN_GET_SSID, &ssid);
Action: M2MB_WLAN_SET_IND
Description : To enable or disable specific async event indication
Params(in): h(M2MB_WLAN_IF_HANDLE), argc(UINT8), action(M2MB_WLAN_ACTION_E),
indication, enable)
example: enable disconnect indication
UINT8 enable_flag=1; M2MB_WLAN_IND_E ind = M2MB_WLAN_DISCONNECT_CB; m2mb_wlan_conf(ifh, 4, M2MB_WLAN_SET_IND, ind, enable_flag);
example: get current configuration of disconnect indication
UINT8 enable_flag; M2MB_WLAN_IND_E ind = M2MB_WLAN_DISCONNECT_CB; m2mb_wlan_conf(ifh, 4, M2MB_WLAN_SET_IND, ind, &enable_flag); if(enable_flag == 1) enabled else disabled m2mb_wlan_conf(ifh, 4, M2MB_WLAN_SET_IND, ind, &enable_flag);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_connect | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| UINT8 * | ssid | ||
| ) |
This API is part of connect process in non-AP station mode.
This function scans for particular SSID given by user and try to connects to it.If SSID is set to a non-empty string before calling this API then it is considered as a connect request. Then, user callback gets called after connect event with status.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | ssid | SSID of the particular Access Point to connect [mandatory] |
m2m_wlan_connect ( handle, ssid);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_deinit | ( | M2MB_WLAN_HANDLE | h | ) |
m2mb_wlan_deinit deinitializes WLAN service. It will shut down the wlan module.
m2mb_wlan_deinit deinitialize WLAN service for freeing the handle passed as first parameter. Calling the m2mb_wlan_deinit is useful after using the WLAN service in order to free memory space.
| [in] | h | first parameter is the handle to the WLAN service, that will be deinitialized by the function. |
m2mb_wlan_deinit(&h);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_disconnect | ( | M2MB_WLAN_IF_HANDLE | ifh | ) |
Disconnects a device from a network.
This API allows the user to disconnect a device, or abort the current connection process.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
m2mb_wlan_disconnect(ifh);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_error_info_get | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| M2MB_WLAN_ERROR_MSG_T * | err_msg | ||
| ) |
Get WLAN last error.
This API allows the user to get last wlan error in detailed form. (string format)
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | *err_msg | refer M2MB_WLAN_ERROR_MSG_T structure |
m2mb_wlan_error_info_get(ifh,err_info);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_hostapd_get_sec_config | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_DEV_ID_E | device_id, | ||
| M2MB_WLAN_AP_SEC_TYPE_E * | sec_type, | ||
| M2MB_WLAN_SECURITY_MODE_E * | key_mgmt, | ||
| M2MB_WLAN_ENCRYPT_TYPE_E * | pairwise, | ||
| INT8 * | key | ||
| ) |
Set Security Configuration in hostapd file.
API allows get security parameters configured for Access Point
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | device_id | User should pass the mode using M2MB_WLAN_DEV_ID_E. |
| [in] | *sec_type | Refer M2MB_WLAN_AP_SEC_TYPE_E Structure |
| [in] | *key_mgmt | Refer M2MB_WLAN_SECURITY_MODE_E Structure |
| [in] | *pairwise | Refer M2MB_WLAN_ENCRYPT_TYPE_E Structure |
| [in] | *key | Last parameter points to the pass-key that has to be updated. |
m2mb_wlan_hostapd_get_sec_config(h,device_id,sec_type,sec_mode,enc_type,key);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_hostapd_set | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| M2MB_WLAN_DEV_ID_E | dev_id, | ||
| INT8 * | conf_buf, | ||
| UINT32 | conf_size | ||
| ) |
Update hostapd.conf file.
This API allows the user to updated hostapd.conf file. Hostapd configuration file controls many options with regards to AP mode only.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | dev_id | User should pass the mode using M2MB_WLAN_DEV_ID_E |
| [in] | conf_buf | Buffer containing the hostapd configuration |
| [in] | conf_size | Size of hostapd configuration buffer |
m2mb_wlan_hostapd_set(ifh,conf_buf, conf_size);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_hostapd_set_sec_config | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_DEV_ID_E | device_id, | ||
| M2MB_WLAN_AP_SEC_TYPE_E | sec_type, | ||
| M2MB_WLAN_SECURITY_MODE_E | sec_mode, | ||
| M2MB_WLAN_ENCRYPT_TYPE_E | enc_type, | ||
| INT8 * | key | ||
| ) |
Set Security Configuration in hostapd file.
API allows modification of security parameters for Access Point
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | device_id | User should pass the mode using M2MB_WLAN_DEV_ID_E. |
| [in] | sec_type | Refer M2MB_WLAN_AP_SEC_TYPE_E Structure |
| [in] | sec_mode | Refer M2MB_WLAN_SECURITY_MODE_E Structure |
| [in] | enc_type | Refer M2MB_WLAN_ENCRYPT_TYPE_E Structure |
| [in] | *key | Last parameter points to the pass-key that has to be updated. |
m2mb_wlan_hostapd_set_sec_config(h,device_id,sec_type,sec_mode,enc_type,key);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_init | ( | M2MB_WLAN_HANDLE * | h | ) |
m2mb_wlan_init initializes WLAN service for current client
m2mb_wlan_init initialize WLAN module returning the handle that must be passed as first parameter for m2mb_wlan_interface_init function. Calling the m2mb_wlan_init is mandatory before using the WLAN service.
| [in] | *h | first parameter is the handle to the WLAN service, that will be initialized by the function. |
m2mb_wlan_init(&h);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_interface_deinit | ( | M2MB_WLAN_IF_HANDLE | ifh | ) |
Removes the interface from the WLAN driver.
This API used to remove the device id or interface from the WLAN driver. But, this API does not disable the WLAN module
| [in] | ifh | first parameter is the handle to the WLAN interface handle |
m2mb_wlan_interface_deinit(ifh);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_interface_init | ( | M2MB_WLAN_IF_HANDLE * | ifh, |
| M2MB_WLAN_HANDLE | h, | ||
| M2MB_WLAN_DEV_ID_E | device_id, | ||
| m2mb_wlan_ind_callback | callback, | ||
| void * | userdata | ||
| ) |
WLAN Interface Initialization.
This API initializes the interface for a given device id. Since, m2mb_wlan_init is the dependency for this API, so m2mb_wlan_init should be called before calling the m2m_wlan_interface_init.
| [in] | *ifh | First parameter is the handle to the WLAN interface handle, that will be initialized by the function. |
| [in] | h | Second parameter is the handle to the WLAN service |
| [in] | device_id | User should pass the mode using M2MB_WLAN_DEV_ID_E. |
| [in] | callback | callback that will be called if an event or a response happens. |
| [in] | userdata | pointer to generic user data that will be returned as it is in the callback. |
m2mb_wlan_interface_init(M2MB_WLAN_IF_HANDLE &ifh, M2MB_WLAN_HANDLE h, M2MB_WLAN_DEV_ID_E device_id);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_interface_start | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| M2MB_WLAN_MODE_E | mode | ||
| ) |
WLAN Interface bring up or start.
This API brings up the interface depend on the mode given by the user. Since, m2mb_wlan_init and m2mb_wlan_interface_init is the dependency for this API, so m2mb_wlan_init and m2mb_wlan_interface_init should be called before calling the m2m_wlan_interface_start.
| [in] | ifh | first parameter is the handle to the WLAN interface handle |
| [in] | mode | User should pass the mode using M2MB_WLAN_MODE_E. |
m2mb_wlan_interface_start(M2MB_WLAN_IF_HANDLE ifh, M2MB_WLAN_MODE_E mode);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_interface_status_get | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_DEV_ID_E | if_id, | ||
| int * | if_status | ||
| ) |
Get the status of WLAN Interface.
API allows user to get the status of WLAN interface.
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | if_id | User should pass the mode using M2MB_WLAN_DEV_ID_E. |
| [in] | *if_status | Pointer to read the interface status. |
| M2MB_WLAN_RESPONSE_E m2mb_wlan_interface_stop | ( | M2MB_WLAN_IF_HANDLE | ifh | ) |
WLAN Interface bring down or stop.
This API brings down the interface.
| [in] | ifh | first parameter is the handle to the WLAN interface |
m2mb_wlan_interface_stop(ifh );
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_cfg_get | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_CONFIG_LEGACY_T * | cfg_legacy | ||
| ) |
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | *cfg_legacy | Refer M2MB_WLAN_CONFIG_LEGACY_T Structure |
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_cfg_set | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_CONFIG_LEGACY_T * | cfg_legacy | ||
| ) |
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | *cfg_legacy | Refer M2MB_WLAN_CONFIG_LEGACY_T Structure |
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_clock_get | ( | M2MB_WLAN_HANDLE | wlan_hdl, |
| int * | clock_val | ||
| ) |
| [in] | wlan_hdl | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | clock_val | Parameter to get WLAN SDIO Clock setting |
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_clock_set | ( | M2MB_WLAN_HANDLE | wlan_hdl, |
| int | clock_val | ||
| ) |
| [in] | wlan_hdl | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | clock_val | Parameter sets WLAN SDIO Clock setting 1 - 400khz 2 - 20Mhz 3 - 25Mhz 4 - 50Mhz 5 - 100Mhz 6 - 200Mhz (default) |
| int m2mb_wlan_le910cx_con_info_get | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| M2MB_WLAN_CON_INFO_T * | pConInfo | ||
| ) |
Device Information.
This API is used to get the device information in the scan.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | *pConInfo | Refer M2MB_WLAN_CON_INFO_T Structure |
m2mb_wlan_le910cx_con_info_get(ifh, pConInfo);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_dfs_set | ( | M2MB_WLAN_HANDLE | wlan_hdl, |
| int | dfs_enable | ||
| ) |
Dynamic Frequency Selection Master enable or disable.
This API allows the user to enable or disable the DFS Master.
| [in] | wlan_hdl | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | dfs_enable | Flag indicates dfs master enable or disable . 1- Enable, 0- Disable |
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_driver_cfg_restore | ( | M2MB_WLAN_HANDLE | wlan_hdl, |
| int | dfs_master_flag | ||
| ) |
Restore driver config.
This API allows user to restore the driver configuration from the backup configuration file
| [in] | wlan_hdl | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | dfs_master_flag | Flag indicates dfs master enable or disable . 1- Enable, 0- Disable |
m2mb_wlan_le910cx_driver_cfg_restore(wlan_hdl, dfs_master_en);
| bool m2mb_wlan_le910cx_is_connected | ( | M2MB_WLAN_IF_HANDLE | ifh | ) |
Check if WLAN is already enabled.
This API used to check if WLAN is already enabled.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
m2mb_wlan_le910cx_is_connected(ifh);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_module_select | ( | M2MB_WLAN_HANDLE | wlan_hdl, |
| int | module_id | ||
| ) |
Select WE866Cx module.
API allows user to select the module in LE910Cx. i.e, either WE866C3 or WE866C6
| [in] | wlan_hdl | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | module_id | Parameter allows user to set the module id. 0- WE866C3, 1- WE866C6 |
m2mb_wlan_le910cx_module_select(wlan_hdl,module_id);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_le910cx_start_state_get | ( | M2MB_WLAN_HANDLE | wlan_hdl, |
| int * | wlan_start_state | ||
| ) |
Check WLAN start state.
This API allows user to check the status of WLAN start command
| [in] | wlan_hdl | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | *wlan_start_state | Parameter indicates the status of WLAN start |
m2mb_wlan_le910cx_start_state_get(wlan_hdl,wlan_start_state);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_mode_get | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_OP_MODE_E * | mode | ||
| ) |
Get WLAN operating mode.
This API allows the user to get operational mode
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | mode | Operating mode of WLAN module |
m2mb_wlan_mode_get(h,op_mode);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_mode_set | ( | M2MB_WLAN_HANDLE | h, |
| M2MB_WLAN_OP_MODE_E | mode | ||
| ) |
Configure WLAN mode.
This API allows the user to configure operational mode as STA, AP, AP_AP or AP_STA
| [in] | h | Handle to the WLAN module, previously initialized by the m2mb_wlan_init function. |
| [in] | mode | Operating mode of WLAN module [mandatory] |
m2mb_wlan_mode(h,op_mode);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_ping_req | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| char * | addrstr, | ||
| INT32 | retry_count, | ||
| INT32 | pkt_size, | ||
| INT32 | timeout, | ||
| INT32 | ttl | ||
| ) |
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | *addrstr | |
| [in] | retry_count | Parameter defines the number of Ping Echo Request to send. |
| [in] | pkt_size | Parameter defines the lenght of Ping Echo Request message |
| [in] | timeout | Parameter defines the timeout, in 100 ms units, waiting a single Echo Reply |
| [in] | ttl | Parameter defines time to live |
m2mb_wlan_ping_req(ifh,addrstr,retry_count,pkt_size,timeout,ttl);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_scan | ( | M2MB_WLAN_IF_HANDLE | ifh, |
| M2MB_WLAN_SCAN_MSG_T * | scan_req | ||
| ) |
This API is used to initiate a wireless scan to find nearby access points m2mb_wlan_init, m2mb_wlan_interface_init and wlan_interface_start should call before calling m2mb_wlan_scan.
This function does the wireless scan depending on the parameters passed by the user. Blocking call: WLAN driver fill the user buffer with the most recent scan results and result count. Non-blocking call: User callback function gets the asynchronous event for scan indication and scan complete. Scan indication event is used by driver to send scan results to application. Each scan indication may contain one or more scan results which is informed using result count. Once scan is completed driver indicates this to application via separate asynchronous event.
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
| [in] | scan_req | Refer M2MB_WLAN_SCAN_MSG_T structure |
In case of non-blocking call m2mb_wlan_scan will return immediately and M2MB_WLAN_SCAN_COMPLETE_CB will be indicated if, a) time-out occurs or b) all channels are scanned
M2MB_WLAN_SCAN_IND_CB will be generated for scan entry.
m2m_wlan_scan( ifh, scan_req);
| M2MB_WLAN_RESPONSE_E m2mb_wlan_scan_abort | ( | M2MB_WLAN_IF_HANDLE | ifh | ) |
Abort the current scan operation.
This API allows the user to abort or stop the non-blcking scan operation which is started using wlan_scan
| [in] | ifh | Handle to the WLAN interface, previously initialized by the m2mb_wlan_interface_init function. |
m2mb_wlan_scan_abort(ifh);