LTE stick CU8210-D004-0200 under Beckhoff RT Linux

This chapter describes the commissioning of the LTE stick CU8210-D004-0200 under Beckhoff RT Linux. The stick enables a mobile data connection via the mobile network.

Requirements

Insert the LTE stick with the SIM card inserted into a USB port on the IPC. After a short time, the device is recognized by the operating system and a serial interface is created.

Determine serial device interface

1. First determine the newly created device interface.
ls /dev
2. Search for an interface of type ttyACM* in the output. Example:ttyACM0
3. Make a note of the device name (e.g. /dev/ttyACM0), as this is required for further configuration.

Configuring access to the serial interface

A corresponding udev rule must be created so that users can access the serial interface.

4. Create a new rule file:
sudo nano /etc/udev/rules.d/99-usb-serial-acm.rules
5. Insert the following content:
SUBSYSTEM=="tty", KERNEL=="ttyACM0", MODE="0666"
6. Save the file and then reload the udev rules:
sudo udevadm control –reload
sudo udevadm trigger --attr-match=subsystem=tty
7. Alternatively, you can restart the device:
sudo reboot

Install serial terminal program

A serial terminal program is required for communication with the LTE stick.

8. First check whether the program cu is already installed:
which cu
cu –version
9. If the program is not available, install it:
sudo apt-get install cu

Establishing a connection to the LTE stick

10. Then use the cu program to connect to the previously determined serial interface.
sudo cu -l /dev/ttyACM0
11. If the connection is successful, appears in the terminal: Connected
12. Test the communication with the modem by entering the following command:
at
13. Confirm with Enter. If communication is successful, the modem responds with : OK

Configure modem (PIN and APN)

So-called AT commands can be sent to the modem via the serial connection. These are used, among other things, to:

An overview of the relevant AT commands can be found in chapter 5.4 of the device manual.

Terminate connection

Exit the cu program with the following shortcut:

~.

then Enter

~~.

then Enter

Check network connection

Once the PIN and APN have been configured correctly, the modem automatically connects to an available mobile network.

Check the network interfaces with :

ip address

An additional network interface should appear in the output (e.g. enx…). If the connection has been successfully established, this interface has an IP address.

Test the Internet connection with a ping, for example:

ping 8.8.8.8