# VintageNetWizard (vintage_net_wizard v0.4.2) View Source

Documentation for VintageNetWizard.

# Link to this section Summary

## Functions

run_if_unconfigured(opts \\ [])

Conditionally run the wizard if there is no configurations present

run_wizard(opts \\ [])

Run the wizard.

stop_wizard()

Stop the wizard.

wifi_configured?(ifname)

Check if an interface has a configuration

# Link to this section Functions

Link to this function

# run_if_unconfigured(opts \\ [])

View Source

## Specs

    run_if_unconfigured([VintageNetWizard.Web.Endpoint.opt()]) ::
      :ok | :configured | {:error, String.t()}

Conditionally run the wizard if there is no configurations present

This function is the same `VintageNetWizard.run_wizard/1` however it will first check if there are any configurations for the interface.

This is useful if you want a device to start the wizard only if there are no configurations for the interface. When there are configurations found for the interface this function returns `:configured` to let the consuming application know that the wizard wasn't needed.

If you want more control on how to start the wizard or if you want to force start the wizard you can call `VintageNetWizard.run_wizard/1`.

Link to this function

# run_wizard(opts \\ [])

View Source

## Specs

    run_wizard([VintageNetWizard.Web.Endpoint.opt()]) :: :ok | {:error, String.t()}

Run the wizard.

This means the WiFi module will be put into access point mode and the web server will be started.

Options:

- `:backend` - Implementation for communicating with the network drivers (defaults to `VintageNetWizard.Backend.Default`)
- `:captive_portal` - Whether to run in captive portal mode (defaults to `true`)
- `:device_info` - A list of string tuples to render in a table in the footer (see `README.md`)
- `:ifname` - The network interface to use (defaults to `"wlan0"`)
- `:inactivity_timeout` - Minutes to run before automatically stopping (defaults to 10 minutes)
- `:on_exit` - `{module, function, args}` tuple specifying callback to perform after stopping the server.
- `:ssl` - A Keyword list of `:ssl.tls_server_options`. See `Plug.SSL.configure/1`.
- `:ui` - a subset of UI configuration for title, title color, and button color.

Link to this function

# stop_wizard()

View Source

## Specs

    stop_wizard() :: :ok | {:error, String.t()}

Stop the wizard.

This will apply the current configuration in memory and completely stop the web and backend processes.

Link to this function

# wifi_configured?(ifname)

View Source

## Specs

    wifi_configured?(VintageNet.ifname()) :: boolean()

Check if an interface has a configuration