Adding more Sierra Cellular Modems to FreeBSD.

I am doing some work dedicated to HPS@ regarding cellular modems.

Years ago I spoke with HPS about adding a big bunch of PID's I have for Sierra Modems.

He was agreeable about the request but asked that I submit a PR with the info.

I am not a paperwork person and blew it off. I got mine working. Now I realize it could have been for his sponsor to get work credit.

In memory of HPS I am going to request the addition of many new PIDs for modems via a PR..

Specifically EM7355 and EM7455 M.2 modules. We have limited support I want to maximize it.

Support OEM modules like Panasonic,Dell and Lenovo. These all work fine if you add the PID to FreeBSD.

If anyone has any PID or idProduct of a cellular modem you need added please reply. I am going to help get modems updated to more current models.
 
HI
My present project BOX , a Fujitsu Celsius H7510 from 2022, comes with a Sierra Wireless EM7421 LTE. which is not listed in
/usr/src/sys/dev/usb/serial/u3g.c or /usr/src/sys/dev/usb/usbdevs


I can move the SIM card form my old external 4G/wifi LTE modem to the laptop.
If its as easy as adding the model type to those two files, I can test this soon.
 
ugen0.5: <EM7421 Sierra Wireless, Inc.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x00ef <Miscellaneous device>
bDeviceSubClass = 0x0002
bDeviceProtocol = 0x0001
bMaxPacketSize0 = 0x0040
idVendor = 0x1199
idProduct = 0x90b1
bcdDevice = 0x0006
iManufacturer = 0x0001 <Sierra Wireless, Incorporated>
iProduct = 0x0002 <EM7421>
iSerialNumber = ...
bNumConfigurations = 0x0001
 
After editing in EM7421 in src/sys/dev/usb/usbdevs and src/sys/dev/usb/serial/u3g.c
An rebuilding the kernel , i get these messages in

# dmesg -a

Root mount waiting for: usbus0
ugen0.5: <Sierra Wireless, Incorporated EM7421> at usbus0
ugen0.6: <Chicony Electronics Co.,Ltd. FJ Camera> at usbus0
.
.
.
Autoloading module: u3g
u3g0 on uhub0
u3g0: <Sierra Wireless, Incorporated EM7421, class 239/2, rev 2.00/0.06, addr 4> on usbus0
u3g0: Found 3 ports.

AND

Hw-probe utility says

usb:1199-90b1;02-0e-00;detected;network;u3g;Sierra Wireless, Incorporated;EM7421

So looks like the O/S now identifies the the LTE device. next step is to test it........
 
What I have found is you may need to use DirectIP mode meaning PPP or the port net/mpd5 for fastest speeds.
.

It may be possible to get it to work with cdce(4) driver instead of ppp. A ue0 interface. Much more flexible if possible. Depends on the compositions available on the modem.

So cell modems have several different "USB Compositions" built inside. With an AT Command you can change modes to work as a different composition.
That is how you can try different protocols. Linux uses QMI which is supposed to be best. But that don't work on FreeBSD. We do support several other modes though.
So if the modem module was used in Windows you may need to do switch the composition on it to something that works on FreeBSD.

I will add your module to my list for inclusion if you get it working. EM7421 should be similar to EM7455.
Have you ever upgraded the modem modules firmware? Did it come with the machine from Fujistu?

Are you comfortable issuing commands to the modem via terminal program like cu if I ask? I am curious about firmware date on module.
Would need to issue command:
ATI
to modem for outputs.

For example:
Use ls to find modem serial port.
ls /dev/ttyU*

Use terminal to issue commands to the ports found:
cu -l /dev/ttyU0.3

Hit Enter a bunch. AT and enter.

Sierra modems might mave a bunch of TTY's found. You have to go through them to find console you can issue commands to. It will be different port on each modem and protocol used.

Here is an example of what you may see:
ttyU0.0
ttyU0.1
ttyU0.2
ect
ect.

So you have DATA port in there, GPS port in there, Command Console and many more. Up to six interfaces to interface.
If you cu into GPS it will show onsreen garbage. cu into some ports will lockup whole computer.
Still you need to map out what service is on what port to try and find command console. There is usually two. One really limited console and one with full modem control.
 
So the Sierrra modem was supplied form Factory in the H7510
I purchased the machine form a Second Hand Broker last month.

, these were not here before the Sierra modem was activated.


crw-rw---- 1 uucp dialer 0x1cd Mar 10 15:14 cuaU0.0
crw-rw---- 1 uucp dialer 0x1ce Mar 10 15:14 cuaU0.0.init
crw-rw---- 1 uucp dialer 0x1cf Mar 10 15:14 cuaU0.0.lock
crw-rw---- 1 uucp dialer 0x1d3 Mar 10 15:14 cuaU0.1
crw-rw---- 1 uucp dialer 0x1d4 Mar 10 15:14 cuaU0.1.init
crw-rw---- 1 uucp dialer 0x1d5 Mar 10 15:14 cuaU0.1.lock
crw-rw---- 1 uucp dialer 0x1d9 Mar 10 15:14 cuaU0.2
crw-rw---- 1 uucp dialer 0x1da Mar 10 15:14 cuaU0.2.init
crw-rw---- 1 uucp dialer 0x1db Mar 10 15:14 cuaU0.2.lock

crw------- 1 root wheel 0x1ca Mar 10 15:14 ttyU0.0
crw------- 1 root wheel 0x1cb Mar 10 15:14 ttyU0.0.init
crw------- 1 root wheel 0x1cc Mar 10 15:14 ttyU0.0.lock
crw------- 1 root wheel 0x1d0 Mar 10 15:14 ttyU0.1
crw------- 1 root wheel 0x1d1 Mar 10 15:14 ttyU0.1.init
crw------- 1 root wheel 0x1d2 Mar 10 15:14 ttyU0.1.lock
crw------- 1 root wheel 0x1d6 Mar 10 15:14 ttyU0.2
crw------- 1 root wheel 0x1d7 Mar 10 15:14 ttyU0.2.init
crw------- 1 root wheel 0x1d8 Mar 10 15:14 ttyU0.2.lock

/dev/ttyU0.0 responds the other two ports are not reacting.

# cu -l /dev/ttyU0.0
Connected
AT
OK
ATI
Manufacturer: Sierra Wireless, Incorporated
Model: EM7421
Revision: SWI9X50C_01.14.02.00 2e210b jenkins 2020/08/19 14:18:39
IMEI: 356706149311278
IMEI SV: 12
FSN: 8G1447573004A1
+GCAP: +CGSM,+DS,+ES
 
That looks good. What about trying to see what composition it is using:

AT!USBCOMP?

Some things can only be run in 'Command Mode' with password needed:

AT!ENTERCND="A710"
 
SIM not needed to configure.

Two possibilities. Interface 0.0 is not usually the full console. It is usually on 0.3. With 0.1 being DATA and 0.2 being GPS. Usually... That is my experience with MC73xx/EM73xx. It can differ.

Could be the "full console" is not exposed. Maybe in MBIM mode from Windows which can jinx you.
This rabbithole is regarding MC73xx. It has alot of info for FreeBSD with Sierra.
Take this with grain of salt. There is a magic perl script from the Linux folks.

This is my thread from ages ago. It is still relevant.
 
I don't know if I would worry about using that old perl script above.

What I recommend is use Linux ModemManager and switch the modem to some USB-Composition that is FreeBSD compatible.
You may need to upgrade the modem firmware if USB compositions are limited.
modemmanager is a great piece of software to help. You can do this with a USB Live install.
 
Here is what USB compositions can look like. I suspect yours is similar. MBIM mode.

Code:
USB compositions:
   0 - HIP  DM    NMEA  AT    MDM1  MDM2  MDM3  MS      NOT SUPPORTED
   1 - HIP  DM    NMEA  AT    MDM1  MS                  NOT SUPPORTED
   2 - HIP  DM    NMEA  AT    NIC1  MS                  NOT SUPPORTED
   3 - HIP  DM    NMEA  AT    MDM1  NIC1  MS            NOT SUPPORTED
   4 - HIP  DM    NMEA  AT    NIC1  NIC2  NIC3  MS      NOT SUPPORTED
   5 - HIP  DM    NMEA  AT    ECM1  MS                  NOT SUPPORTED
   6 - DM   NMEA  AT    QMI                             SUPPORTED
   7 - DM   NMEA  AT    RMNET1 RMNET2 RMNET3            NOT SUPPORTED
*  8 - DM   NMEA  AT    MBIM                            SUPPORTED
   9 - MBIM                                             SUPPORTED
  10 - NMEA MBIM                                        NOT SUPPORTED
  11 - DM   MBIM                                        NOT SUPPORTED
  12 - DM   NMEA  MBIM                                  NOT SUPPORTED
  13 - Config1: comp6    Config2: comp8                 NOT SUPPORTED
  14 - Config1: comp6    Config2: comp9                 NOT SUPPORTED
  15 - Config1: comp6    Config2: comp10                NOT SUPPORTED
  16 - Config1: comp6    Config2: comp11                NOT SUPPORTED
  17 - Config1: comp6    Config2: comp12                NOT SUPPORTED
  18 - Config1: comp7    Config2: comp8                 NOT SUPPORTED
  19 - Config1: comp7    Config2: comp9                 NOT SUPPORTED
  20 - Config1: comp7    Config2: comp10                NOT SUPPORTED
  21 - Config1: comp7    Config2: comp11                NOT SUPPORTED
  22 - Config1: comp7    Config2: comp12                NOT SUPPORTED

 
yeah , could be a project for Saturday , obviously needs a number of hours , to read docs and get hold of a linux LIVE DVD a.s.o
thanks for all the info you have given me.
 
I just got my USB-M.2 adapter today. I have bought 4 different models off ebay and will need to switch them. Both EM7355 and EM7455.

I will mess with it over the weekend. Bjorns perl script is 10 years old now.. I have Devuan installation on a laptop and I will use that.

I really hate recommending Linix to fix them up but whatever it takes.

I tried to offer money to Bjorn to bring us QMI protocol. He got a laugh out of that one....

I was never able to get CDCE/USB interface out of a Sierra module. Only PPP and that is really pain to setup. MPD5 is really our best route. PPP is a single threaded. Limited in speed by cpu clock.
MPD5 overcomes this but is another difficult program to setup.

8 - DM NMEA AT MBIM SUPPORTED
 
SWI9X50C_01.14.02.00 2e210b jenkins 2020/08/19 14:18:39
This shows your firmware is from 2020. The 'jenkins' part is interesting. Maybe a dev version firmware.
Maybe its the one Windows Update puts on the module locking you out of com ports....
Being second hand we can only guess. Carriers do push out thier own firmwares. I have not seen it on any of mine.
Windows Update on the otherhand slips in the Sierra Firmware Update without asking directly...... Shame on them.
 
HI, a Verbose Boot gives this info on the SIerra EM7421 modem.

Autoloading module: u3g
u3g0 on uhub1
u3g0: <Sierra Wireless, Incorporated EM7421, class 239/2, rev 2.00/0.06, addr 4> on usbus0
u3g0: port 0 supports modem control
u3g0: port 1 supports modem control
u3g0: Found 3 ports.

but only port0 responds to AT commands
 
Found 3 ports.
This should be five. You have to change composition I believe. Did you ever see a GPS stream via console?

Windows Update on a machine with this module flashes firmware to MBIM only default with a limited console.
There is a good chance the machine had Windows on it correct? You mentioned second hand.
Assume the worst. It is stuck in a composition that FreeBSD has no access to.

Have you been able to see what compositions are available via Linux modemmanager/qmi cli programs?
My weekend plans changed with arrival of a server board.
 
Yes Machine was installed with Windows 11 wen I bought it.
I got parts of a new workstation delivered on Friday , so I've been busy with that.
 
OK first module I tried was MBIM only.
Code:
toot@devuan:~# qmicli -d /dev/cdc-wdm0 --dms-swi-get-usb-composition
[/dev/cdc-wdm0] Successfully retrieved USB compositions:
        USB composition 1: HIP, DM, NMEA, AT, MDM1, MS
        USB composition 6: DM, NMEA, AT, QMI
        USB composition 7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3
        USB composition 8: DM, NMEA, AT, MBIM
    [*] USB composition 9: MBIM
        USB composition 10: NMEA, MBIM
        USB composition 11: DM, MBIM
        USB composition 12: DM, NMEA, MBIM
        USB composition 14: Dual configuration: USB composition 6 and USB composition 9
        USB composition 19: Dual configuration: USB composition 7 and USB composition 9

So I switched it to Composition 8

qmicli -d /dev/cdc-wdm0 --dms-swi-set-usb-composition=8

[/dev/cdc-wdm0] Successfully set USB composition

Then I did ls /dev
and I now have ttyUSB0 and ttyUSB1 so I can now try FreeBSD.

I will switch some more while in Linux so then I can switch/investigate all these PID's in FreeBSD.
 
Round two: These were in QMI mode from some tablet called Xplore. I tried to upgrade Generic Versions first.
Panasonic, Getac, Fujistu OEM models. Next I will try Dell, HP and Lenovo's

Code:
koot@devuan:~# qmicli -d /dev/cdc-wdm0 --dms-swi-get-usb-composition
[/dev/cdc-wdm0] Successfully retrieved USB compositions:
        USB composition 1: HIP, DM, NMEA, AT, MDM1, MS
    [*] USB composition 6: DM, NMEA, AT, QMI
        USB composition 7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3
        USB composition 8: DM, NMEA, AT, MBIM
        USB composition 9: MBIM
        USB composition 10: NMEA, MBIM
        USB composition 11: DM, MBIM
        USB composition 12: DM, NMEA, MBIM
        USB composition 14: Dual configuration: USB composition 6 and USB composition 9
        USB composition 19: Dual configuration: USB composition 7 and USB composition 9
koot@devuan:~# qmicli -d /dev/cdc-wdm0 --dms-swi-set-usb-composition=8
[/dev/cdc-wdm0] Successfully set USB composition
 
OK I have a good list of PID's to add to usbdevs and u3g.c

0x1199--0x9073 EM7455B
0x1199--0x901P EM7355 LENOVO
0x1199--0x90b1 EM7421
0x1199--0x9061 EM7355 GENERIC SIERRA WIRELESS
0x1199--0x9071 EM7455 GENERIC SIERRA WIRELESS
0x413c--0x81a9 EM7355 DELL

I bought a bunch of modules from ebay to scape this information. This is only for M.2 Sierra Modules. I would like to do a second drop with Mini-PCIe Sierra Modules. Improve MC73xx coverage.
I want to attack this problem and then move on to add more coverage to the Serial Port Boards we support. I have alot that need adding. PUC needs luv for newer PCIe boards.

Can anybody tell me if a PR for feature request with patches is enough? Do I need to do a phab review?

I am building a u3g custom kernel to test these modules and my patches.
 
I built my custom GENERIC-NODEBUG-U3G kernel. It works as expected. With my move to -CURRENT source tree one of my proposed PID's has already been added.

I also don't have the EM7421 to test so I left it out.
So I have Lenovo and Dell modules working without hacking the PIDs. Just add them. I added a HP module for five different EM7355/EM7455 tested.
I used Dell and HP VendorID instead of switching VID&PID like I did in past. I added PID's for HP and Dell models.
Lenovo uses the standard Sierra VID so I just added its PID's. I have not updated firmwares yet as I wanted to syphon info from modules as found on ebay.

I have one EM7355 module that is showing up as EM7305 and nowhere in our source is a EM7305. Been racking my brain where did it come from.
I had an ah-ha moment today. I wanted to verify my additional PID were in line with Linux so I checked misc/pciids but it is only for PCI devices not USB.
The EM7305 entry here in Linux usb.ids. Is is using the PID of 1199-9041. So any module with that PID shows up as EM7305.... Weird. Its not in usbdevs.
What I find cool is that the PID is controliing NAT mode??? I knew Sierra had all these PIDs for something. (Search for VID 1199)
Code:
9041  EM7305 Modem
9055  Gobi 9x15 Multimode 3G/4G LTE Modem (NAT mode)
9057  Gobi 9x15 Multimode 3G/4G LTE Modem (IP passthrough mode)
9071  AirPrime MC7455 3G/4G LTE Modem
9079  EM7455
I really don't have a handle on what makes the module a "GOBI" one besides firmware. I thought it was application space for custom apps on modules like fleet tracking...
 
Back
Top