Gemalto is now part of the Thales Group, find out more.

You are here

Thales IoT Developer Community

5G product show case: running MV31 PCIe with MBIM on Linux Ubuntu OS

Showcase, September 22, 2022 - 10:31am, 147 views

5G product show case: running MV31 PCIe with MBIM on Linux Ubuntu OS

======================

Introduction:
5G mobile data connections bring new requirements towards the interface links between the host systems and 5G cellular modules.

Upon Linux host OS, indeed the Linux community continuously (www.kernel.org) brings necessary changes to the kernel drivers, and also new versions of interface management tools to improve the modem compatibility and mobile network performance.

So it is highly recommended that customer application designs with cellular modules merge with up-to-date kernel versions.

By using the latest kernel release versions, many integration problems with module interfaces can be resolved in default. 

======================

Show case:

Below is an example on showing how to establish cellular data connection with our MV3x 5G product series under Linux OS, using MBIM network mode over PCIe/MHI physical interface.

With a step-to-step procedure this show case includes how to establish a MBIM data connection using libmbim library and mbimcli command line interface upon our MV31 5G data card as connected over PCIe interface to the host HW platform & Ubuntu Linux OS.

=======================
Host OS setup

On the Ubuntu OS 22.04 LTS, the latest kernel version with modem manager and libmbim facilities are being used:
 
sudo apt install
sudo apt upgrade
snap install modem-manager
sudo apt install libmbim-utils

Refer to:
https://www.kernel.org/category/releases.html

https://ubuntu.com/#download-content

===============================
MV3x 5G module PCIe & MHI driver  

The MV3x 5G products with their VID/PID have already been included in the Linux kernel (up from 5.15.x) MHI Driver as in /drivers/bus/mhi/host/pci_generic.c

Refer to:
https://docs.kernel.org/mhi/mhi.html
 
/drivers/bus/mhi/host/pci_generic.c

 static const struct pci_device_id mhi_pci_id_table[] = {
     /* MV31-W (Cinterion) */
     { PCI_DEVICE(0x1269, 0x00b3),
         .driver_data = (kernel_ulong_t) &mhi_mv31_info },
    /* MV31-2-W (Cinterion), based on new baseline */
    { PCI_DEVICE(0x1269, 0x00b4),
        .driver_data = (kernel_ulong_t) &mhi_mv31_info },
     /* MV32-WA (Cinterion) */
     { PCI_DEVICE(0x1269, 0x00ba),
         .driver_data = (kernel_ulong_t) &mhi_mv32_info },
    /* MV32-WB (Cinterion) */
     { PCI_DEVICE(0x1269, 0x00bb),
         .driver_data = (kernel_ulong_t) &mhi_mv32_info },

==========================

MV31 5G module FW versions

It is recommended to use the latest MV3x module FW releases, please contact our Thales IoT FAE/Sales people for details

=====================================
MBIM network interface

On the MV3x 5G products, with both the USB/PCIe variants, it is recommended to use the MBIM (Mobile Broadband Interface Model) data/control interfaces on Linux Kernel for 5G data transmissions

Refer to:
Ubuntu user guide "Configure Cellular Connections":
https://ubuntu.com/core/docs/networkmanager/configure-cellular-connections

https://www.kernel.org/doc/html/v5.8/networking/cdc_mbim.html

https://code.launchpad.net/ubuntu/+source/libmbim

https://www.freedesktop.org/software/libmbim/libmbim-glib/latest/

e.g.: a firmware update via the public libmbim APIs is possible since libmbim version 1.26.

=====================================
Running steps:

Attached please find the log file: "My-Test-log-with-MV31-FW-T99W175.F0.1.0.0.9.VF.007.058.txt"

Basically it includes the steps as showing how cellular data connection is built via command line/shell mode

1) check OS version + kernel version of Ubuntu
2) check PCI interface for MV31 device
3) check the status of ModemManager & wwan0 interface
4) stop the ModemManager as the service is active
5) check wwan0 interface again: all IP parameters are empty now
6) use the mbimcli commands for verfication on MBIM interface to MV31 module
  a) check the MV31 5G module FW version on Device capabilities
  b) check the MV31 module state & network registration state
  c) check the MV31 module on network packet data service
7) as the status of MBIM interface is okay, start MBIM-network
8) check wwan0 interface-> all the IP parameters are still empty
9) use mbimcli command to get the assigned IP parameters from MNO network ("Vodafone Germany" in the show case)
10) use the IP addr and route commands to add the IP parameters into wwan0
11) use ifconfig -a to double confirm that the IP parameters are correct on wwan0 network interface
12) as the cellular data connection is established on wwan0, start using the mobile data
  a) for example ping 8.8.8.8
  b) for example speedtest (installtion via sudo apt install speedtest.cli) 

=================================
On the customer target HW platforms & Linux Host systems

For design-in of data connection application in user space of LINUX, customers would need to call the libmbim API functions to be embedded in the applications, not only by using mbimcli commands

For example, the application will need to parse those IP parameters (as assigned by MNO networks, and indeed different MNO networks have different parameters) and put them into the configurations for IPs, routes, gateways...

This would require the customers to re-compile libmbim source code into the target host OS kernel.

Refer to LINUX libmbim:

https://www.linuxfromscratch.org/blfs/view/svn/general/libmbim.html

Author

wemei's picture
wemei