feat(lib): add rx probe request callback function
@@ -40,6 +40,29 @@ wifi_rx_pbuf_mem_type_t esp_wifi_get_rx_pbuf_mem_type(void);
int8_t esp_wifi_get_ap_rssi(void);
+/**
+ * @brief The RX callback function when receive probe request packet.
+ * When probe request packet is received, the callback function will be called.
+ *
+ * @param frame Data of received probe request.
+ * @param len length of received probe request.
+ * @param rssi rssi of received probe request.
+ */
+typedef void (*wifi_sta_rx_probe_req_t)(const uint8_t *frame, int len, int rssi);
+
+/**
+ * @brief Register the RX callback function when receive probe request.
+ *
+ * When probe request packet is received, the registered callback function will be called.
+ *
+ * @param cb callback
+ *
+ * @return
+ * - ESP_OK: succeed
+ * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
+ */
+esp_err_t esp_wifi_set_sta_rx_probe_req(wifi_sta_rx_probe_req_t cb);
+
#ifdef __cplusplus
}
#endif
