NervesHeadlessWifi
Disclamer: This package is only an experiment and is not ready for production.
Nerves Headless Wifi create an access point to configure wifi at runtime. It can be used as a REST API or as a webform.
curl -X POST \
http://your_ip:4001/ \
-H 'Content-Type: application/json' \
-d '{
"ssid": "your ssid",
"psk": "your secret",
"key_mgmt": "WPA-PSK"Todo
- Configure wifi via bluetooth
Installation
If available in Hex, the package can be installed
by adding nerves_headless_wifi to your list of dependencies in mix.exs:
def application do
[
mod: {MyApp.Application, [:nerves_headless_wifi]},
]
end
def deps do
[
{:nerves_headless_wifi, git: "https://github.com/laibulle/nerves_headless_wifi.git", tag: "master"}
]
endconfig.exs
config :nerves_network, :default,
wlan0: [
networks: [
[
ssid: "MyAccesPoint",
psk: "0123456789",
key_mgmt: :"WPA-PSK",
mode: 2,
ipv4_address_method: :dhcpd
]
]
],
eth0: [
ipv4_address_method: :dhcp
]
config :nerves_headless_wifi,
config_path: "/root/wifi.json",
mdns: "myapp.local",
port: 4001,
iface: "wlan0"Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/nerves_headless_wifi.