Where do mender clients encode their device_type?

I did ask this question in a chat on the main Mender site but it was suggested that I try here. The question:

In an initial test I set up my embedded client with its device_type set in /data/mender/device_type
(just something I copied from beaglebone). Yet the Mender server does not see this. But the rest of the inventory show up fine. How to set the device_type in the client so that the Mender server sees this?

A response from Ralph from the chat on the mender home site:
“Mender does not look in /data directly, though there is a symlink from /var/lib/mender somewhere. This is automatically set up with meta-mender but if you have a custom integration you have to do this step manually.”

He suggested I try here for the details of this “manual process”. Does anyone know how this can be done?

Hi Dan,

Ralph is correct, device_type file is expected to be located in /var/lib/mender, and the default Mender configuration is to have /var/lib/mender as a symbolic link to /data/mender.

So first you can verify if such symbolic link is present in your system with:
ls -l /var/lib/mender

Regardless of where it is pointing, you should be able to create the device_type file with something like:
echo "device_type=mydevicetype" > /var/lib/mender/device_type

Obs! replace mydevicetype according to your setup.

Then just restart your Mender client and it should read correctly its type.

Best regards,

1 Like

Okay- thanks! It’s working now. -Dan

Please use the General discussions category for questions. This Board integrations category is only for sharing complete board integrations with Mender.

Moved this to https://hub.mender.io/c/general-discussions section