The %fs parameter is used to check whether a newer firmware version is available for your device on the FOTA server.
A response of %fs=NO indicates one of the following:
There is no newer firmware version available on the FOTA server for your device.
The router does not have internet access and therefore cannot reach the FOTA server.
A response of %fs=YES indicates that:
The router has internet connectivity to the FOTA server.
A newer firmware version is available for the device.
Please note that the %fs command only checks for available updates. It does not initiate the firmware upgrade.
The fw_upgrade SMS command will fail if the response to %fs is NO, as this means either the device cannot reach the FOTA server or it is already running the latest available firmware.
At the moment, there is no built-in SMS command that performs a “check-and-upgrade-if-needed” only if one is available" operation. Achieving this behavior would require additional scripting.
By default, you can use the Send Status SMS rule to check whether a new firmware version is available. If the response indicates that an update is available, you can then send the Firmware upgrade from server SMS rule to initiate the firmware upgrade.
Additionally, could you please clarify your intended end goal? Are you looking to implement this functionality using the built-in SMS Utilities, or are you planning to use additional scripting to automate the process?
Thank you for your response and for clarifying how the %fs parameter works.
I would like to explain my use case in more detail.
I have more than 10 routers of the same model deployed in different locations. Once I know that a new firmware version has been released (for example, because one router reports %fs=YES or I see the new version published), I would like to send the same fw_upgrade SMS command to all of my routers.
However, this is currently not possible because the fw_upgrade command fails whenever %fs=NO.
Regarding the explanation that %fs=NO may indicate that the router cannot reach the FOTA server, I do not believe this is relevant in my case. My routers are permanently connected to the Internet. If a router had no Internet connectivity, I would first resolve the connectivity issue before attempting a firmware upgrade.
The issue is that fw_upgrade appears to rely only on the previously reported %fs status. Instead, I believe it should perform a fresh check against the FOTA server each time the command is executed.
My suggestion is that when the router receives the fw_upgrade SMS command, it should first contact the FOTA server and check whether a newer firmware version is available.
If a newer firmware version is available, it should immediately start the upgrade.
If the router is already running the latest firmware, it should simply return a message such as “No newer firmware available.”
If the router cannot reach the FOTA server, it should return an appropriate connectivity error.
This approach would make remote firmware management much more practical, especially for deployments with multiple routers, where I want to send the same SMS command to all devices without first checking the %fs status of every individual router.
I believe this would significantly improve the usability of the SMS firmware upgrade feature.