Skip to content

Features Network

coe0718 edited this page May 31, 2026 · 4 revisions

Network

Query network status and WiFi information.

Network Status

deskbrid network status

Response:

{
  "type": "response",
  "status": "ok",
  "data": {
    "connected": true,
    "interface": "wlan0",
    "type": "wifi",
    "ssid": "MyNetwork",
    "signal": 85
  }
}

Protocol:

{"type": "network.status"}

WiFi Networks

deskbrid network wifi

Response:

{
  "type": "response",
  "status": "ok",
  "data": [
    {"ssid": "MyNetwork", "signal": 85, "secured": true},
    {"ssid": "GuestNetwork", "signal": 42, "secured": false}
  ]
}

Protocol:

{"type": "network.wifi"}

Network Connections

deskbrid network connections

Response:

{
  "type": "response",
  "status": "ok",
  "data": [
    {
      "name": "MyHomeWiFi",
      "type": "wifi",
      "device": "wlan0",
      "state": "activated",
      "ip4": "192.168.1.100",
      "ip6": "fe80::abcd:ef01:2345:6789"
    },
    {
      "name": "Ethernet",
      "type": "ethernet",
      "device": "eth0",
      "state": "deactivated"
    }
  ]
}

Protocol:

{"type": "network.connections.list"}

Connection Profiles

deskbrid network profiles

Response:

{
  "type": "response",
  "status": "ok",
  "data": [
    {
      "name": "MyHomeWiFi",
      "type": "wifi",
      "autoconnect": true
    },
    {
      "name": "WorkVPN",
      "type": "vpn",
      "autoconnect": false
    }
  ]
}

Protocol:

{"type": "network.connections.profiles"}

Start Hotspot

deskbrid network hotspot start --ssid MyHotspot --password secret123

Protocol:

{"type": "network.hotspot.start", "ssid": "MyHotspot", "password": "secret123"}

Stop Hotspot

deskbrid network hotspot stop

Protocol:

{"type": "network.hotspot.stop"}

Enable/Disable WiFi

deskbrid network wifi enable
deskbrid network wifi disable

Protocol:

{"type": "network.wifi.enable", "enabled": true}
{"type": "network.wifi.enable", "enabled": false}

Set DNS

deskbrid network dns set --dns 8.8.8.8 --dns 8.8.4.4

Protocol:

{"type": "network.dns.set", "dns": ["8.8.8.8", "8.8.4.4"]}

Reset DNS

deskbrid network dns reset

Protocol:

{"type": "network.dns.reset"}

VPN Actions

deskbrid network vpn connect --profile WorkVPN
deskbrid network vpn disconnect --profile WorkVPN

Protocol:

{"type": "network.vpn.connect", "profile_name": "WorkVPN"}
{"type": "network.vpn.disconnect", "profile_name": "WorkVPN"}

WWAN Enable/Disable

deskbrid network wwan enable
deskbrid network wwan disable

Protocol:

{"type": "network.wwan.enable", "enabled": true}
{"type": "network.wwan.enable", "enabled": false}

TCP Mode

Deskbrid can also listen on a TCP port for remote connections (requires --tcp-port and --tcp-token flags when starting the daemon).

deskbrid network tcp info

Response:

{
  "type": "response",
  "status": "ok",
  "data": {
    "listening": true,
    "port": 18796,
    "token_set": true
  }
}

Protocol:

{"type": "network.tcp.info"}

Python Example

from deskbrid import Deskbrid

client = Deskbrid()

status = client.network_status()
if status["connected"]:
    print(f"Connected to {status['ssid']}")
else:
    print("No network connection")

wifi = client.network_wifi()
for network in wifi:
    print(f"{network['ssid']}: {network['signal']}%")

connections = client.network_connections_list()
for conn in connections:
    print(f"{conn['name']} ({conn['type']}): {conn['state']}")

profiles = client.network_connections_profiles()
for profile in profiles:
    print(f"{profile['name']} ({profile['type']}): autoconnect={profile['autoconnect']}")

Clone this wiki locally