internet

Using 4G LTE wireless modems on a Raspberry Pi

For a recent project, I needed to add cellular connectivity to a Raspberry Pi (actually, an entire cluster... but that's a story for a future time!).

Raspberry Pi 4 model B with 4G LTE wireless Quectel modem and antenna and USB adapter

I figured I'd document the process in this blog post so people who follow in my footsteps don't need to spend quite as much time researching. This post is the culmination of 40+ hours of reading, testing, and head-scratching.

There doesn't seem to be any good central resource for "4G LTE and Linux" out there, just a thousand posts about the ABC's of getting an Internet connection working through a 4G modem—but with precious little explanation about why or how it works. (Or why someone should care about random terms like PPP, ECM, QMI, or MBIM, or why someone would choose qmi_wwan over cdc_ether, or ... I could go on).

Hopefully you can learn something from my notes. Or point out places where I'm glaringly wrong :)

SpaceX's Starlink Review - Four months in

SpaceX's Starlink internet service uses satellites in low-earth orbit to provide high-speed Internet to underserved parts of the world, especially places without easy access to cable or fiber.

Jeff Geerling with SpaceX Starlink Dishy

SpaceX's Starlink beta opened up in my area, so I installed Dishy—that's the nickname for the large white satellite dish above—and I've been testing it and comparing it to my Cable internet.

I have Raspberry Pis monitoring my Internet—one on Starlink, and one on Spectrum. And I also have a power monitor measuring power usage. And I've tracked everything since day one to see if weather like snow and thunderstorms affect service, and how Starlink compares to Cable.

Here's the bottom line: Most of the time, I couldn't tell I was using Starlink. And that's good. Everything felt the same.

Monitor your Internet with a Raspberry Pi

Internet Service Providers are almost universally despised. They've pushed for the FCC to continue defining 25 Mbps as "high use" broadband, and on top of that they overstate the quality of service they provide. A recently-released map of broadband availability in the US paints a pretty dire picture:

USA map showing areas with limited high speed broadband availability

Here in St. Louis—where I guess I should count my lucky stars we have 'high use' broadband available—I have only two options: I can get 'gigabit' cable Internet from Spectrum, or 75 megabit DSL from AT&T.

That's it.

And you're probably thinking, "Gigabit Internet is great, stop complaining!"

Setting up a Raspberry Pi with 2 Network Interfaces as a very simple router

I needed a very basic 'Internet sharing' router setup with one of my Raspberry Pis, and I thought I'd document the setup process here in case I need to do it again.

I should note that for more complex use cases, or where you really need to worry about security and performance, you should use something like OpenWRT, pfSense, or VyOS—or just buy a decent out-of-the-box router!

Seeed Studios Raspberry Pi Compute Module 4 Router Board

But I needed a super-simple router setup for some testing (seriously... look at the picture—the thing's about to fall off my desk!), and I had two network interfaces on a Raspberry Pi running the 64-bit build of Raspberry Pi OS. These instructions work on that OS, as well as Debian, Ubuntu, and derivative distros.

Using the Shelly Plug to monitor Starlink's power consumption

I recently wrote about using a Raspberry Pi to remotely monitor an Internet connection, and in my case, to monitor Starlink (SpaceX's satellite Internet service).

Power Consumption Grafana dashboard with Shelly Plug US power usage coming through

One other important thing I wanted to monitor was how much power Starlink used over time, and I was considering just manually taking a reading off my Kill-A-Watt every morning, but that's boring. And not very accurate since it's one point in time per day.

Shelly Plug US

Setting up Starlink, SpaceX's Satellite Internet

Starlink Dishy and box from SpaceX

In March, I got an email from SpaceX saying Starlink was available at my address, and I could pre-order. I paid $500 for the equipment, plus $25 for a Volcano Roof Mount, and $99 for the first month of service, and a few weeks later, I got the kit you see in the image above.

I was a little too excited about getting Starlink, though, because I realized after I started looking for mounting locations that Starlink needed a 100° view of the northern sky, and my house is literally surrounded by 70-80 ft trees.

So I thought, why not let a cousin who lives out in a rural area try it out while I figure out what to do about mounting 'Dishy' (a common nickname for the Starlink satellite dish) on my own house?

After all, my cousin Annie, who lives in Jonesburg, MO, currently pays for the maximum available DSL plan to her farm (Haarmann Farms), and gets a measly 5 Mbps down, and 0.46 Mbps up—on a good day:

Setting up a Pi for remote Internet connection monitoring

So... recently I acquired a Starlink 'Dishy', and I'm going to be installing it at a rural location near where I live, but since it's a bit of a drive to get to it, I wanted to set up a Raspberry Pi to monitor the Starlink connection quality over time.

Internet monitoring dashboard in Grafana

I know the Starlink app has its own monitoring, but I like to have my own fancy independent monitoring in place too.

The wrinkle with a Starlink-based Internet connection, though, is that SpaceX is using Carrier-Grade NAT (CGNAT) on their network, so there won't be any kind of IPv4 address I could reach the Pi at, nor does SpaceX yet have IPv6 set up in their network.

So to make remote access possible, I would have to find a way to have the Pi reach out to one of my servers with a persistent connection, then I could 'tunnel' through that server from other locations to reach the Pi.

SSH into a Raspberry Pi with only a network cable using OS X's 'Internet Sharing'

Recently, I found myself in a situation where I had to connect to a Raspberry Pi to set it up for a presentation, but I did not have:

  • A keyboard and/or other input device to use to type anything into the Pi
  • An HDMI cable to connect the Pi to a display so I could view anything on the Pi
  • A microSD card reader so I could modify the contents of the Pi's microSD card

Because of this, none of the standard methods of setting a static IP address, reconfiguring the Pi's WiFi configuration, or logging in on the Pi itself to find it's IP address or set things up so I could connect over a local network would work.

I remembered that Mac OS X handily includes an 'Internet Sharing' feature, which sets up a bridged network interface so your Mac is effectively a router and DHCP server to any devices connected to the shared interface.

Pope exhorts us to reflect in silence during 2012 Communications Day

Pope Benedict XVI's message for the 46th annual World Communications Day has been published on the Vatican website. We learned earlier that his theme for this year is silence, and the message is brief and impactful.

One passage that stood out in my reading was the following (emphasis mine):

Attention should be paid to the various types of websites, applications and social networks which can help people today to find time for reflection and authentic questioning, as well as making space for silence and occasions for prayer, meditation or sharing of the word of God. In concise phrases, often no longer than a verse from the Bible, profound thoughts can be communicated, as long as those taking part in the conversation do not neglect to cultivate their own inner lives.

Drupal 7 Released - The World's Best Content Management System

Get Started with Drupal 7

Today, January 5, Drupal version 7.0 was released (download Drupal here). Drupal 7 release parties will be held worldwide on January 7 (which also happens to be my birthday - yay!).

Congratulations to the team of almost 1,000 developers who helped make Drupal 7 a reality, and congratulations to Dries Buytaert, the founder of Drupal, and webchick, the person who shepherded (and continues herding) the community as the Drupal 7 core maintainer!