Firmware Update Example (Python)
This is a small Python script that connects to an RCSP server, subscribes to
the UpdateFwEvents publisher, and runs an UpdateFirmware flow against the
first connected device (or a device you pick with --device-id). It is the
companion script for the Firmware updates guide.
The flow is:
- Open a TCP socket to the RCSP server (default
localhost:45451). - (If no
--device-idis given)ListDevicesand pick the first one. Subscribeto theUpdateFwEventspublisher.- Send
UpdateFirmware— this returnsOkonly when the update finishes; progress is reported through events along the way. - Read events until we see
DoneorFailure. Unsubscribe.
Download
Section titled “Download”The full script is available in the SDK’s examples/python folder as
rcsp_fw_update_example.py.
To run the script, navigate to $ROKOKO_SDK_HOME/examples/python in a terminal,
and execute:
python3 rcsp_fw_update_example.py --host localhost path/to/firmware.bin