Using Device API for checking new update

Hi there,

I worked on the Check for update API for devices. It gives amazon AWS link for the latest pending update. How can the device explicitly download and install the update? I am guessing that the link should facilitate to accomplish it.

And, what is the difference between ‘Check Update API’ and ‘Check Update depends API’ ?

Thanks in advance.


Once you have the URL you can use standalone mode to install it.

As for the differences between the APIs, the “Check update depends” will provide an update match a specific set of ArtifactProvides. See this link for full details on the versioning that is part of Mender.


Can the standalone method be implemented for Application update?

I get the following error…

pi@projectzero:/etc/mender $ sudo mender -install

    **[1] 17499**
    **[2] 17500**
    **[3] 17501**
    **-bash: X-Amz-Credential=AKIAQWI25QR6MOCESDWO%2F20210215%2Fus-east-1%2Fs3%2Faws4_request: command not found**
    **[4] 17502**
    **[5] 17503**
    **[6] 17504**
    **-bash: X-Amz-Expires=86400: command not found**
    **-bash: response-content-type=application%2Fvnd.mender-artifact: command not found**
    **-bash: X-Amz-SignedHeaders=host: command not found**
    **-bash: X-Amz-Signature=52f0c78f071a5742b6b9963ec2f242adb5d6f1f02a9c11830589df9299539626: command not found**
    **[2]   Exit 127                X-Amz-Credential=AKIAQWI25QR6MOCESDWO%2F20210215%2Fus-east-1%2Fs3%2Faws4_request**
    **[4]   Exit 127                X-Amz-Expires=86400**
    **[6]+  Exit 127                response-content-type=application%2Fvnd.mender-artifact**
    **[5]+  Exit 127                X-Amz-SignedHeaders=host**
    **pi@projectzero:/etc/mender $ -bash: X-Amz-Date=20210215T073042Z: command not found**
    **INFO[0000] Loaded configuration file: /etc/mender/mender.conf**
    **INFO[0000] No dual rootfs configuration present**
    **ERRO[0000] Failed to Load the Server certificate. Err SSL errors:**
    **WARN[0000] Failed to load the server TLS certificate settings: SSL errors:**
    **INFO[0000] Performing remote update from: [].**
    **ERRO[0002] Error fetching scheduled update info: code (400)**
    **ERRO[0002] Error while installing Artifact from command line: (request_id: ): error receiving scheduled update information server error message: failed to parse server response: invalid character '<' looking for beginning of value**


Command line interpreter issue maybe, have you tried wrapping the URL in single quotes?

Yes, I have. It’s not helping sadly :frowning:

Could there be some kind of SSL certificate error. I am using hosted mender server as of now with the following hardware configuration:

Raspberry pi 4
Raspberry pi Lite OS, Raspbian GNU/Linux 10 (buster), Kernel version 5.10.11-v7l+ #1399
Mender client version 2.5.0
openssl version 1.1.1d

  • Saman

It’s definitely an issue with the quoting. I can see that your shell is trying to run things in the background since using the ‘&’ string will do that. It’s definitely splitting your command on the ‘&’ characters.

Try running the following:

pi@projectzero:/etc/mender $ sudo mender -install ‘

It should be all a single line in your shell prompt.