WiFi Sniffer

See WiFi Sniffer for an example of how to use this.

API Documentation

group wifi_sniffer

WiFi promiscuous mode sniffer support.




using BeaconInfoList = BeaconOrClientListTemplate<BeaconInfo>

For applications to use to manage list of unique beacons.

using ClientInfoList = BeaconOrClientListTemplate<ClientInfo>

For applications to use to manage list of unique clients.

using WifiSnifferCallback = Delegate<void(uint8_t *data, uint16_t length)>
using WifiBeaconCallback = Delegate<void(const BeaconInfo &beacon)>
using WifiClientCallback = Delegate<void(const ClientInfo &client)>
struct BeaconInfo
#include <WifiSniffer.h>

Decoded Wifi beacon (Access Point) information.

struct ClientInfo
#include <WifiSniffer.h>

Decoded Wifi client information.

template<class T>
class BeaconOrClientListTemplate : public Vector<T>
#include <WifiSniffer.h>
class WifiSniffer : public ISystemReadyHandler
#include <WifiSniffer.h>

Public Functions

void begin()

Initialise the sniffer.

void end()

Stop the sniffer.

inline void onBeacon(WifiBeaconCallback callback)

Register notification for beacon (AP) info.

inline void onClient(WifiClientCallback callback)

Register notification for client info.

inline void onSniff(WifiSnifferCallback callback)

Register notification for all incoming data.


Callback invoked for all packet types, including beacon/client

inline void setChannel(unsigned channel)

Set the channel to listen on.



inline unsigned getChannel()

Get the current channel being listened on.