In This Post...
We have a cell phone and a Mifi device we use to connect to our laptops for fast internet in the van (thanks to some speed-boosting tricks). But staying under the data caps for each was challenging, so we’d try to connect to Wifi connections whenever we could. But juggling all of this quickly became a problem (before I implemented “internet bonding”) because we each have a laptop, plus there is a small computer in the van automatically recording data about our travels.
That small computer ended up being the solution. I turned it into a Raspberry Pi access point (wifi hotspot) which is smart enough to switch between (or even combine) internet connections. At only $27, it provided an extremely cost-effective solution to an annoying problem. Plus, it’s simple enough to do that even if you’ve never heard of “Linux” or “Raspberry Pi,” you can still complete this tutorial in about an hour. At the end of this post, you’ll find some open-source tools to help set everything up.
Why Not a Dual-SIM Device?
- Can combine more than two internet connections.
- Can use your existing phones’ data (instead of dedicated SIM cards).
- Can combine things other than cellular connections, like Wifi or satellite connections.
- Can intelligently limit data to not go over any connection’s cap.
- Costs hundreds of dollars less.
Building a simple version of a Raspberry Pi access point is described in the official documentation. Unfortunately, that documentation may be a bit complicated for those who are not advanced Linux users.
Multiple Connections with Internet Bonding
Even the cheapest, tiniest computers (like a Raspberry Pi Zero W kit for $27) comes with a Wifi card and 4+ USB ports.
The idea behind using a Raspberry Pi for internet bonding is simple:
- Each one of the USB ports can connect to the internet via:
- Tethering via one of our phones.
- Connecting to a Mifi.
- Connecting to a public Wifi network via a USB dongle.
- … or anything else.
- The “preferred” internet connection is shared via a WiFi access point.
- The fastest connection can be chosen.
- Data caps can be applied to each connection.
- … or they can be combined together for faster speeds.
This last option is known as “internet bonding” or “connection bonding.” Each of the different connections are combined together into a single, virtual connection. This combines the speeds, as much as possible, from each connection to create one faster than any of the individual connections.
You’ll notice I mentioned using USB instead of using a Mifi or phone’s “WiFi Hotspot” feature. This is generally, in my experience, significantly faster — especially as you try download many things simultaneously.
A big advantage for us is also the fact that our solution automatically and intelligently switches between the connections, yet the internal WiFi network remains the same. So our computers stay connected to the same van network and don’t care about which internet connection is used.
Related: Vanlife and RV Internet
Free (but Complicated) Solution
The first approach I’ll describe is free, but limited. I ultimately ended up abandoning it for the paid solution, below, due to the headaches involved.
If you’re not technically oriented and/or a little masochistic, I’d recommend you jump to the next section.
First, I set up a Raspberry Pi to create a wireless access point for a single internet connection. I have a Verizon Jetpack with “WiFi mode” turned off, instead plugged directly into the Raspberry Pi’s USB port. I followed the official documentation, except replacing
eth0 for the interface of the Jetpack. The Raspberry Pi access point was now active, but only supported that one connection.
If you add more devices (connections), you can switch between them by replacing the connection on the bridge. For example,
sudo brctl delif br0 eth1 and
sudo brctl addif br0 eth2. Since the WiFi access point is sharing the data from the bridge, the new interface will be used for the internet connection.
This can be automated by running a simple shell script that runs indefinitely. Here’s an example I had from my expermientation, but you should not expect this to “just work” (you’ll need to tweak it for your needs). It worked, but still had the following problems:
- Does not pick the best internet connection by speed.
- Cannot limit data based upon caps.
- Will not use internet bonding.
The first two are theoretically solvable without too much effort. But it’s at this point that I came upon a much easier solution…
Easy (but Paid) Solution
I use a tool called Speedify for internet bonding, using their instructions to install on a Raspberry Pi. The Individual plan currently costs $47.88 per year. I am not affiliated with them in any way, and do not receive any sort of kickback for recommending the tool. I just liked it because it was easy to set up and provided most of the features I described above right out-of-the-box.
As of this writing, there are a couple problems with their documentation for the Raspberry Pi running Raspbian Buster. First, I had to follow these instructions to install Network Manager. The recommended config command
sudo raspi-config nonint set_net_names 1did not work, but instead I had to modify the nameserver in
In addition, Speedify has a command line tool (speedify_cli) which I use for automation with my home-assistant Spellbook Kiosk and other purposes. There was just one thing left that Speedify did not solve…
Auto-Connecting to a WiFi Network
In the post on van/RV internet, I explained how we find WiFi networks in order to not use too much cellular data. I have Speedify configured to use an external USB WiFi dongle as its “primary” connection (with the tethering options set to “secondary” and “backup,” so they’re not used unless necessary.
One advantage I didn’t mention about Speedify above is that it comes with a VPN (which is a good idea to use when on the road). Speedify provides this so that you can switch between connections without disrupting a download. However, it also means that open WiFi networks are relatively more secure because the data is being transmitted in an encrypted manner. This makes it reasonable to automatically connect to open WiFi networks to preserve the cellular data.
I’ve created this open-source project to help. The effect is that, if there’s an open WiFi network available (and you’ve not explicitly connected to another network) you’ll be automatically connected. This maximizes the time spent on WiFi instead of using cellular data.
Finally, I wrote some code (coming soon in another post…) that proxies all the data into our Home Assistant running in the same Raspberry Pi. This lets us see the connection quality, status, and data usage of each of the connections: