From fb1e45d39642e5477b0d9f53f7776283967773be Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Mon, 20 Jan 2020 18:09:10 -0500 Subject: [PATCH] Add AP mode example to cookbook --- docs/cookbook.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/cookbook.md b/docs/cookbook.md index f469f0d8..25133785 100644 --- a/docs/cookbook.md +++ b/docs/cookbook.md @@ -152,3 +152,38 @@ Protected EAP (PEAP) is a common authentication protocol for enterprise WiFi net ### Enterprise WiFi (EAP-TLS) TBD + +### Access point WiFi + +Some WiFi modules can be run in access point mode. This makes it possible to +create configuration wizards and captive portals. Configuration of this is more +involved. Here is a basic configuration: + +```elixir +%{ + 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" + } +} +``` + +See the +[vintage_net_wizard](https://github.com/nerves-networking/vintage_net_wizard) +for an example of a project that uses AP mode and a web server for WiFi +configuration.