Device type compatibility

Board description

imx6ull board

Mender version 2.6.0 and higher

I have been trying to connect my device to mender server. I have uploaded the artifact in the server. But during deployment, it shows pending.
The device type is empty in the device inventory.
How do I set the device type?

Hi @Jesmitha,

the device type is basically a string that is used for compatibility matching of devices to artifacts. You say you connected the device to the server. How did you do that? How did you build the software currently running on the device? Generally speaking, if you

  • built the image using Yocto, then the MACHINE name is the default device type string.
  • connected manually through the mender cli tool, then, you are prompted to enter a device type.

For the artifact that you want to deploy, how did you create it? Again the device type needs to passed as an argument, usually to mender-artifact. If you can elaborate about your process a bit we can sure get you set up correctly.

Greetz,
Josef

Hi ,
Thank you for the quick response.
I am building image using Yocto.
below is my source local .conf file snippet
MACHINEOVERRIDES =. “mx6:mx6ul:mx6ull:”

include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa7.inc

MACHINE_FIRMWARE_append = " firmware-imx-epdc"

PREFERRED_PROVIDER_virtual/kernel_mx6 = “linux-iwg18m”
PREFERRED_PROVIDER_u-boot_mx6 = “u-boot-iwg18m”
PREFERRED_VERSION_mender-client = “3.2.1”
#*********************
IMAGE_INSTALL_append = " systemd "
MENDER_ARTIFACT_NAME = “release-1.0”
DEVICE_TYPE = “imx6ull-iwg18m-sm”
INHERIT += “mender-full”

the local.conf from build directory snippet is as beow:
MACHINE ??= ‘imx6ull-iwg18m-sm’
DISTRO ?= ‘fsl-imx-x11’
PACKAGE_CLASSES ?= ‘package_rpm’
EXTRA_IMAGE_FEATURES ?= “debug-tweaks”
USER_CLASSES ?= “buildstats image-mklibs image-prelink”
PATCHRESOLVE = “noop”

Hi,
The artifact has the device type “imx6ull-iwg18m-sm” but the device that has been accepted in the server has device type as blank.

Hi ,
I was able to add the device_type. But the deployment is still in pending state for the device even after device_type is being compatible.
What could be missing?

Hi @Jesmitha,

thanks for the snippet. This looks a bit strange. So you are adding all of that into local.conf, but no MACHINE file? Because this variable actually fills in the MENDER_MACHINE, and that one ends up in the device type. Without seeing the actual build, my advice would be:

  • put the relevant things into a real MACHINE configuration file on its own. You can find examples that are relatively similar in the mender-multiplatform repository.
  • inspect bitbake -e on the image build, specifically the evaluation history of MACHINE and MENDER_MACHINE. You can also dump all of it into a pastebin and share the link, if you want me to have a look too.

Hope this helps!

Josef

Hi,
Thank your for the advice. I am running into another issue.
Below logs shows failed to start Mender-configure device configuration.

      Starting Login Service...
[  OK  ] Started Packet Filtering Framework.
[  OK  ] Started Mender persistent data dir.
[FAILED] Failed to start Mender-configure device configuration.
See 'systemctl status mender-configure-…ply-device-config.service' for details.
[  OK  ] Reached target Network (Pre).
         Starting Network Service...
[  OK  ] Started Login Service.
[  OK  ] Started Network Service.
         Starting Wait for Network to be Configured...
         Starting Network Name Resolution...

The Mender-client logs are as below:

-- Logs begin at Thu 2022-04-28 15:08:12 UTC, end at Thu 2022-04-28 15:45:41 UTC. --
Apr 28 15:08:39 imx6ull-iwg18m-sm systemd[1]: Started Mender OTA update service.
Apr 28 15:08:40 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:40Z" level=info msg="Loaded configuration file: /etc/mender/mender.conf"
Apr 28 15:08:40 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:40Z" level=info msg="No dual rootfs configuration present"
Apr 28 15:08:40 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:40Z" level=info msg="State transition: init [none] -> init [none]"
Apr 28 15:08:40 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:40Z" level=info msg="State transition: init [none] -> idle [Idle]"
Apr 28 15:08:40 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:40Z" level=info msg="State transition: idle [Idle] -> check-wait [Idle]"
Apr 28 15:08:40 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:40Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
Apr 28 15:08:41 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:41Z" level=info msg="Output (stderr) from command \"/usr/share/mender/inventory/mender-inventory-geo\": wget: note: TLS certificate va
lidation not implemented"
Apr 28 15:08:42 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:42Z" level=info msg="Device unauthorized; attempting reauthorization"
Apr 28 15:08:42 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:42Z" level=info msg="Output (stderr) from command \"/usr/share/mender/identity/mender-device-identity\": using interface /sys/class/ne
t/eth0"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=error msg="Failed to authorize with \"https://docker.mender.io\": (request_id: ): authentication request rejected server er
ror message: dev auth: unauthorized"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=warning msg="Reauthorization failed with error: transient error: authorization request failed"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=error msg="Failed to submit inventory data: transient error: authorization request failed"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=error msg="inventory submit failed: transient error: authorization request failed"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=warning msg="Failed to refresh inventory: failed to submit inventory data: inventory submit failed: transient error: author
ization request failed"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="Device unauthorized; attempting reauthorization"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="Output (stderr) from command \"/usr/share/mender/identity/mender-device-identity\": using interface /sys/class/ne
t/eth0"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=error msg="Failed to authorize with \"https://docker.mender.io\": (request_id: ): authentication request rejected server er
ror message: dev auth: unauthorized"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=warning msg="Reauthorization failed with error: transient error: authorization request failed"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=error msg="Error receiving scheduled update data: update check request failed: transient error: authorization request faile
d"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=error msg="Update check failed: transient error: update check request failed: transient error: authorization request failed
"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="State transition: update-check [Sync] -> error [Error]"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="Handling error state, current error: transient error: update check request failed: transient error: authorization
 request failed"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="State transition: error [Error] -> idle [Idle]"
Apr 28 15:08:44 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:44Z" level=info msg="State transition: idle [Idle] -> check-wait [Idle]"
Apr 28 15:08:45 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:45Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=info msg="Device unauthorized; attempting reauthorization"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=info msg="Output (stderr) from command \"/usr/share/mender/identity/mender-device-identity\": using interface /sys/class/ne
t/eth0"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=error msg="Failed to authorize with \"https://docker.mender.io\": (request_id: ): authentication request rejected server er
ror message: dev auth: unauthorized"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=warning msg="Reauthorization failed with error: transient error: authorization request failed"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=error msg="Failed to submit inventory data: transient error: authorization request failed"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=error msg="inventory submit failed: transient error: authorization request failed"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=warning msg="Failed to refresh inventory: failed to submit inventory data: inventory submit failed: transient error: author
ization request failed"
Apr 28 15:08:46 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:46Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
Apr 28 15:08:49 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:49Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
Apr 28 15:08:49 imx6ull-iwg18m-sm mender[233]: time="2022-04-28T15:08:49Z" level=info msg="Device unauthorized; attempting reauthorization"
root@imx6ull-iwg18m-sm:~#

I am trying to deploy an artifact from the server. But it is still in pending state.
Could you please tell me what could be the issue?

EDIT by @TheYoctoJester : added formatting.