View Source VintageNetWiFi.WPASupplicant (vintage_net_wifi v0.12.0)

Control a wpa_supplicant instance for an interface.

Summary

Functions

Returns a specification to start this module under a supervisor.

Initiate a scan of WiFi networks

Polls for signal level info

Start a GenServer to manage communication with a wpa_supplicant

Enable reception of WiFi credentials via WPS

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec scan(VintageNet.ifname()) :: :ok

Initiate a scan of WiFi networks

@spec signal_poll(VintageNet.ifname()) :: {:ok, any()} | {:error, any()}

Polls for signal level info

@spec start_link(keyword()) :: GenServer.on_start()

Start a GenServer to manage communication with a wpa_supplicant

Arguments:

  • :wpa_supplicant - the path to the wpa_supplicant binary *:wpa_supplicant_conf_path - the path to the supplicant's conf file
  • :ifname - the network interface
  • :control_path - the path to the wpa_supplicant control file
  • :keep_alive_interval - how often to ping the wpa_supplicant to make sure it's still alive (defaults to 60,000 seconds)
  • :ap_mode - true if the WiFi module and wpa_supplicant are in access point mode
@spec wps_pbc(VintageNet.ifname()) :: {:ok, any()} | {:error, any()}

Enable reception of WiFi credentials via WPS