Live data from Hacker News

Using 4G LTE wireless modems on a Raspberry Pi

jeffgeerling.com

1–10 of 46 posts

Re: Using 4G LTE wireless modems on a Raspberry Pi

#2
This blog post has been quite the effort—coming into it I thought I'd just learn some new things, document a simple process, and be done.

But along the way I probably spent 40 hours (and counting) trying to figure out the ins-and-outs of 4G LTE modems and Linux networking when it comes to these oddball devices.

I hope some parts of this post help anyone else new to LTE networking in Linux, and maybe somebody can help clear up some of my open questions, like:

Why doesn't Quectel have any firmware downloads on their site? (And is there any way to get them besides downloading random files posted to forums?)

Is there any advantage to using QMI (`wwan0` / qmi_wwan) vs ECM (`usb0` / cdc_ether)?

Why does it seem there's no real documentation for LTE modems on Linux? What little _good_ information I found was in random presentation slides scattered around the Internet.

Other than that it's either extremely technical documentation pages that expect a very high level of familiarity already, or some very cookie-cutter blog posts that give a walkthrough to get Internet going, but don't really explain anything.

(Also in the course of my research I learned a lot from OSMOCOM's work reverse-engineering some of the LTE modems (including the QC25 I'm using): https://osmocom.org/projects/quectel-modems/wiki/EC25 ).

Re: Using 4G LTE wireless modems on a Raspberry Pi

#4
Kind of surprisingly, from the opposite end of complexity surprise, for me was getting a Google Fi data only SIM working on an esp32 arduino type environment. Using Lilygo's T-SIM7000G and about an hour of coding got me pinging an MQTT server. Not my video, but very helpful: https://www.youtube.com/watch?v=uMXzOegaY6U

Re: Using 4G LTE wireless modems on a Raspberry Pi

#6
> A SIM card with a 4G data plan. I bought a SixFab SIM and used their monthly pay-as-you-go service for testing. You could pull out the SIM from your mobile phone (on most carriers at least) but that is a bit inconvenient as your phone won't get service until you put the SIM back in. You could also get a plan and SIM from any major carrier (e.g. AT&T, T-Mobile, Verizon in the USA)—though you have to make sure the carrier you use works with the LTE modem you have!

As an aside: You should pull out the SIM from your mobile phone anyway, and use a VPN hotspot instead (and connect your phone to that with Wi-Fi). The carriers are monitoring all of your unencrypted DNS traffic (and your unencrypted SNI traffic that starts all of your TLS/SSL connections that says to which hostname you're connecting) and selling it, alongside your phone number and name. Use a hotspot that supports a VPN so you're only sending VPN traffic across a mobile carrier network.

(This is why T-Mobile in the US is now blocking Apple's "Private Relay" encrypted service and are complaining loudly - it's costing them sniffing-data-resale revenue.)

Same goes for the Pi: make sure you run a VPN client so you're only sending encrypted traffic across the wwan0 interface. Verify with 'tcpdump -i wwan0'.

Re: Using 4G LTE wireless modems on a Raspberry Pi

#8
Note that where it says:

> A mini PCI Express 4G LTE modem. I used a Quectel EC25-A, but there are some from Sierra Wireless I've heard recommended too.

This is actually just a mini-pci-e adapter board that exposes the USB pins to the USB type A connector seen in the photo. It's not an actual pci-e bus device LTE modem. As shown in the example, it appears to the kernel as a USB device.

Re: Using 4G LTE wireless modems on a Raspberry Pi

#9

This blog post has been quite the effort—coming into it I thought I'd just learn some new things, document a simple process, and be done. But along the way I probably spent 40 hours (and counting) trying to figure out the ins-and-outs of 4G LTE modems and Linux networking when it comes to these oddball devices. I hope some parts of this post help anyone else new to LTE networking in Linux, and maybe somebody can help…

As someone who as also spent way more hours on LTE/5G modems than I want to, this post resonates with me. I also learned a few things, namely about the ECM. I will have to look into that. Thanks!

As for the firmware. It seems to just be how these companies do things, unfortunately. At work, we use modems from both Quectel and Simcom and the experience described in OP is very similar. For Simcom we have gotten access to a "secret-but-public" Onedrive share with documentation, drivers and firmware where they put up stuff sporadically. Sometimes the firmware updates even works!

I have a theory that Qualcomm who makes the chipsets used by Quectel and Simcom (at least for the 5G modems) imposes some kind of heavy NDA which prevents free distribution of firmware and documentation. Everything seems very "hush, hush" at least.

While I can't help answer your remaining questions, I can point to wiki I have found really helpful: http://trac.gateworks.com/wiki/wireless/modem

Re: Using 4G LTE wireless modems on a Raspberry Pi

#10

This blog post has been quite the effort—coming into it I thought I'd just learn some new things, document a simple process, and be done. But along the way I probably spent 40 hours (and counting) trying to figure out the ins-and-outs of 4G LTE modems and Linux networking when it comes to these oddball devices. I hope some parts of this post help anyone else new to LTE networking in Linux, and maybe somebody can help…

Have you experimented with modemmanager/networkmanager to handle the configuration of the modem? For me that has worked quite reliably across a pretty large fleet of devices with a Quectel EG25 (qmi over usb).

Regarding FW updates, have you tried opening a support ticket with Quectel? For me they have been extremely responsive and helpful, providing extra documentation on special AT commands and stuff.

Post reply on HN