VintageNetWiFi.Cookbook (vintage_net_wifi v0.10.0) View Source
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
Link to this section 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
Link to this section Functions
Specs
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.
Specs
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.
Specs
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.
Specs
wpa_psk(String.t(), String.t()) :: {:ok, map()} | {:error, VintageNetWiFi.WPA2.invalid_ssid_error() | VintageNetWiFi.WPA2.invalid_passphrase_error()}
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.