EasyInstaller hostname?

I ran # busybox hostname to get the EaasyInstallers hostname which seems to be apalis-tk1-mainline (content of /etc/hostname). Is that correct? Would it be possible to rename the hostname in future versions of the EasyInstaller to avoid naming conflicts with Toradex Linux BSPs (if I remember correctly they had hostnames apalis-tk1 or apalis-tk1-mainline dependent on the image type)?

I tried to ping the EasyInstaller via the hostname ( ping -c 1 apalis-tk1-mainline ) but it failed due to unknown host. Pinging the EasyInstaller via its ip address works (the one I got with ifconfig). Do I have to consider something special if I want to ping the EasyInstaller via hostname?

Yes, I believe currently it is the OpenEmbedded machine name and the Toradex Easy Installer uses the same OE machine as the mainline BSP.

Is there any chance that the future EasyInstaller versions can be pinged and identified by hostname (e.g. tk1-easyinstaller-v16 or something like this)?

There is no mDNS support and it seems that the BusyBox DHCP client (udhcpc) does not make use of the DHCP option 12 to communicate the hostname to the DHCP server. So no, by default there is no way to ping the Toradex Easy Installer by name.

I created a ticket with your request. How important is this feature for you?

Right now I cannot think of any other way to reliably detect and distinguish EasyInstaller and Linux BSP images flashed onto the SOM. As this detection capability is somehow critical for our production it is kind of important for us. If you can think of any workaround criticality would decrease.

If this is just about detecting if EasyInstaller or Linux is installed, you could ping the SSH Port from the module and check the answer. If the ping is successful, then Linux is flashed, if not then EasyInstaller is flashed.

Actually that’s a really good workaround. I’ll try that. Thx.

You are welcome.

@jaski.tx I just wondered how I can ping for the ssh port if I do not know the ip address of the SOM.

you could use arp to get he IP of the module or 'nmap` to scan all the ports of a given IP Range.

Your DHCP server is assigning them IP addresses isn’t it? Alternatively, you may do some Ethernet MAC based discovery or just use e.g. nmap, arp and friends.

Ok, getting all mac addresses and corresponding ip addresses in the network is no issue.

In the production context the serial number is THE identification for SOMs. The matrix codes sticking at the SOMs include the serial number. Getting the mac address from the serial number is possible with some script.

Perfect, thanks for letting us know.

HINT w.r.t. distinction of EasyInstaller and Linux BSP images:

It turned out that SOMs with Linux BSP pre-flashed are not detected via mac scan. Only EasyInstaller pre-flashed SOMs can be detected via mac scan. Means one can use mac scanning instead of ssh port checking to figure out which image type is pre-flashed on the SOM.

Are you sure about this. I ran nmap and i could detect the modules with linux installation too.