DIY: Multilink-3G-Gateway

Avatar on twitter, facebook, … As I’m usually at least once per month doing standby for the services we run at my employer’s place, I depend on access — and I prefer to have it rather reliable anywhere, if possible.
I do travel by train a lot these days, twice per week Güterloh – Berlin – Gütersloh, which takles about 3 hours per trip.

And since Deutsche Bahn as of now neglected the need of buisiness people in regards of Internet connectivity between Köln and Berlin (which is the relation of the trains I take), I’m stuck with trying to get GSM signals while speeding at up to 250 km/h trough what I’d call a diaspora of mobile Internet. While the ICE is equipped with GSM repeaters (not really sure if they actually work with UMTS’ frequencies as well) that cater at least for the networks of Deutsche Telekom (»D1«) and Vodafone (»D2«), GSM towers between Hannover and Berlin seem to be even less frequent than between Bielefeld and Hannover, where connectivity sometimes already is an issue.
I always thought about lining my access to D1 and D2 and maybe even o2 together to form a »best effort« access, regardless of the underlying network; just recently, @homofaber voiced a request for something similar on twitter, and I wrote down my ideas on that.

I am using OLSR for years now to link my home base(s) to the Internet, running OLSR on top of (Open)VPN links. OLRD was made for lossy wireless networks, recalculating the next hop based on a contemporary per-node view of the whole (mesh) network — constantly, based on active probes. But as any two nodes linked by more than one path can be seen as a tiny mesh, I still think this combination is quite cool — and it works well for quite some years now on backing up my main DSL connection. And as I recently got hold of two TP-Link MR-3020, cheap (<30,– EUR), OpenWRT-capable and USB-powered »3G Accesspoints« (which lack actual 3G hardware but expect that to be added via USB), I started this little project …
Last Friday I got the prototype going, which as of now consists of:

i. e. about 340,– EUR for a dynamic routing dual-uplink mobile accesspoint. Oops, not as cheap as planned :-)
So, why this setup? Well, the flash on the 3020 is tight; OpenVPN and support for 3G modems don’t fit into the available space with stock OpenWRT images, and I’m not sure if that can be changed by using a customized version of it. But the 3020 is one of the few hackable devices I know of that are run off USB power — and for mobile use, that 5000 mAh battery supplying 5V USB at up to 700 mA is rather nice. Since I already had the mobile 3G hotspots (one from my employer, one – actually, two – purchased by myself) and use them for standby duty already, utilizing them seemed to be a straight forward approach (even if that means I need 2 USB-chargers for Micro-USB and one for Mini-USB – the battery and the MR3020 use Mini – to power/charge the whole bunch). The WiFi-stick is needed as the Atheros radio/it’s current Linux drivers can’t do multipe times STA (station mode); in theory it at least should be capable of doing once STA and multiple times AP (access point mode), and previously, with the »madwifi« drivers for Atheros it actually worked. But for me, it did not work with bleeding edge OpenWRT »Attitude Adjustment« and »mac80211« at all, that’s why I use another MR3020, connected by a ethernet cable to the first, as the access point … I tried an unpowered USB hub and two TL-WN821N, but that’s too much for the 3020, it will just drop, reconnect, drop that hub and it’s devices. Haven’t found an USB-powered USB hub yet – and I don’t have spare sockets on my USB battery either.
So, while it works, it’s a bit experimental,

best to hide it in your backpack instead of lodging it onto the table in the train :-) As for 5% packetloss between Hannover and Bielefeld (about 100 km), this might be a bot too good, as the AP 3020 is actually using a OpenVPN-over-TCP tunnel — I initially set it up as an AP to run virtually anywhere after plugging it onto any network (trying proxies and using the HTTPS port in general). Thus, some of the packets might got redelivered via TCP-retransmissions of OpenVPN paylload; I’ll reconfigure it to use plain UDP.

I’m currently looking into using a Seagte Dockstar instead of both 3020, using either 3 WiFi sticks to create one AP and two STA devices or even go to one WiFi and two/three 3G/4G USB modems; funnily enough, you can power up a Dockstar by providing USB power instead of connecting in it’s 12V 2A power supply. Not sure what happens when using multiple USB devices; but the Dockstar ad least has enough flash (and RAM) for a more sophisticated setup :-)
So, whatch this space for future updates; I’d love to see how LTE would work here, especially since at least with D1, you shall be able to connect to urban 800 MHz LTE rollouts (where LTE is used instead of DSL) now, which might be better accessible from the ICE that the UMTS rollouts. So, anyone out there wanting to sponsor an LTE stick (or lend it for 4-8 weeks), please drop me a line :-)