### Quick WiFi Configuration Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Use `VintageNetWiFi.quick_configure/2` for a simple setup with SSID and passphrase. This is the easiest way to get connected. ```elixir iex> VintageNetWiFi.quick_configure("my_access_point", "secret_passphrase") :ok ``` -------------------------------- ### Advanced WiFi Network Configuration Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Configure detailed WiFi network settings, including security, SSIDs, and IP addressing. This example shows a typical client configuration for WPA2 Personal. ```elixir config :vintage_net, config: [ {"wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ networks: [ %{ key_mgmt: :wpa_psk, ssid: "my_network_ssid", psk: "a_passphrase_or_psk", } ] }, ipv4: %{method: :dhcp}, } } ] ``` -------------------------------- ### Get WiFi Signal Quality Info Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Use the `VintageNet.ioctl` command with `:signal_poll` to retrieve signal strength and quality details when connected in STA mode. Ensure the device is connected to a WiFi network first. ```elixir VintageNet.ioctl("wlan0", :signal_poll) ``` ```elixir {:ok, %VintageNetWiFi.SignalInfo{ center_frequency1: 2462, center_frequency2: 0, frequency: 2472, linkspeed: 300, signal_dbm: -32, signal_percent: 94, width: "40 MHz" }} ``` -------------------------------- ### Enable WEXT Support Source: https://github.com/nerves-networking/vintage_net_wifi/wiki/WiFi-Modules Enable WEXT support for modules requiring it. This involves both kernel and wpa_supplicant configuration. ```bash CONFIG_CFG80211_WEXT=y BR2_PACKAGE_WPA_SUPPLICANT_WEXT=y ``` -------------------------------- ### Configure wpa_supplicant.conf Manually Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Specify the contents of wpa_supplicant.conf directly. This is useful for troubleshooting or advanced configurations. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ wpa_supplicant_conf: """ network={ ssid=\"home\" key_mgmt=WPA-PSK psk=\"very secret passphrase\" } """ }, ipv4: %{method: :dhcp} }) ``` -------------------------------- ### Configure Enterprise Wi-Fi (WPA-EAP) Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Connect to an enterprise Wi-Fi network using WPA-EAP. Configuration details are passed through to wpa_supplicant. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ networks: [ %{ ssid: "testing", key_mgmt: :wpa_eap, pairwise: "CCMP TKIP", group: "CCMP TKIP", eap: "PEAP", identity: "user1", password: "supersecret", phase1: "peapver=auto", phase2: "MSCHAPV2" } ] }, ipv4: %{method: :dhcp} }) ``` -------------------------------- ### Add VintageNetWiFi Dependency Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Add the VintageNetWiFi library to your project's dependencies in `mix.exs`. Ensure you are using a compatible version. ```elixir def deps do [ {:vintage_net_wifi, "~> 0.12.0", targets: @all_targets} ] end ``` -------------------------------- ### Display VintageNet Network Information Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Run `VintageNet.info` in IEx to display current network configuration and status. This is a primary debugging step to verify connection parameters. ```elixir iex> VintageNet.info ``` -------------------------------- ### Quick Configuration for WPA PSK Network Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/CHANGELOG.md Use this helper function to quickly connect to a WPA PSK network on the default interface 'wlan0'. ```elixir VintageNetWiFi.quick_configure("ssid", "password") ``` -------------------------------- ### Configure WPA PSK Network Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Connect to a Wi-Fi network using WPA-PSK security. Ensure the SSID and passphrase are correct. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ networks: [ %{ key_mgmt: :wpa_psk, psk: "a_passphrase_or_psk", ssid: "my_network_ssid" } ] }, ipv4: %{method: :dhcp} }) ``` -------------------------------- ### Add Linux Firmware Package Source: https://github.com/nerves-networking/vintage_net_wifi/wiki/WiFi-Modules Add the Linux firmware package to your nerves_defconfig. Replace '*' with the specific firmware identifier. ```bash BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_*=y ``` -------------------------------- ### Configure Access Point Mode Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Configure a network adapter to run as an Access Point with static IP configuration and DHCP server enabled. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ networks: [ %{ mode: :ap, ssid: "test ssid", key_mgmt: :none } ] }, ipv4: %{ method: :static, address: "192.168.24.1", netmask: "255.255.255.0" }, dhcpd: %{ start: "192.168.24.2", end: "192.168.24.10", options: %{ dns: ["1.1.1.1", "1.0.0.1"], subnet: "255.255.255.0", router: ["192.168.24.1"] } } }) ``` -------------------------------- ### Add RPi Distro Firmware Nonfree Package Source: https://github.com/nerves-networking/vintage_net_wifi/wiki/WiFi-Modules Add the RPi Distro firmware nonfree package to your nerves_defconfig for Cypress modules. ```bash BR2_PACKAGE_RPI_DISTRO_FIRMWARE_NONFREE=y ``` -------------------------------- ### Enable CFG80211 and MAC80211 Source: https://github.com/nerves-networking/vintage_net_wifi/wiki/WiFi-Modules Ensure CFG80211 and MAC80211 are enabled as modules in your Linux configuration. ```bash CONFIG_CFG80211=m CONFIG_MAC80211=m ``` -------------------------------- ### Configure 802.11s Mesh Network Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Use this configuration to set up an 802.11s mesh network. Ensure the WiFi module supports 802.11s meshing. ```elixir VintageNet.configure("mesh0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ user_mpm: 1, networks: [ %{ ssid: "my-mesh", key_mgmt: :none, mode: :mesh } ] } }) ``` -------------------------------- ### Configure WPA2 with SHA256 Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Connect to a Wi-Fi network using WPA2 with SHA256. Requires `ieee8011w` set to 2. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, ipv4: %{method: :dhcp}, vintage_net_wifi: %{ networks: [ %{ key_mgmt: :wpa_psk_sha256, ssid: "my_network_ssid", psk: "a_password", ieee8011w: 2 } ] } }) ``` -------------------------------- ### Configure WiFi Drivers Source: https://github.com/nerves-networking/vintage_net_wifi/wiki/WiFi-Modules Configure specific WiFi drivers in your Linux kernel options. These are typically built as modules. ```bash CONFIG_R8188EU=m ``` ```bash CONFIG_BRCMFMAC=m ``` ```bash CONFIG_WL18xx=m, CONFIG_WLCORE_SDIO=m ``` ```bash CONFIG_RTL8192CU=m ``` ```bash WILC1000_SDIO=m ``` -------------------------------- ### Specify Arbitrary wpa_supplicant.conf Text Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/CHANGELOG.md Allows users to specify arbitrary wpa_supplicant.conf text for advanced configuration needs, bypassing VintageNetWiFi's default validation. ```elixir :wpa_supplicant_conf ``` -------------------------------- ### Configure Mesh Gate Parameters Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Configure mesh nodes to act as mesh gates by setting specific parameters. This allows nodes connected to external networks to participate in the mesh. ```elixir VintageNet.configure("mesh0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ user_mpm: 1, networks: [ %{ ssid: mesh_id, key_mgmt: :none, mode: :mesh, mesh_hwmp_rootmode: 4, mesh_gate_announcements: 1 } ] } }) ``` -------------------------------- ### Configure WPA3-only Network Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Connect to a Wi-Fi network using WPA3-only security. Requires `ieee80211w` set to 2. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, ipv4: %{method: :dhcp}, vintage_net_wifi: %{ networks: [ %{ key_mgmt: :sae, ssid: "my_network_ssid", sae_password: "a_password", ieee8011w: 2 } ] } }) ``` -------------------------------- ### Configure WEP Network Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Connect to a Wi-Fi network using WEP security. Note that WEP is considered insecure and should be avoided if possible. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ networks: [ %{ ssid: "my_network_ssid", wep_key0: "42FEEDDEAFBABEDEAFBEEFAA55", key_mgmt: :none, wep_tx_keyidx: 0 } ] }, ipv4: %{method: :dhcp} }) ``` -------------------------------- ### Perform Quick WiFi Scan Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/CHANGELOG.md This helper function scans for and returns available access points in a single call. ```elixir VintageNetWiFi.quick_scan() ``` -------------------------------- ### Access Point Information Structure Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Represents information about a detected WiFi access point. Includes details like band, BSSID, channel, signal strength, and SSID. ```elixir %VintageNetWiFi.AccessPoint{ band: :wifi_5_ghz, bssid: "8a:8a:20:88:7a:50", channel: 149, flags: [:wpa2_psk_ccmp, :ess], frequency: 5745, signal_dbm: -76, signal_percent: 57, ssid: "MyNetwork" } ``` -------------------------------- ### Configure Regulatory Domain Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Override the default regulatory domain to a specific country (e.g., 'US') to ensure correct Wi-Fi frequencies are available. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ regulatory_domain: "US", networks: [ %{ ssid: "testing", key_mgmt: :wpa_psk, psk: "super secret" } ] }, ipv4: %{method: :dhcp} }) ``` -------------------------------- ### Configure Access Point Frequency Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Configure an Access Point with a specific frequency (e.g., 5 GHz). Ensure the device supports the chosen frequency. ```elixir iex> VintageNet.configure("wlan0", %{ type: VintageNetWiFi, vintage_net_wifi: %{ networks: [ %{ mode: :ap, ssid: "test ssid", frequency: 5180, # Creates a 5 GHz wifi network if supported by device key_mgmt: :none } ] }, ipv4: %{ method: :static, address: "192.168.24.1", netmask: "255.255.255.0" }, dhcpd: %{ start: "192.168.24.2", end: "192.168.24.10", options: %{ dns: ["1.1.1.1", "1.0.0.1"], subnet: "255.255.255.0", router: ["192.168.24.1"] } } }) ``` -------------------------------- ### Mesh Peer Information Structure Source: https://github.com/nerves-networking/vintage_net_wifi/blob/main/README.md Represents information about a known mesh peer. Includes details about its connection, capabilities, and network parameters. ```elixir %VintageNetWiFi.MeshPeer{ active_path_selection_metric_id: 1, active_path_selection_protocol_id: 1, age: 2339, authentication_protocol_id: 0, band: :wifi_2_4_ghz, beacon_int: 1000, bss_basic_rate_set: "10 20 55 110 60 120 240", bssid: "f8:a2:d6:b5:d4:07", capabilities: 0, channel: 5, congestion_control_mode_id: 0, est_throughput: 65000, flags: [:mesh], frequency: 2432, id: 7, mesh_capability: 9, mesh_formation_info: 2, mesh_id: "my-mesh", noise_dbm: -89, quality: 0, signal_dbm: -27, signal_percent: 97, snr: 62, ssid: "my-mesh", synchronization_method_id: 1 } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.