# NervesHeadlessWifi

[![Build Status](](

__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]},

def deps do
    {:nerves_headless_wifi, git: "", tag: "master"}


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",
  service_data: ["id=123123", "port=4001"]

Documentation can be generated with [ExDoc](
and published on [HexDocs]( Once published, the docs can
be found at [](