Librem5 5G is here! Working alternative modem setup tested successfully

Tested the manual modem installation with normal old PureOS byzantium and since it has older modemmanager, it only offers 4G (5G is not an option).

[Edit to add: Just a though, but as this troubleshooting has shown the challenges, it seems to me VERY likely that some other modems could also be options on PureOS/Librem5 - not sure if there are any other suitable 5G options, though]

5 Likes

Here are the steps to install Sim8202g m.2 alternative 5G global modem and the workaround to get the the modem persistently available in Librem 5. I guess @dos or someone can use it to make something permanent and built-in to PureOS.

Tested on PureOS basic Byzantium and Crimson backports.

Steps in general:
0. Physically install the modem. See some pointers for instance from the disassembly manual or video. Be careful with the antenna connectors, use ANT0 and ANT3.

.
Doing lsusb should show “1e0e:9001 Qualcom / Option…” somewhere in the list.

  1. Copy the two scripts from below to text files and name the as shown.
  2. Place both of the scripts to appropriate folders, as shown.
  3. Run the shown commands to make sure the scripts run.
  4. Reboot. Expect to see in the left corner the 5G icon (4G if you use old ModemManager, or maybe if you don’t have 5G service available or contract).

init-sim8202g.sh (script to add missing stuff with automatic fetch of modem path)
#!/bin/bash

# This is Sim8202g modem installation workaround persisntance script (part 1 0f 2) to Librem5: init-sim8202g.sh
# place this: sudo cp init-sim8202g.sh /usr/local/bin/
# and also do: sudo chmod +x /usr/local/bin/init-sim8202g.sh
# The other is init-sim8202g.service which should be placed: sudo cp init-sim8202g.service /etc/systemd/system/ 
# and also do: sudo systemctl enable init-sim8202g.service
# reboot and check logs if needed (journalctl -u init-sim8202g.service)
 

# Load kernel modules
modprobe option
modprobe qmi_wwan
modprobe cdc_wdm

# Dynamically find the USB device path for the modem
DEVICE_PATH=$(find /sys/bus/usb/devices/ -maxdepth 1 -name "1-*" -exec grep -l "1e0e" {}/idVendor 2>/dev/null \; | xargs -I{} dirname {})

if [ -n "$DEVICE_PATH" ]; then
    echo 1 > "$DEVICE_PATH/authorized"
else
    echo "Modem USB device not found" >&2
    exit 1
fi

# Reload udev rules
udevadm control --reload-rules
udevadm trigger

# Wait for udev to settle
sleep 5

# Send AT+CFUN=1,1 to reset the modem via AT command port
if [ -e /dev/ttyUSB2 ]; then
    echo -e "AT+CFUN=1,1\r" > /dev/ttyUSB2
else
    echo "AT command port /dev/ttyUSB2 not found" >&2
fi

# Wait for modem to reinitialize
sleep 10

# Check for modem devices, report to log
if ls /dev/ttyUSB* 1>/dev/null 2>&1; then
    echo "Modem Sim8202g initialized successfully."
else
    echo "Modem Sim8202g ttyUSBs not detected." >&2
fi

Place this from the folder you have it with: sudo cp init-sim8202g.sh /usr/local/bin/
And also do: sudo chmod +x /usr/local/bin/init-sim8202g.sh


init-sim8202g.service (initialize the previous script at startup)

[Unit]
Description=Initialize Sim8202g modem
After=network.target

[Service]
ExecStart=/usr/local/bin/init-sim8202g.sh
Type=oneshot

[Install]
WantedBy=multi-user.target

Place this from the folder you have it with: sudo cp init-sim8202g.service /etc/systemd/system/
And also do: sudo systemctl enable init-sim8202g.service


Reboot:

  • If success (which is very likely), check audio by making (unimportant) call (if no audio, check audio settings that you have right mic and output and that volume is up).
  • If you don’t see the 5G (or 4G) icon, check logs if needed, start with: journalctl -u init-sim8202g.service If you see 4G (or lower) icon, check to see that you have 5G as an option in Settings → Mobile Network → Network Mode (it seems that without the rules and installed modules other icons may show up intermittently in crim).

[I’ve had one random occasion when the audio disappeared but haven’t been able to reproduce the problem and reboot has fixed it. Oh, and just to make a note of the “first” of it, I’ve now done the linux PureOS Librem5 5G to Librem5 5G call. The main parts of this thread have been added to the community wiki, where any further how-to steps and info can be edited.]

[Edit to add: Before anyone asks, Purism has responded they are aware of this development. I’d expect it to take a moment to do proper testing and commercial planning.]

[Edit to add: While testing a "FrankenLUKSCrim", I noticed that the scripts did not find the modem and I had to use the manual commands (three modprobes and echo+tee), which worked. No idea why or what’s changed.]

7 Likes

https://docs.puri.sm/Hardware/Librem_5/Maintenance/Disassembly.html#l5-disassembly-procedure

3 Likes

Very nice work!

So, I feel like you are saying that your 5G rig is more stable than the stock U.S. Evergreen setup. Would you say that’s true? My stock Evergreen drops, hangs, freezes or otherwise looses cell connectivity about four times a week (but I would never trade it for a spy phone), so I would consider your 5G conversion on that basis alone.

4 Likes

That has been my experience so far, yes. I only have limited testing, but it seems to work more reliably. To emphasize, the card is not new, but it has more mature tech [than BM818 as it’s newer that that] and more efficient chip (also [potentially] more power efficient, in addition to other features). But, I have also noticed that there are still some issues that now seem to pinpoint more to Calls app or something else that is not modem or connection related - minor stuff, like, I once managed to “answer” a call but actually had to tap the answer button again to really answer. Having another modem gives troubleshooting a comparison to work with. It will take more people with the modem to really suss out any remaining quirks and really see how well it behaves (in all the device setup variations in all the different networks globally).

7 Likes

A little anonymous poll about what’s the current thinking around this. Poll closes end of next week (12th) and then shows the results.

Is the community upgrading their Librem 5 to 5G?
  • Already got/ordered this modem (already started using it or are about to)
  • Looking to get this modem or very likely to do so soon (next weeks or months)
  • Thinking about it and maybe could do the upgrade within a year or so, but waiting for more testing by others
  • Probably will do the upgrade sometime eventually but not until have to or things change
  • Nope, not with this modem/manufacturer (maybe with some other)
  • Nope, cost is too high (maybe if it was much less)
  • Nope, seems too difficult to do (maybe if it was done for me)
  • Nope, not until official endorsement by Purism (maybe if it’s supported in Crimson)
  • Just no - the phone is good as is, don’t want or need 5G or it’s not worth to the upgrade the phone
  • I have no idea yet, haven’t thought about it or don’t have enough info
0 voters

Something else?

1 Like

After this job ends, I will purchase it.

1 Like

Simply no.

2 Likes

For the purposes of the poll then, the second to last option would seem like the appropriate choise.

1 Like

Only if you want an outright lie.

1 Like

Yes, kinda - “for the purposes of the poll” it’s close enough if you’re expressing a resounding “no”, regardless of reasoning. It’s not scientific accuracy that we’re after here, after all.

1 Like

I’m not against upgrading things, I did upgrade to the spark lan chip, but I don’t think I’ll be upgrading anything though until the overall experience improves. If the modem does improve things though, maybe that’s the kick I need to start playing with it again.

5 Likes

I’m a bit in the same boat. I’m going to see how the phone behaves when Crimson comes out, but it still will not solve my cellular network connection issue. If the carrier doesn’t vet the device then even going 5G won’t matter, they will still block it.

2 Likes

Depending on whether they whitelist or blacklist and depending on whether the replacement modem just happens to pass muster with the carrier. The problem for you is that the OP almost certainly didn’t choose the modem based on whether it works with your carrier in your country. :wink: So I guess that unless someone else in your country does the legwork, you probably don’t want to be first mover.

2 Likes

True. We need volunteers to test them. And the more of them there are and show up in networks, the more that signals that there is a market. Kind of a chicken vs. the egg thing, maybe. On the other hand, if in some rare odd case the problem isn’t with the carrier but the old modem or some software issue, the new modem would help troubleshoot that.

Luckily not all networks and markets are as closed as in some continents and countries. For instance here it’s very rare to get phone+carrier bundles, so networks primarily serve all kinds of devices - not just their own specific ones (carriers do sell phones but you are free to use any providers services). I have felt bad for all that have had these problems. It seems odd that there would be this much problems with IoT (which the L5 modems normally are used for) this day and age, but that’s a conversation for another thread. [edit to add: There are other problems as well, and 5G in EU isn’t perfect either]

[edit to add: This may be of interest to all those in USA. The FCC has official test and certification records of the Sim8262A variant (same family, newer but not fully global - see table) in their database, which gives interesting info but also may help to “sell” the idea that it’s ok to allow them into the network. See: https://fcc.report/FCC-ID/2AJYU-8XN0003/]

2 Likes

To all: take part in a poll in this thread :nerd_face: :chart_with_upwards_trend:: Librem5 5G is here! Working alternative modem setup tested successfully - #50 by JR-Fi (a few posts above :arrow_heading_up:)

4 Likes

Depends on IEMI, some carriers will even spoof their end depending on the device and if it is technically capable of working on the network.

1 Like

I personally don’t like the idea of 5G (radiation, tracking, China, etc.), so I don’t plan on upgrading. But that’s just me :man_shrugging:

1 Like

I just have no need to do so. Still having 2G and 4G and it doesn’t seem to change for the L5 lifetime. And if so, we may have new options, so it makes no sense to think about it right now. 5G also gives no advantages to me, because I do not need faster mobile internet etc. Still, I like people trying out such things.

2 Likes

Interestingly, this may be the kind of combination that suits your kind of risk view, as it’s using limited number of antennas and frequencies (specifics added to wiki now), yet (AFAIK) is able to provide L5 all it can handle. As for geopolitical risks, those are the same with all other modems too, but L5 is the one with the separation, so that wouldn’t change for the worse. 5G would offer some security enhancements, but in some areas the 2G option for connection, which is less secure than even 3G, may be more important. If 4G network works for you already well, and especially if you’re not often in 5G coverage area, there’s probably little incentive to change.

3 Likes