View Source VintageNetWiFi.Cookbook (vintage_net_wifi v0.11.6)

Recipes for common WiFi network configurations

For example, if you want the standard configuration for the most common type of WiFi network (WPA2 Preshared Key networks), pass the SSID and password to wpa_psk/2

Summary

Functions

Return a configuration for creating an open access point

Return a configuration for connecting to open WiFi network

Return a configuration for connecting to a WPA-EAP PEAP network

Return a configuration for connecting to a WPA-PSK network

Functions

Link to this function

open_access_point(ssid, ipv4_subnet \\ "192.168.24.0")

View Source
@spec open_access_point(String.t(), VintageNet.any_ip_address()) ::
  {:ok, map()} | {:error, term()}

Return a configuration for creating an open access point

Pass an SSID and an optional IPv4 class C network.

@spec open_wifi(String.t()) ::
  {:ok, map()} | {:error, VintageNetWiFi.WPA2.invalid_ssid_error()}

Return a configuration for connecting to open WiFi network

Pass an SSID and passphrase. If the SSID and passphrase are ok, you'll get an :ok tuple with the configuration. If there's a problem, you'll get an error tuple with a reason.

Link to this function

wpa_eap_peap(ssid, username, passphrase)

View Source
@spec wpa_eap_peap(String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, VintageNetWiFi.WPA2.invalid_ssid_error()}

Return a configuration for connecting to a WPA-EAP PEAP network

Pass an SSID and login credentials. If valid, you'll get an :ok tuple with the configuration. If there's a problem, you'll get an error tuple with a reason.

Link to this function

wpa_psk(ssid, passphrase)

View Source

Return a configuration for connecting to a WPA-PSK network

Pass an SSID and passphrase. If the SSID and passphrase are ok, you'll get an :ok tuple with the configuration. If there's a problem, you'll get an error tuple with a reason.