Lenovo ThinkPad X1 Carbon: LTE modem EM7544 commissioning

July 1, 2020

Lang: cs en de es

The Lenovo ThinkPad X1 Carbon generation 6 notebook has a built-in LTE modem EM7544. The modem manufacturer supports Linux. But how to use this and other modern modems under Linux? You can find instructions on how to get the EM7544 working under Linux in this article.

I got my hands on a Lenovo ThinkPad X1 Carbon. It works well without having to troubleshoot anything, plus as a laptop it has a relatively large screen resolution.

The laptop has a dual core processor with hyperthreading, so then they are seen as 4 CPUs in the system. The operating memory is of the DDR3L type, with a total of 16GB in my model. The LCD screen resolution is 2560x1440px.

The laptop has an integrated WiFi card as standard. And it doesn't have a DVD drive, which is unnecessary nowadays. This also makes the laptop light and thin.
It also has: USB3, HDMI output, jack for a common microphone with headphones (of course also integrated microphone and speakers), Touchpad and trackpoint. A specific connector for Ethernet input, but I use USB Ethernet when I need it, which is fast over USB3. The laptop also has an integrated medium quality camera.

It also has a micro SD card reader. So you can't read standard size and mini without an external reader. As is usual with Thinkpads it has a backlight. Specifically, a switchable keyboard backlight. The CapsLock key and function keys: mute, microphone mute and FnLock have a small LED in them to indicate status.

Once the Linux operating system is installed, the computer can be used straight away.

My model also has an LTE modem, which will be the subject of this article. The modem also contains a GPS module.

For the full HW listing, see lshw Lenovo ThinkPad X1 Carbon. In addition to the expected components, the laptop also includes an LTE modem from the factory. However, different generations of the ThinkPad X1 Carbon have a different type of modem installed.
According to information on the Internet, the ThinkPad X1 Carbon comes with the following modems:

  • Fibocom L850-GL / Intel XMM7360 LTE modem
  • Sierra Wireless, Inc. Sierra Wireless EM7455

LTE modem EM7455

Interestingly, the modem allows you to change its USB ID, so it can then report itself as a different device in the system. According to the Internet, the modem identification is different depending on the brand of notebook (probably preset by the manufacturer), but it's always the same piece of electronics. For example, it is also installed in a Dell laptop. The modem can be identified as one of these three devices:

  • Generic-Laptop
  • Dell: Dell Wireless 5811e Gobi(TM)4G LTE Mobile Broadband Card
  • Lenovo ThinkPad: Sierra Wireless, Inc. Sierra Wireless EM7455

The modem is internally connected via USB. On the ThinkPad X1 Carbon the lsusb output reports:

Bus 001 Device 009: ID 1199:9079 Sierra Wireless, Inc. Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-A
According to the documentation, this modem should have speeds up to 480Mbit/s, but this also depends on the parameters of the cellular network.

Dumping information at boot or device connection (dmesg):

[ 1216.502735] usb 1-2: USB disconnect, device number 2
[ 1216.502950] qcserial ttyUSB0: Qualcomm USB modem converter now disconnected from ttyUSB0
[ 1216.502981] qcserial 1-2:1.0: device disconnected
[ 1216.503078] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[ 1216.503091] qcserial 1-2:1.2: device disconnected
[ 1216.503582] qcserial ttyUSB2: Qualcomm USB modem converter now disconnected from ttyUSB2
[ 1216.503592] qcserial 1-2:1.3: device disconnected
[ 1216.503675] cdc_mbim 1-2:1.12 wwp0s20f0u2i12: unregister 'cdc_mbim' usb-0000:00:14.0-2, CDC MBIM
[ 1224.113147] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[ 1224.240134] usb 1-2: config 1 has an invalid interface number: 12 but max is 4
[ 1224.240148] usb 1-2: config 1 has an invalid interface number: 13 but max is 4
[ 1224.240152] usb 1-2: config 1 has an invalid interface number: 13 but max is 4
[ 1224.240156] usb 1-2: config 1 has no interface number 1
[ 1224.240158] usb 1-2: config 1 has no interface number 4
[ 1224.240739] usb 1-2: New USB device found, idVendor=1199, idProduct=9079, bcdDevice= 0.06
[ 1224.240745] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1224.240750] usb 1-2: Product: Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-A
[ 1224.240753] usb 1-2: Manufacturer: Sierra Wireless, Incorporated
[ 1224.240757] usb 1-2: SerialNumber: LF62957506021014
[ 1224.247935] qcserial 1-2:1.0: Qualcomm USB modem converter detected
[ 1224.248032] usb 1-2: Qualcomm USB modem converter now attached to ttyUSB0
[ 1224.248496] qcserial 1-2:1.2: Qualcomm USB modem converter detected
[ 1224.248597] usb 1-2: Qualcomm USB modem converter now attached to ttyUSB1
[ 1224.249076] qcserial 1-2:1.3: Qualcomm USB modem converter detected
[ 1224.249180] usb 1-2: Qualcomm USB modem converter now attached to ttyUSB2
[ 1224.271148] cdc_mbim 1-2:1.12: cdc-wdm0: USB WDM device
[ 1224.271366] cdc_mbim 1-2:1.12 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-2, CDC MBIM, 6a:7d:82:89:28:28
[ 1224.332605] cdc_mbim 1-2:1.12 wwp0s20f0u2i12: renamed from wwan0

In addition, the modem includes GPS, which I have not yet operated.

LTE modems

Today's modems are modern advanced devices that can do much more and better than the old pieces. But it is still possible to communicate with them using so-called AT commands. AT commands are a way to control and configure modems or other devices that communicate over a serial link.

Even the EM7455 modem allows configuration using AT commands, so it is possible to read and modify its configuration. However, as a modern device, it also allows other methods and one needs to be familiar with it to know what one is doing. And that's one of the reasons why this article was written with a tutorial on how to use a modern LTE modem.

Modern modems, including the EM7455 modem, allow communication using the QMI protocol or MBIM The mbimcli qmicli utilities, which need to be installed, are used for this communication in Linux. In the Mageia distribution, the urpmi libqmi-utils package.

Slides from the lecture QMI, MBIM modern modems in Linux - I recommend to read! There are visual representations of the different technologies and the layers and how they communicate with each other.

First Communications with Modems

To find out what state the modem is in, use the command:

qmicli -d /dev/cdc-wdm0 --dms-swi-get-usb-composition
[/dev/cdc-wdm0] Successfully retrieved USB compositions:
            USB composition 6: DM, NMEA, AT, QMI
        [*] USB composition 8: DM, NMEA, AT, MBIM
            USB composition 9: MBIM
As you can see, the modem can also be in a state where it will communicate only in MBIM mode.

The options that include "DM, NMEA, AT," mean that the modem will simultaneously create three virtual USB serial lines for communication: Diagnostics, GPS, and AT commands.

/dev/ttyUSB0 - Diagnostics Monitoring (DM) port
/dev/ttyUSB1 = GPS NMEA port
/dev/ttyUSB2 - AT commands

The modem device in the system is represented by the following file: /dev/cdc-wdm0

I have not been able to get communication using QMI to work, so for future use I am using MBIM. I use the status including serial lines for GPS and AT commands.
Switching between these states is done by command:

qmicli -d /dev/cdc-wdm0 --dms-swi-set-usb-composition=6
qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=reset
And after rebooting the modem, it is already communicating in a different way and the above mentioned serial ports are (not) visible in the system.

For detailed information about the modem, use the command:

mbimcli -d /dev/cdc-wdm0 --query-device-caps --verbose

Before the firmware upgrade, the information listing looked like this:

[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 48
<<<<<< type = command (0x00000003)
<<<<<< transaction = 2
<<<<<< Fragment header:
<<<<<< total = 1
<<<<<< current = 0
<<<<<< Contents:
<<<<<< service = 'basic-connect' (a289cc33-bcb-8b4f-b6b0-133ec2aae6df)
<<<<<< cid = 'device-caps' (0x00000001)
<<<<<< type = 'query' (0x00000000)

[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>> length = 196
>>>>>> data = 03:00:00:80:C4:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:01:00:00:00:00:00:00:00:94:00:00:00:03:00:00:00:01:00:00:00:01:00:00:00:02:00:00:00:3C:00:00:00:03:00:00:00:01:00:00:00:08:00:00:00:00:00:00:00:00:00:00:00:40:00:00:00:1E:00:00:00:60:00:00:00:28:00:00:00:88:00:00:00:0C:00:00:00:30:00:31:00:34:00:35:00:38:00:32:00:30:00:30:00:31:00:38:00:33:00:39:00:39:00:31:00:30:00:00:00:53:00:57:00:49:00:39:00:58:00:33:00:30:00:43:00:5F:00:30:00:32:00:2E:00:32:00:34:00:2E:00:30:00:35:00:2E:00:30:00:36:00:45:00:4D:00:37:00:34:00:35:00:35:00

[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] Received message (translated)...
>>>>>> Header:
>>>>>> length = 196
>>>>>> type = command-done (0x80000003)
>>>>>> transaction = 2
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> status error = 'None' (0x00000000)
>>>>>> service = 'basic-connect' (a289cc33-bcb-8b4f-b6b0-133ec2aae6df)
>>>>>> cid = 'device-caps' (0x00000001)
>>>>>> Fields:
>>>>>> DeviceType = 'remote'
>>>>>> CellularClass = 'gsm'
>>>>>> VoiceClass = 'no-voice'
>>>>>> SimClass = 'removable'
>>>>>> DataClass = 'umts, hsdpa, hsupa, lte'
>>>>>> SmsCaps = 'pdu-receive, pdu-send'
>>>>>> ControlCaps = 'reg-manual'
>>>>>> MaxSessions = '8'
>>>>>> CustomDataClass = '(null)'
>>>>>> DeviceId = '014582001839910'
>>>>>> FirmwareInfo = 'SWI9X30C_02.24.05.06'
>>>>>> HardwareInfo = 'EM7455'

[/dev/cdc-wdm0] Device capabilities retrieved:
Device type: 'remote'
Cellular class: 'gsm'
Voice class: 'no-voice'
SIM class: 'removable'
Data class: 'umts, hsdpa, hsupa, lte'
SMS caps: 'pdu-receive, pdu-send'
Ctrl caps: 'reg-manual'
Max sessions: '8'
Custom data class: 'unknown'
Device ID: '014582001839910'
Firmware info: 'SWI9X30C_02.24.05.06'
Hardware info: 'EM7455'
[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<< length=12
<<<<<< data = 02:00:00:0C:00:00:00:00:03:00:00:00

[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 12
<<<<<< type = close (0x00000002)
<<<<<< transaction = 3

[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>> length = 16
>>>>>> data = 02:00:00:80:10:00:00:00:03:00:00:00:00:00:00:00

[24 May 2020, 16:58:42] [Debug] [/dev/cdc-wdm0] channel destroyed
[24 May 2020, 16:58:42] [Debug] Device closed

Upgade firmware

According to the Internet, in the beginning there were modems with old firmware, which was problematic, so an upgrade was necessary firmware upgrade. I update the firmware on all devices straight away, so I did a firmware update here as well.
I based it on here: ThinkPad EM7455 flash firmware guide.

Several firmware versions can be loaded in the modem. Listing the information what firmware is loaded in the modem and what firmware is used can be done with the commands:

    qmicli -p -d /dev/cdc-wdm0 --dms-get-firmware-preference
    qmicli -p -d /dev/cdc-wdm0 --dms-list-stored-images

Firmware Flash

Address where you can download firmware for LTE modem EM7455

Move to the firmware data directory and flash the firmware with the following command:

qmi-firmware-update -d 1199 -u *.cwe *.nvu

Listing the progress of the forgery:

[root@FreeTux SWI9X30C_02.33.03.00_Sierra_001.023_000]# qmi-firmware-update -d 1199 -u *.cwe *.nvu
loading device information before the update...
setting firmware preference:
firmware version: '02.33.03.00'
config version: '001.023_000'
carrier: 'SIERRA'
rebooting in download mode...
download mode detected
downloading cwe image: SWI9X30C_02.33.03.00.cwe (64,4 MB)...
finalizing download... (may take more than one minute, be patient)
successfully downloaded in 73,60s (875,4 kB/s)
downloading cwe image: SWI9X30C_02.33.03.00_SIERRA_001.023_000.nvu (3.4 kB)...
finalizing download... (may take more than one minute, be patient)
successfully downloaded in 0,05s (63,4 kB/s)
rebooting in normal mode...
normal mode detected

------------------------------------------------------------------------
NOTE: in order to validate which is the firmware running in the
module, the program will wait for a complete boot; this process
may take some time and several retries.
------------------------------------------------------------------------

waiting some time for the device to boot...
loading device information after the update (1/12)...

------------------------------------------------------------------------

original firmware revision was:
SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 06:23:09
original running firmware details:
Model: EM7455
Boot version: SWI9X30C_02.24.05.06
AMSS version: SWI9X30C_02.24.05.06
SKU ID: 1102782
Carrier ID: 1
Config version: 002.026_000
original firmware preference details:
image 'modem': unique id '002.026_000', build id '02.24.05.06_GENERIC'
image 'pri': unique id '002.026_000', build id '02.24.05.06_GENERIC'

new firmware revision is:
SWI9X30C_02.33.03.00 r8209 CARMD-EV-FRMWR2 2019/08/28 20:59:30
new running firmware details:
Model: EM7455
Boot version: SWI9X30C_02.33.03.00
AMSS version: SWI9X30C_02.33.03.00
SKU ID: 1102782
Carrier ID: 182
Config version: 001.023_000
new firmware preference details:
image 'modem': unique id '001.023_000', build id '02.33.03.00_SIERRA'
image 'pri': unique id '001.023_000', build id '02.33.03.00_SIERRA'

NOTE: this device supports stored image management
with qmicli operations:
--dms-list-stored-images
--dms-select-stored-image
--dms-delete-stored-image

NOTE: this device supports firmware preference management
with qmicli operations:
--dms-get-firmware-preference
--dms-set-firmware-preference

------------------------------------------------------------------------

firmware update operation finished successfully
==========================

Listing of irmware information after upgrade:

[13 Jun 2020, 10:19:29] [Debug] opening device...
[13 Jun 2020, 10:19:29] [Debug] [/dev/cdc-wdm0] Queried max control message size: 4096
[13 Jun 2020, 10:19:29] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<< length = 16
<<<<<< data = 01:00:00:00:10:00:00:00:01:00:00:00:10:00:00:00

[13 Jun 2020, 10:19:29] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 16
<<<<<< type = open (0x00000001)
<<<<<< transaction = 1
<<<<<< Contents:
<<<<<< max control transfer = 4096

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>> length = 16
>>>>>> data = 01:00:00:80:10:00:00:00:01:00:00:00:00:00:00:00

[13 Jun 2020, 10:19:32] [Debug] MBIM Device at '/dev/cdc-wdm0' ready
[13 Jun 2020, 10:19:32] [Debug] Asynchronously querying device capabilities...
[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<< length = 48
<<<<<< data = 03:00:00:00:30:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:01:00:00:00:00:00:00:00:00:00:00:00

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 48
<<<<<< type = command (0x00000003)
<<<<<< transaction = 2
<<<<<< Fragment header:
<<<<<< total = 1
<<<<<< current = 0
<<<<<< Contents:
<<<<<< service = 'basic-connect' (a289cc33-bcb-8b4f-b6b0-133ec2aae6df)
<<<<<< cid = 'device-caps' (0x00000001)
<<<<<< type = 'query' (0x00000000)

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>> length = 196
>>>>>> data = 03:00:00:80:C4:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:01:00:00:00:00:00:00:00:94:00:00:00:03:00:00:00:01:00:00:00:01:00:00:00:02:00:00:00:3C:00:00:00:03:00:00:00:01:00:00:00:08:00:00:00:00:00:00:00:00:00:00:00:40:00:00:00:1E:00:00:00:60:00:00:00:28:00:00:00:88:00:00:00:0C:00:00:00:30:00:31:00:34:00:35:00:38:00:32:00:30:00:30:00:31:00:38:00:33:00:39:00:39:00:31:00:30:00:00:00:53:00:57:00:49:00:39:00:58:00:33:00:30:00:43:00:5F:00:30:00:32:00:2E:00:33:00:33:00:2E:00:30:00:33:00:2E:00:30:00:30:00:45:00:4D:00:37:00:34:00:35:00:35:00

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Received message (translated)...
>>>>>> Header:
>>>>>> length = 196
>>>>>> type = command-done (0x80000003)
>>>>>> transaction = 2
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> status error = 'None' (0x00000000)
>>>>>> service = 'basic-connect' (a289cc33-bcb-8b4f-b6b0-133ec2aae6df)
>>>>>> cid = 'device-caps' (0x00000001)
>>>>>> Fields:
>>>>>> DeviceType = 'remote'
>>>>>> CellularClass = 'gsm'
>>>>>> VoiceClass = 'no-voice'
>>>>>> SimClass = 'removable'
>>>>>> DataClass = 'umts, hsdpa, hsupa, lte'
>>>>>> SmsCaps = 'pdu-receive, pdu-send'
>>>>>> ControlCaps = 'reg-manual'
>>>>>> MaxSessions = '8'
>>>>>> CustomDataClass = '(null)'
>>>>>> DeviceId = '014582001839910'
>>>>>> FirmwareInfo = 'SWI9X30C_02.33.03.00'
>>>>>> HardwareInfo = 'EM7455'

[/dev/cdc-wdm0] Device capabilities retrieved:
              Device type: 'remote'
           Cellular class: 'gsm'
              Voice class: 'no-voice'
                SIM class: 'removable'
               Data class: 'umts, hsdpa, hsupa, lte'
                 SMS caps: 'pdu-receive, pdu-send'
                Ctrl caps: 'reg-manual'
             Max sessions: '8'
        Custom data class: 'unknown'
                Device ID: '014582001839910'
            Firmware info: 'SWI9X30C_02.33.03.00'
            Hardware info: 'EM7455'
[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<< length=12
<<<<<< data = 02:00:00:0C:00:00:00:00:03:00:00:00

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 12
<<<<<< type = close (0x00000002)
<<<<<< transaction = 3

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>> length = 16
>>>>>> data = 02:00:00:80:10:00:00:00:03:00:00:00:00:00:00:00

[13 Jun 2020, 10:19:32] [Debug] [/dev/cdc-wdm0] channel destroyed
[13 Jun 2020, 10:19:32] [Debug] Device closed

Firmware selection

The selection of the firmware to be used can be done with the command e.g:

qmicli -d /dev/cdc-wdm0 --dms-select-stored-image=modem3,pri1
It depends on which number the firmware is stored in the modem. Firmware can also be deleted from the modem, see the documentation in the links.

PIN

From the console it is also possible to enter and set the SIM card PIN etc. However, I have not personally tried it. The command to retrieve the PIN status:

qmicli -d /dev/cdc-wdm0 --dms-uim-get-pin-status

System setup for a working EM7544 modem

That the device can be in several modes and you can communicate with it with different utilities and it has different communication peripherals ( serial line and AT commands vs device) and different communication protocols, I was very confused. Now you have an overview of what the modem allows.
You don't need to use AT commands to get it to work at all. You only need to have the device in MBIM mode and the given utility.
Another problem was that although Mageia used the network applet running in the background network manager was running, which the modem was using and so the modem was blocking or communicating with me with a very slow response. So I deactivated network manager and suddenly the attempts to get it working had a fast response.

Since I don't use proxy to communicate with the modem, I need to call utilities without this parameter -p!

EM7544 online

This manual describes the settings when the modem communicates using the MBIM protocol. Therefore, I have set the modem to this mode (in this case mode #8). And this setting will remain after the modem or laptop is rebooted.

To find out whether the modem is ON or OFF, use the command:

qmicli -p -d /dev/cdc-wdm0 --dms-get-operating-mode
After changing most of the settings, you need to restart the modem(reset running). Commands to change the modem state and reset:
qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=offline
qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=online
qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=reset

The modem needs to be switched to online mode - which is done automatically by the configuration/connection script. But there is a problem that after rebooting the modem/laptop when trying to change to the online state, the modem prints an error message:

couldn't set operating mode: QMI protocol error (60):

EM7455 needs to send a special command FCC_AUTH
To enter the command:
qmicli -d /dev/cdc-wdm0 --dms-set-fcc-authentication
This needs to be done after each laptop reboot to restart the modem before connecting to the mobile network!

Connection Settings

I have Vodafone mobile internet, so I'm setting up my login details see below. I created a configuration file /etc/qmi-network.conf and wrote in it:

APN=internet
Of course, it is possible to write other configuration options in there, for example the user and his password.

There are many options on how to start the connection to the LTE network and how to configure the device and the network, and it can be done manually. However, I have anchored an existing script after many attempts, that calls existing tools and sets up the IP network configuration from the received data from the carrier, including the DNS setup. I use a modified fork of the script that connects the EM7455 modem to the LTE and configures the network.

The script actually calls

mbim-network /dev/cdc-wdm0 start
You can check the connection status with the command:
mbim-network /dev/cdc-wdm0 status
The script will then get information about the connection and how to set up the network, including the IP. The modem will get this information from the operator after the connection is established. You can manually read this information with a command and the same command calls the prepared script:
mbimcli -d /dev/cdc-wdm0 --query-ip-configuration --no-open=11 --no-close
The script parses this network configuration data and sets the network interface IP addresses and DNS servers. And mobile Internet suddenly starts working. The user can now run everything just using the command:
lte_start
To shut down mobile internet, the command is:
lte_stop
These scripts are in the given GIT repository subdirectory ./usr/local/bin/.

AT commands

To connect to the modem's serial console, use the following command:

screen /dev/ttyUSB2 115200

With AT commands you can edit modem parameters, reset the modem, edit its identification as USB device, etc..
Entering commands can look like this:

ATE1
AT!ENTERCND="A710"
AT!CUSTOM?
AT!CUSTOM="FASTENUMEN",2
AT!CUSTOM="FASTENUMEN",0
AT!PCOFFEN?
AT!PCOFFEN=2
AT!RESET
However, AT commands are not needed for configuration, networking and mobile Internet access, See the links at the end of this article for details on how to use AT commands and what commands are possible.

QMI

I did not successfully run this communication, so I am not detailing it. There are similar utilities for QMI: qmi-network, qmicli etc...

rfkill

Like every laptop, the ThinkPad X1 Carbon allows you to turn off peripherals in software. The rfkill utility is used for this purpose.

Use the following command to list the available devices and disable device 1.

rfkill list all
rfkill unblock 1

Network manager

I also tried NetwokManager for a while. There is a console utility for it called mmcli.
For example, the following commands can be used:

mmcli -L
mmcli -m 0

systemctl status ModemManager
systemctl status NetworkManager

mmcli -m 0 --simple-connect="apn=internet"

# fits only after running network manager
mmcli -m 0 --create-bearer="apn=internet"

mmcli -m 0 --simple-disconnect

mmcli -m 0 -b 0 -c

listing
mmcli -m 0 -b 0
However, I will not discuss their functionality, see the documentation.

According to the log etc, it seems that you can also connect using it, but even then you need to configure the network interface.
View log dump:

journalctl --follow -u ModemManager -u NetworkManager
I was able to get to a state where the log showed that the connection was online and what IP values to manually set the network to.
May 30 20:01:15 FreeTux ModemManager[6279]: Address: 10.183.56.65/30
May 30 20:01:15 FreeTux ModemManager[6279]: Gateway: 10.183.56.66
May 30 20:01:15 FreeTux ModemManager[6279]: DNS #1: 217.77.165.211
May 30 20:01:15 FreeTux ModemManager[6279]: DNS #2: 217.77.165.81
May 30 20:01:15 FreeTux ModemManager[6279]: MTU: 1500

NetwokManager also supports GPS. See the following commands:

mmcli -m 1 --location-status
mmcli -m 1 --location-enable-gps-nmea
Again, see the documentation for more details.

Network Manager seems to support both QMI and MBIM. However, I haven't looked into this further and see the documentation for details!

How to disable NetworkManager in the Mageia distribution.

Battery

To avoid unnecessary battery wear and tear, the laptop supports intelligent battery charge management. For more and links, see ThinkPad Wiki battery.

I'm using the Mageia distribution, so the instructions will be primarily for that. First I compile the module acpi_call. After booting it, I could set the battery discharge and charge to be controlled by the tpbat-utils-acpi script.

However, the script and module are not needed at all. Just install the tlp utility from the tlp package. This will install a daemon that allows you to configure the power-management of peripherals, including the battery.
Use the following command to list the current battery status:

tlp-stat -b
For example, the pam output might look like this:
--- TLP 1.2.2 --------------------------------------------

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi = active (data, thresholds)
tpacpi-bat = inactive (kernel module 'acpi_call' not installed)
tp-smapi = inactive (ThinkPad not supported)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer = SMP
/sys/class/power_supply/BAT0/model_name = 00HW029
/sys/class/power_supply/BAT0/cycle_count = (not supported)
/sys/class/power_supply/BAT0/energy_full_design = 52060 [mWh]
/sys/class/power_supply/BAT0/energy_full = 46360 [mWh]
/sys/class/power_supply/BAT0/energy_now = 30520 [mWh]
/sys/class/power_supply/BAT0/power_now = 0 [mW]
/sys/class/power_supply/BAT0/status = Unknown (threshold effective)

/sys/class/power_supply/BAT0/charge_start_threshold = 60 [%]
/sys/class/power_supply/BAT0/charge_stop_threshold = 80 [%]

Charge = 65.8 [%]
Capacity = 89.1 [%]

+++ Recommendations
* Install acpi_call kernel module for ThinkPad battery recalibration
The tlp program has the configuration is in the file: /etc/default/tlp, where you just uncomment the lines to set the battery discharge and charge:
START_CHARGE_THRESH_BAT0=55
STOP_CHARGE_THRESH_BAT0=80
and optionally give it a value of your choice. You can manually get the value or set it by writing it to files:
/sys/class/power_supply/BAT0/charge_start_threshold
/sys/class/power_supply/BAT0/charge_stop_threshold

More

There's only one thing that's bugged me about the Thinkpad X1 carbon so far: when playing video, the image flickered. Adjusting the compositor settings helped. In the KDE settings I changed the rendering from opengl to xrandr .

Links

Script that EM7455 modem connects to the Internet
Slides:QMI, MBIM modern modems in Linux
ThinkPad EM7455 flash firmware.
Download firmware for the EM7455 LTE modem

Resources

Github repository and modem setup information Sierra
mbimcli
mbim-network
how-to-set-up-a-simple-data-connection-over-the-mbim-interface-using-libmbim-and-driver-cdc-mbim-in-linux
AT EM7455 commands and modem

Other interesting links

3g-4g-modems raspberry-pi-sierra-wireless-mc7304-modem-qmi-interface-setup
The swi_setusbcomp.pl script that communicates with binary with the modem
ThinkPad X220 script that sets up the modem
Sierra EM7455 modem and NetworkManager

Články na podobné téma

VMware licensing change
Running Microsoft SQL Server on Linux
Backup: the Proxmox Backup Server
Linux as a router and firewall
How to upload a docker image to the Docker Registry
Linux: logical volume management
Linux Software RAID
Running a web application behind a proxy
Mailbox migration
Docker multistage build
Backing up your data by turning on your computer
Podman
Importing Windows into Proxmox virtualization
Docker and PHP mail
Proxmox virtualization
Docker and Cron
Yocto Project: Build custom operating system for embedded devices
Preparing a Linux server to run a web application in Python
How to address poor file share performance in Docker
How to get started using Docker correctly
Installing Linux on a dedicated HPE ProLiant DL320e server
How to stress test a web application
Why use the JFS filesystem
How to boot from a 4TB drive with GTP using UEFI
Btrfs file system
Raspberry PI
WINE - running Windous programs under Linux
GNU/Linux operating system

Newsletter

If you are interested in receiving occasional news by email.
You can register by filling in your email news subscription.


+