Files
diijkstra b0370f7bb3 Doc: Describe how to upload firmware via CLI & HTTP
Rough explanation how to upload a new firmware. Probably, we should
support basic auth on upload for easier use, but lets document
what we have.
2026-03-21 12:22:36 +01:00

801 B

Automation

Upload

You can automate upload of the firmware via WEB with curl:

  1. Authorize with /login endpoint and save cookie:

    curl -c cookies.txt  http://${SWITCH_IP}/login -d pwd=${PASSWORD} -i
    

    This will save session cookie in cookies.txt

  2. Send the firmware via form:

    curl -b cookies.txt http://${SWITCH_IP}/upload -F "uploadedfile=@${FIRMWARE_FILE_PATH}" -i
    

    You can expect that server will close connection, without responding to request. Wait for SWITCH_IP to be responding again.

Port status

In similar way to upload, you can fetch the json status of the ports.

  1. Get the session cookie as for upload.

  2. Hit the /status.json with cookie:

    curl -b cookies.txt http://${SWITCH_IP}/status.json