Import
Method Reference
Getting a WiFi Net
Get a WiFi net instance by name and type.| Parameter | Type | Description |
|---|---|---|
name | str | Net name (configured in Lager system) |
type | NetType | Must be NetType.Wifi |
Methods
| Method | Description |
|---|---|
scan() | Scan for available WiFi networks |
connect(ssid, password) | Connect to a WiFi network |
status() | Get current WiFi connection status |
disconnect() | Disconnect from WiFi network |
scan()
Scan for available WiFi networks.
list of network dicts, each containing:
ssid- Network namestrength- Signal strength as percentage (0-100)security- Security type (‘Open’ or ‘Secured’)
connect(ssid, password)
Connect to a WiFi network.
| Parameter | Type | Description |
|---|---|---|
ssid | str | Network name |
password | str | Network password (empty string for open networks) |
dict with keys:
success- Boolean indicating connection successmessage- Success message (whensuccessis True)error- Error message (whensuccessis False)
status()
Get current WiFi connection status.
dict containing:
connected- Boolean indicating connection statessid- Connected network name or ‘Not Connected’strength- Signal strength percentage (if connected)
disconnect()
Disconnect from WiFi network.
Examples
Scan and Connect
Network Verification Test
Signal Strength Test
Connection Test
Hardware Requirements
| Requirement | Description |
|---|---|
| WiFi Hardware | USB adapter or built-in |
| Permissions | Root/sudo access required |
| Supported Security | WPA2, WPA3, Open |
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 requires Asus router with parental control

