Network Configuration Example (Python)
This is a Python script that connects to an RCSP server, lists the connected devices, and gets/sets the network configuration for the first one. It is intentionally minimal — its job is to make the wire format and the command envelope easy to read in code, alongside the RCSP specification.
The flow is:
- Open a TCP socket to the RCSP server (default
localhost:45451). - Send the
ListDevicestop-level command and read the response. - Either:
- Send a
GetDeviceNetworkConfigdevice command for the first device returned, or - Send a
SetDeviceNetworkConfigdevice command to change the IP address.
- Send a
This is the same script that is used in the Wi-Fi setup guide.