Using Curl to Manage Telit Radio Firmware Upgrade
Here are two examples of using curl to manage Telit radio firmware upgrade.
One example provides information on the Telit update and the other initiates a telit radio firmware upgrade.
Getting available Telit radio firmware data
Example (post request, use curl):
curl -i -k -b /tmp/headers --http1.0 --header "Content-Type: application/json" --request POST --data '{"useDefault":true,"ftpServer":"ftp.multitech.com/wireless/Telit_FOTA/ME910C1-NV/firmwarecheck.json","ftpUsername":"","ftpPassword":""}' "https://192.168.2.1/api/command/telit_check_fota_updates?token=3D9EABB5B1FE4030EC61523523F55153" HTTP/1.0 200 OK Access-Control-Allow-Origin: * Set-Cookie: token=3D9EABB5B1FE4030EC61523523F55153; Path=/; Secure Cache-Control: no-cache Content-type: application/json Content-Length: 739 Connection: close Date: Mon, 18 Jun 2018 15:13:32 GMT Server: rcell { "code" : 200, "result" : [ { "firmwareFile" : "30.00.002_30.00.002-B996_FOTA.bin", "ftpFirmwareDir" : "wireless/Telit_FOTA/ME910C1-NV", "ftpPassword" : "", "ftpServer" : "ftp.multitech.com", "ftpUsername" : "", "targetFirmwareBuild" : "5", "targetFirmwareVersion" : "30.00.002-B996_FOTA" }, { "firmwareFile" : "30.00.002_30.00.002-B996_FOTA.bin", "ftpFirmwareDir" : "wireless/Telit_FOTA/ME910C1-NV", "ftpPassword" : "", "ftpServer" : "ftp.multitech.com", "ftpUsername" : "", "targetFirmwareBuild" : "5", "targetFirmwareVersion" : "30.00.002-TEST" } ], "status" : "success" }
Start Telit radio firmware upgrade
Example:
Post request, use curl. json data is obtained from telit_check_fota_updates command request.
curl -i -k -b /tmp/headers --http1.0 --header "Content-Type: application/json" --request POST --data '{"firmwareFile":"30.00.002_30.00.002-B996_FOTA.bin","ftpFirmwareDir":"wireless/Telit_FOTA/ME910C1-NV","ftpPassword":"","ftpServer":"ftp.multitech.com","ftpUsername":"","targetFirmwareBuild":"5","targetFirmwareVersion":"30.00.002-TEST"}' "https://192.168.2.1/api/command/telit_fota_upgrade?token=3D9EABB5B1FE4030EC61523523F55153" HTTP/1.0 200 OK Access-Control-Allow-Origin: * Set-Cookie: token=3D9EABB5B1FE4030EC61523523F55153; Path=/; Secure Cache-Control: no-cache Content-type: application/json Content-Length: 89 Connection: close Date: Mon, 18 Jun 2018 15:46:44 GMT Server: rcell { "code" : 200, "result" : "Success: Init-fota started", "status" : "success" }