Two LTE modems with PC Engines APU3

PC Engines GmbH has recently released a new board, APU3. The difference from APU2 is that two mPCIe slots are suitable for 3G or LTE modems, whereas APU2 had only one such slot. This article explains how to utilize two HUAWEI ME909 LTE modems, and it’s applicable to other modems too.

One of the LTE modems has to occupy the slot which is otherwise usable for mSATA storage. So, the board has to use the SD card for booting, and Voyage Linux is designed for such setup. The scripts in this article are tested against Voyage Linux version: 0.11.0 (Build Date 20170122).

As with APU2, the Linux kernel assigns ttyUSB port numbers randomly, so two ME909 modems produce 10 ttyUSB devices with random numbers which change after a reboot.

The modems have identical serial numbers “0123456789ABCDEF”, and the only thing that allows distinguishing them reliably is the PCI slot number of the corresponding USB controller.

Luckily, APU3 board slots designed for LTE modems, J14 (mSATA/mPCIe 3), and J15 (mPCIE 2), are attached to different USB controllers. The third slot, J16 (mPCIE 1), shares the same USB controller with J15.

USB EHCI Controller at PCI device 00:12.0 is attached to J14, and the controller at 00:13.0 is attached to J15 and J16.

So, the udev rules require a small Shell script that translates DEVPATH variable into the PCI slot and function number, and the resulting string will persistently distinguish the devices attached to USB interfaces in J14 and J15:

cat >/etc/udev/devpath_to_pcislot <<'EOT'   
#!/bin/sh echo ${DEVPATH} | sed -r \
    -e 's,^\/[^\/]+\/[^\/]+\/[0-9af]{4}:[0-9af]{2}:,,' \
    -e 's,\/.+,,' -e 's,\.,,g' 
EOT 

cat >/etc/udev/rules.d/99-wwan.rules <<'EOT'
SUBSYSTEM=="tty", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="15c1", PROGRAM="/etc/udev/devpath_to_pcislot" SYMLINK+="ttyWWAN%c{1}_%E{ID_USB_INTERFACE_NUM}"
SUBSYSTEM=="net", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="15c1", PROGRAM="/etc/udev/devpath_to_pcislot" NAME="lte%c{1}"
EOT

After rebooting, you can see “lte120” and “lte130” network interfaces, and devices suitable for configuring modems: “/dev/ttyWWAN120_02” and “/dev/ttyWWAN130_02”. There are few other TTY interfaces for various purposes, as explained in HUAWEI documentation.

, , ,

  1. #1 by Nova on May 29, 2017 - 11:17 am

    Hi Stanislav

    did you try the Sierra Wireless MC7304 (LTE/4G) on an APU2 with two SIM slots as well? I tried the Gobi drivers and software from Sierra, the qmi_wwan from aleksander https://sigquit.wordpress.com/tag/qmi/ and now openwrt but i can’t establish a connection. Currently on openwrt’s fork (lede) the sim doesn’t get recognized. So i am really thinking of trying the HUAWEI ME909 LTE Modem now. With the Dell 5550 it was so easy to establish a 3G connection.

    • #2 by txlab on May 29, 2017 - 11:20 am

      hi Nova, no, I never tried this type of modem. Of Sierra Wireless, I only tried MC8775

  2. #3 by Nova on May 29, 2017 - 11:19 am

    APU3 i mean of course….

  3. #4 by Riodda on January 27, 2018 - 7:56 am

    Hi, as far as i know the 2 sim slots are for the mPcie1 and mPcie2, to put a modem on the msata slot the modem must have it’s own sim reader…

  4. #5 by Riodda on January 27, 2018 - 8:08 am

    No i was worng, mPcie1 has no sim reader.

  5. #6 by comprar 0km financiado on March 20, 2018 - 6:22 pm

    Good post! Thanks!

Leave a comment