Skip to main content
Manage WiFi network connections on Lager Boxes. WiFi operations are box-level functions — they manage the box’s own wireless interface, not a test net on a PCB.

Import

Function Reference

scan_wifi(interface='wlan0')

Scan for available WiFi networks.
Parameters: Returns: dict with key access_points containing a list of network dicts, each with:
  • ssid - Network name
  • strength - Signal strength as percentage (0-100)
  • security - Security type (‘Open’ or ‘Secured’)
When the scan fails, the dict has an error key and no access_points key. Use result.get('access_points', []) and check result.get('error').

connect_to_wifi(ssid, password, interface='wlan0')

Connect to a WiFi network.
Parameters: Returns: dict with keys:
  • success - Boolean indicating connection success
  • message - Success message (when success is True)
  • error - Error message (when success is False)

get_wifi_status()

Get current WiFi connection status for all interfaces.
Returns: dict keyed by interface name, each value containing:
  • interface - Interface name
  • ssid - Connected network name or ‘Not Connected’
  • state - ‘Connected’ or ‘Disconnected’

disconnect_wifi(interface='wlan0')

Disconnect from the current WiFi network.
Parameters: Returns: dict with keys:
  • success - Boolean indicating disconnect success
  • message - Success message (when success is True)
  • error - Error message (when success is False)

delete_wifi_connection(connection_name)

Delete a saved WiFi connection by name, which is usually the SSID.
Returns: dict with connection (the name), deleted (bool) and, on failure, error

Router Internet Access Control

The Wifi net type controls internet access via an Asus router’s parental control feature. This is a separate concern from box-level WiFi management — it blocks/unblocks a device’s internet access by MAC address.

Examples

Scan and Connect

Network Verification Test

Signal Strength Test

Connection Test

Hardware Requirements

Notes

  • Lager Box must have WiFi hardware
  • Root/sudo access required for most operations
  • WPA2/WPA3 networks supported
  • Open networks require empty password string ('')
  • Interface defaults to ‘wlan0’
  • get_wifi_status() takes no parameters and returns all interfaces
  • Router management (enable/disable) requires Asus router with parental control and a configured wifi net