### React UI Development Setup Source: https://github.com/balena-os/wifi-connect/blob/master/ui/README.md Essential npm commands for managing the React-based WiFi Connect UI. Includes installing dependencies, starting the development server, and building for production. ```bash npm install ``` ```bash npm start ``` ```bash npm build ``` -------------------------------- ### Install WiFi Connect on Raspbian/Debian Source: https://github.com/balena-os/wifi-connect/blob/master/README.md Installs WiFi Connect on Raspbian or Debian systems. This script disables dhcpcd, installs NetworkManager, and downloads WiFi Connect. It requires execution in a terminal and may prompt for user input. ```bash bash <(curl -L https://github.com/balena-io/wifi-connect/raw/master/scripts/raspbian-install.sh) ``` -------------------------------- ### balenaOS Multicontainer App Configuration Source: https://github.com/balena-os/wifi-connect/blob/master/README.md Configure a balenaOS multicontainer application to use WiFi Connect. This involves setting the container network mode to host, enabling DBUS communication with the host OS, and granting the container Network Admin capabilities. The example demonstrates the necessary settings within a docker-compose.yml file. ```yaml version: "2.1" services: wifi-connect: build: ./wifi-connect network_mode: "host" labels: io.balena.features.dbus: '1' cap_add: - NET_ADMIN environment: DBUS_SYSTEM_BUS_ADDRESS: "unix:path=/host/run/dbus/system_bus_socket" ... ``` -------------------------------- ### WiFi Connect CLI and Environment Variables Source: https://github.com/balena-os/wifi-connect/blob/master/docs/command-line-arguments.md This section details the command-line arguments and their associated environment variables for the WiFi Connect utility. It covers flags for help and version, and options for configuring the captive portal's DHCP range, gateway, listening port, interface, passphrase, SSID, activity timeout, and UI directory. ```APIDOC WiFi Connect Configuration: Flags: -h, --help Prints help information. -V, --version Prints version information. Options: -d, --portal-dhcp-range dhcp_range, $PORTAL_DHCP_RANGE DHCP range of the captive portal WiFi network. Default: 192.168.42.2,192.168.42.254 -g, --portal-gateway gateway, $PORTAL_GATEWAY Gateway of the captive portal WiFi network. Default: 192.168.42.1 -o, --portal-listening-port listening_port, $PORTAL_LISTENING_PORT Listening port of the captive portal web server. Default: 80 -i, --portal-interface interface, $PORTAL_INTERFACE Wireless network interface to be used by WiFi Connect. -p, --portal-passphrase passphrase, $PORTAL_PASSPHRASE WPA2 Passphrase of the captive portal WiFi network. Default: no passphrase -s, --portal-ssid ssid, $PORTAL_SSID SSID of the captive portal WiFi network. Default: WiFi Connect -a, --activity-timeout timeout, $ACTIVITY_TIMEOUT Exit if no activity for the specified timeout (seconds). Default: 0 - no timeout -u, --ui-directory ui_directory, $UI_DIRECTORY Web UI directory location. Default: ui_ ``` -------------------------------- ### WiFi Connect Configuration Options Source: https://github.com/balena-os/wifi-connect/blob/master/README.md Details on how to configure the WiFi Connect access point SSID and passphrase. These can be set via command-line arguments or environment variables, providing flexibility in deployment. ```APIDOC WiFi Connect Configuration: --portal-ssid Sets the SSID for the captive portal access point. Defaults to 'WiFi Connect'. --portal-passphrase Sets a WPA2 passphrase for the captive portal access point. If not set, the network is unprotected. PORTAL_SSID= Environment variable equivalent to --portal-ssid. PORTAL_PASSPHRASE= Environment variable equivalent to --portal-passphrase. Example Usage: To set a custom SSID and passphrase: wifi-connect --portal-ssid "MyDeviceAP" --portal-passphrase "MySecurePassword" Using environment variables: export PORTAL_SSID="MyDeviceAP" export PORTAL_PASSPHRASE="MySecurePassword" wifi-connect ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.