Device Discovery Protocol
The LQ 10 provides a read only discovery service based on UDP broadcast. A computer can retrieve the management addresses and AP/STA roles of all LQ 10 devices on the same Layer…
2 min read · English documentationDevice Discovery Protocol
The LQ-10 provides a read-only discovery service based on UDP broadcast. A computer can retrieve the management addresses and AP/STA roles of all LQ-10 devices on the same Layer 2 network without knowing their IP addresses in advance.
Protocol Parameters
| Item | Value |
|---|---|
| Transport protocol | UDP/IPv4 |
| Request destination | 255.255.255.255:9528 |
| Request content | LQ10_DISCOVER_REQ |
| Response prefix | LQ10_DISCOVER_RSP |
| Character encoding | ASCII prefix + UTF-8 JSON |
A request may end with spaces, tabs, carriage returns, line feeds, or null characters. The device ignores these trailing characters before matching. Other content does not trigger a response.
Response Format
After receiving a valid request, the device broadcasts one response to the UDP source port used by the computer to send the request.
LQ10_DISCOVER_RSP {"ip":"192.168.1.200","role":"ap"}
JSON fields:
| Field | Type | Description |
|---|---|---|
ip |
string | Current IPv4 management address of br0; falls back to the configured address if reading fails |
role |
string |
ap, sta, mesh, or unknown
|
Every device in the same broadcast domain responds independently. The computer should therefore continue receiving until the timeout expires and deduplicate responses by IP address.
Python Scanning Example
import json
import socket
import time
REQUEST = b"LQ10_DISCOVER_REQ"
PREFIX = b"LQ10_DISCOVER_RSP "
TARGET = ("255.255.255.255", 9528)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.bind(("", 0))
sock.settimeout(0.2)
sock.sendto(REQUEST, TARGET)
devices = {}
deadline = time.monotonic() + 2.0
while time.monotonic() < deadline:
try:
payload, sender = sock.recvfrom(1024)
except socket.timeout:
continue
if not payload.startswith(PREFIX):
continue
try:
item = json.loads(payload[len(PREFIX):].decode("utf-8"))
except (UnicodeDecodeError, json.JSONDecodeError):
continue
if isinstance(item.get("ip"), str) and item.get("role") in {
"ap", "sta", "mesh", "unknown"
}:
devices[item["ip"]] = item
for item in sorted(devices.values(), key=lambda x: x["ip"]):
print(item["role"].upper(), item["ip"])
Network Limitations and Troubleshooting
-
255.255.255.255is a limited broadcast address and is generally not forwarded by routers. The computer and devices should be in the same Layer 2 broadcast domain. - The computer's firewall must allow the program to send and receive UDP broadcasts.
- On a computer with multiple network adapters, make sure the request is sent through the adapter connected to the LQ-10. Bind to that adapter's local IPv4 address if necessary.
- Responses are sent to the request's source port. Do not listen only on fixed port
9528unless the request itself is also sent from9528. - The discovery service only returns addresses and roles. It does not modify device configurations or replace web login authentication.
