I’m trying to get started with an EM7421 on an embedded linux system (yocto OE build).
The aim is to interact with the modem from our application using ModemManager (over the MBIM interface) for location services - and also WWAN using NetworkManager (transparently to our application). Does this sound reasonable ?!
First, I have tested the HW by installing drivers/Skylight on Win10. I can connect PuTTY to the NMEA and AT (WWAN modem) USB ports, where I see data and can issue AT commands.
However, when connecting to the Linux device :-
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1199:9091 Sierra Wireless, Inc.
Bus 001 Device 004: ID 1286:204e Marvell Semiconductor, Inc.
Bus 001 Device 002: ID 0424:3803 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
But
# mmcli -L
No modems were found
And
# ls /dev/ttyUSB*
ls: cannot access ‘/dev/ttyUSB*’: No such file or directory
And
# dmesg | grep usb
:
[ 5207.950066] usb 1-1.2: new high-speed USB device number 6 using cdns-usb3
[ 5208.054680] usb 1-1.2: config 1 has an invalid interface number: 8 but max is 3
[ 5208.062194] usb 1-1.2: config 1 has no interface number 1
I am supposing that the ModemManager would be dependent on the USB interface.
Is that true ?
Do I need some specific USB driver ?
Maybe I need to manually add the product VIDs ? (I will look at this in a moment)
I understood that these would be included in the core Linux build (V5.4.120).
Right - I notice that I do not have a qcserial folder in /sys/bus/usb-serial/drivers/ - or are they something more generic ?
I didn’t think that I would need to be adding device-specific code to our build.
I would rather include the Linux drivers, if they would be enough. We’re not looking to use any extended functionality… (my Yocto-bitbake skills still remain entry-level )
Yes - our Yocto is based on one from Toradex, so is set up a bit differently.
I changed the config using bitbake -c menuconfig virtual/kernel to include the USB Qualcomm Serial modem which includes the drivers which come with the base version of linux, and results in /sys/bus/usb-serial/drivers/qcserial appearing. So now :-
# dmesg | grep usb
[ 6.481399] usb 1-1.2: Qualcomm USB modem converter now attached to ttyUSB0
[ 6.529149] usb 1-1.2: Qualcomm USB modem converter now attached to ttyUSB1
[ 6.558658] usb 1-1.2: Qualcomm USB modem converter now attached to ttyUSB2
While MM would be happy with the TTY-only modem, using QMI will give you support for a network interface, instead of needing PPP over ttyUSB2. Make sure you try to install the QMI and/or MBIM drivers in your yocto.
The best way to know how to best manage this type of modem in Linux is to use it on a standard distribution, like Ubuntu or Debian, and a recent enough MM installed there. If MM is using QMI in that distro, you want to use QMI in your own setup as well.
Thanks for the definitive tips - very useful to confirm. The truth is that I don’t remember the details of what I did, other than I had got enough working to satisfy us that we would be able to achieve our goals. For now though this side-project is on hold, while core project get done !
But I am pretty sure we will want to implement something for this in the next few months. Possibly starting from a completely different Yocto build base…