FCC unlocking: Make the Sierra Wireless EM7455 (and other WWAN cards) work on Linux

January 2023 · Last updated 2023-02-24 · 896 words

To get a broadband WWAN modem to connect in Linux, “The user must, under their own responsibility, enable the automatic FCC unlock as shipped by ModemManager.” Since ModemManager 1.18.4, the FCC unlock procedure is no longer enabled by default. To enable automatic unlocking, in Ubuntu/Linux Mint/possibly others, issue this command in a terminal:

sudo ln -sft /etc/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/*

As always, you might have to adapt that a bit depending on your Linux distribution.


That was the tl;dr. Here begins the long version, a bit of a rant - this problem shouldn’t exist in the first place. Furthermore, it should be much easier to detect - since, as often is the case, once you know the cause, it’s easy to fix. I publish this so others looking for a solution with the unhelpful error message won’t have to search as long as I did. Alas…

Last night I wasted a couple of hours fixing the WWAN broadband connection in a Lenovo x260 laptop.

The laptop runs Linux Mint (20.3, XFCE Edition) and I am using its default, pre-installed tools to set up a connection using the O2 “Internet to go” prepaid plan. For the price of 49,99 € per year - which is 3,50 € net per month - O2 sells 30 GB of “LTE Max” (fast?) data.

Enthält 30 GB Highspeed-Datenvolumen mit bis zu 225 MBit/s (im Durchschnitt 50,3 MBit/s; Upload bis zu 50 MBit/s, im Durchschnitt 23 MBit/s) im dt. O2 Mobilfunknetz. Mit dem Huawei WLAN Router bis zu 150 MBit/s LTE im Mobilfunknetz. (source)

30 GB is plenty for the times there is no WiFi around, at least it certainly gets you lots of SSH (or better, Mosh).

The SIM card and the WWAN internet connection worked in another laptop, so I was assuming the card and the ISP contract were working.

Debugging this was frustrating:

The only message the desktop environment was giving me was Reason: unknown; not overly helpful. The logs weren’t much better. The system journal reads (journalctl -x):

NetworkManager: <info> audit: op="connection-update" uuid="..." name="O2 Internet-to-Go" [...]
NetworkManager: <info> device (cdc-wdm0): Activation: starting connection 'O2 Internet-to-Go' (...)
NetworkManager: <info> audit: op="connection-activate" uuid="..." name="O2 Internet-to-Go" [...]
NetworkManager: <info> device (cdc-wdm0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
ModemManager: <info> [modem0] simple connect started...
ModemManager: <info> [modem0] simple connect state (3/8): enable
ModemManager: <info> [modem0] state changed (disabled -> enabling)
NetworkManager: <info> modem["cdc-wdm0"]: modem state changed, 'disabled' --> 'enabling' (reason: user-requested)
ModemManager: <warn> [modem0] Failure
ModemManager: <warn> [modem0] Failure
ModemManager: <warn> [modem0] couldn't enable interface: 'Invalid transition'
ModemManager: <info> [modem0] state changed (enabling -> disabled)
NetworkManager: <info> modem["cdc-wdm0"]: modem state changed, 'enabling' --> 'disabled' (reason: unknown)
NetworkManager: <info> device (cdc-wdm0): state change: prepare -> disconnected (reason 'user-requested', sys-iface-state: 'managed')

What’s the problem? couldn't enable interface: 'Invalid transition'? reason: unknown?

I was suspecting driver/software problems and added parameters in /etc/modprobe.d/ like this forum post suggests, but that didn’t help (and maybe even harmed? I since have removed them again).

Searching the web I (after much too long) stumbled over the fact that this can stem from the Modem needing to be “unlocked”. Because, for some reason, it is “locked” and doesn’t “unlock” itself.

Turns out the reason for the locking is the US’s Federal Communications Commission.

The ModemManager documentation on FCC locking says:

The purpose of this lock is, according to the manufacturers, to have a way to bind the WWAN module to a specific laptop, so that the whole bundle of laptop+module can go through the FCC certification process for radio-enabled devices in the USA. This lock has no other known purpose out of the US regulation.

The FCC lock is also part of a mutual authentication attempt between module and laptop:

  • The laptop BIOS comes with an allowlist of modules that can be installed in the laptop.
  • The WWAN module comes with a FCC lock that should be unlocked by approved laptops only.

Laptop manufacturers should in theory provide a custom FCC unlock tool […]

… but of course they don’t, or only as a Windows binary that is nowhere to be found outside their pre-installed system images.

To ModemManager and the Linux WWAN stack’s defense, the system logs do hint at this “lock” during boot time:

NetworkManager: <warn> modem["cdc-wdm0"]: cannot enable/disable modem: locked
ModemManager: <info> [modem0] state changed (disabled -> enabling)
ModemManager: <warn> [modem0] Failure
ModemManager: <warn> [modem0] Failure
ModemManager: <warn> [modem0] couldn't enable interface: 'Invalid transition'
ModemManager: <info> [modem0] state changed (enabling -> disabled)
NetworkManager: <warn> modem-broadband[cdc-wdm0]: failed to enable modem: GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Retry: Invalid transition
NetworkManager: <info> modem["cdc-wdm0"]: modem state changed, 'enabling' --> 'disabled' (reason: unknown)

Later, when I tried to connect, the same clue / the term “locked” was unfortunately nowhere to be found. My bad for not reading all the system’s logs 🤦

Luckily, ModemManager comes with unlock scripts for each device. You can enable by linking them into your system’s configuration directory:

sudo ln -sft /etc/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/*

Read FCC unlock procedure integration in ModemManager, it makes for a good anecdote on how not to do regulation: Harming interoperability and failing its purpose.

With the FCC out of the way and no other change, according to the Google Fiber Speed Test web site, at my home that WWAN modem gets slightly over 100 MBit/s down and 50 MBit/s up, which is faster than my home WiFi in the same location. Happy for now!

Hope this helps someone.

Portrait

Greetings! You are reading the personal web page of Florian Sesser.

I always like to hear from people. Please have a look at the imprint for ways to get in touch.