Asynchronous wi-fi monitoring enable mode (Promiscuous mode) function.
This function enables the monitoring mode, which starts transmission of the packets based on the filter information passed in as a parameter. All packets that meet the filtering criteria are passed to the application layer, to be handled by the assigned monitoring callback function. The monitoring callback function must be implemented before starting the monitoring mode, in-order to handle the packets received. Registering of the implemented callback function is through the callback pointer tpfAppMonCb in the tstrWifiInitParam structure. passed to m2m_wifi_init function at initialization.
Functions | |
NMI_API sint8 | m2m_wifi_enable_monitoring_mode (tstrM2MWifiMonitorModeCtrl *pstrMtrCtrl) |
NMI_API sint8 m2m_wifi_enable_monitoring_mode | ( | tstrM2MWifiMonitorModeCtrl * | pstrMtrCtrl | ) |
[in] | pstrMtrCtrl | Pointer to tstrM2MWifiMonitorModeCtrl structure holding the Filtering parameters. A buffer to receive data should be set during initializing m2m_wifi_init(), or m2m_wifi_set_receive_buffer() |
The example demonstrates the main function where-by the monitoring enable function is called after the initialization of the driver and the packets are handled in the callback function.
References hif_send(), m2m_memcpy(), M2M_REQ_DATA_PKT, M2M_REQ_GRP_WIFI, M2M_WIFI_CH_1, M2M_WIFI_CH_14, M2M_WIFI_REQ_ENABLE_MONITORING, NULL, and tstrM2MWifiMonitorModeCtrl::u8ChannelID.
Referenced by os_m2m_wifi_enable_monitoring_mode_imp().