Getting Started ATDM

The following sections will provide a starting point to explore ATDM’s features.

Unboxing and Bring-up

Your ATDM will have a Toradex iMX8QM 4GB system-on-module (SOM) installed with our Yocto 5.7.0 Linux image pre-loaded, including the display graphics and touch drivers. This system requires 12V power to be provided to the red (positive) and black (negative) wires from the provided harness to power ON the display and the ATDM. When 12V is applied, the ATDM automatically boots into the pre-loaded Torizon image.

At this time with our sample A boards, the first “cold boot” (where 12V is applied for the first time) will not properly initialize the touch module. This is fixed with a simple “reboot” command via console or pressing the reset switch next to the two female Micro-USB ports.

Reset Switch

The display will show the following screen after boot if everything works correctly.

Desktop

You should be able to touch the top left console icon, which will open a console window you can drag around to test touch capability.

If you cannot get the console window to open or touch to respond, try hitting the reset switch or issuing the reboot command via the console without disconnecting 12V power and trying again.

We recommend attaching a USB hub to utilize a mouse and keyboard to interface with ATDM for development. The USB host is exposed at the top of ATDM’s enclosure.

Debug Terminal and Basic Usage

The ATDM includes a built-in USB serial adapter, which can be accessed via the “J5” micro-USB port, as shown below.

This chip is based on Silicon Labs CP210x and requires drivers from this link. It is powered via the 12V wiring harness, not the USB host (computer it’s plugged into). This means that your ATDM will already have to be powered on to be recognized by the host computer.

In Windows, the serial adapter will be assigned a COM# that will be used to identify which serial adapter we want to communicate with. Other operating systems can be used; however, they handle USB serial adapters differently.

This bench computer registers the connected ATDM as COM9. Any terminal/console application that supports the serial COM ports in Windows and allows baud-rate specification will work. This example uses Putty.

Putty Console

In Putty, we select serial under “Connection type:” Then we use the COM device we found from Device Manager and enter it under the “Serial line” entry. Next, we enter the Toradex module baud rate (115200) and open it. If a black console window with no error messages opens, everything should be set up correctly. Typing in root should log you into the ATDM's root user; from here, you can issue any Yocto Linux commands you wish.

Basic Ethernet Accessibility

The ATDM behaves as a standard Yocto Linux machine would, meaning it’ll communicate with your router's DHCP server to get a valid local IP address that can be used to access your machine over the same network. You can plug an Ethernet cable from the ATDM straight into your Windows computer, and it will assign IP addresses for each device automatically.

To obtain the IP address of your ATDM after it’s been connected via Ethernet is quickly done in one of two ways:

First Method (router or computer) - For this method, you’ll need to have your ATDM powered on, connected to Ethernet (either via another Computer or a router), and an active console window on your computer. Issue the ifconfig command via the console and look for the eth0 interface output (at the top); here, we're looking for our ipv4 (inet) ip address.

Second Method (router only) - This method will require you to have Administrator access to your local network, we will need to see the list of devices connected to our router, which on home router solutions, is usually located on our router's default gateway webpage. Ours shows up as “Apalis-imx8-06875096”.

 

Access the console over the network via SSH

Now that we have obtained our ATDM's IP address, we can use that IP to access its console via the SSH protocol, which is enabled on port 22 by default.

In Putty, we enter our IP address, port 22, and SSH connection type. If everything is good, you will get prompted to accept a security certificate issued by the device.

Basic Cellular Connection Verification

Connect the modem to the ATDM that will be used to bolster the SIM.

Insert SIM into the slot located at the bottom of your ADTM.

 

Through the active console on your ATDM, insert the command mmcli -L to list the ATDM's modem connection”.

Basic GPS Connection Verification

Connect to the active console on the ATDM with a cellular connection.

Insert the command mmcli—m 0 --location-status to list the data the GPS is collecting through a cellular connection.

If you want to test what location is present for the ATDM, insert the command mmcli -m 0 --location-get.

Basic SocketCAN Interface

ATDM utilizes the following CAN interface from SocketCAN:

Native interfaces. These are CAN interfaces associated with real hardware (such as a USB-to-CAN adapter). They are named canX , e.g. can0, can1, …

You can print all the available IP interfaces. This uses the iproute2 suite of tools.

The last interface listed is can0.

~$ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10 link/can

An alternative way to investigate CAN interfaces is to use ifconfig <canx>:

~$ ifconfig can0 can0: flags=128<NOARP> mtu 16 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Before enabling the SocketCAN interface, you can configure it:

~$ ip link set can0 type can bitrate 500000

To enable the CAN interface:

To display a list of received messages on the bus in realtime, use the candump utility: