I’m building a LTE to WiFi modem for the car. There are many existing devices to do this, including your mobile phone, so why build one?
I’d like something that can receive a better signal than a mobile phone - especially as our newfound hobby of radiosonde hunting takes us further afield even more than before. And most phones these days are no longer fitted with external antenna sockets. I’d also like it to be permanently fitted into the car, so it’s just “there”. Decent WiFi that extends out of the car would be a plus too.
Here are just a few of the commercially available options for doing this that I’ve collected over the years:
On the left we have the Huawei E585, one of the first such devices. On the right, the ZTE MF70. In the middle, from top to bottom, the Huawei E3872, the Netgear Aircard 785S and the Netgear AirCard AC790S. The E585, 785S and AC790S have internal batteries, and all except the E585 have external antenna sockets.
In this post, we’ll look at why I didn’t just use one of these devices (to be fair, the AC790S still gets a bit of use outside the car) and what hardware I’m planning to build my own with.
Let’s look at the Huawei E8372 (or as Telstra calls it, the “PrePaid 4GX Broadband USB and WiFi Plus”). It’s a USB stick sized modem that broadcasts WiFi. It supports LTE Cat3, providing speeds of “up to” 150Mbit, and it broadcasts a 2.4Ghz 802.11n network.
It has external antenna sockets. It also supports LTE Band 28 (700mhz) - which is important because a lot of Telstra’s regional coverage is delivered this way.
There are a few issues that I experienced. The first of which is getting your hands on one - Telstra discontinued it inexplicably, with no similar replacement. Unable to find a store that still stocked it (it was discounted and sold out quickly), I picked one up on eBay.
And the problems began - the device gets hot fast, and the RF performance drops sharply. Speeds reduce, the connection becomes unstable and the modem randomly reboots, disconnecting all the WiFi devices. Secondly, it frequently jumps back and forward between 3G and LTE seemingly for no reason at all - switching from a perfectly good LTE connection to a congested barely working HSDPA one. I’d lock it to LTE, but there’s no option to do that in the settings.
There’s also some things that are just plain wrong in the firmware. “You can’t put that character in the SSID” is irritating. But stranger still, WiFi channel selection would only allow channels 1-7 - not the usual “we forgot you’re not in the US” 1-11, or the ETSI standard 1-13. And the Telstra firmware for it has the drop-down menu options for allowing >5 devices to connect removed (web inspector will let you enable them again…).
The WiFi also didn’t go far either - it seemed to have a range of about 3-5m at the best of times. This would be acceptable for a purely in-car device, but I’d at least like it to extend slightly outside the car.
At around the same time, I was given a Netgear AC790S. This device supports Cat6 LTE (300mbit), has two external antenna sockets, simultaneous dual-band WiFi and an internal battery. It runs quite well in portable operation and doesn’t have the stability or speed problems of the E8372. It sounds perfect, but… the device only sometimes automatically switches on when plugged into power.
It doesn’t have any facility to turn off when the power is removed. When it goes completely flat, sometimes removing the battery and re-inserting it is required before it’ll power on again. So I can’t just connect it to a USB socket in the car and forget about it.
There’s also the industrial options - the Netcomm NTC-140W for one. This has external antenna sockets, power control, two ethernet sockets, and is designed for car mounting. However, the price tag is a little steep - it’s $650.
Looks OK and I’m sure it would be more reliable. But it’s expensive, and has no band 28…
Build your own…
So I guess I’m going to build my own. Searching for a decent USB 4G modem, I found very little. The Huawei E8372 will act as a USB modem but you can’t even disable the inbuilt access point (easily, anyway). Can’t I buy just a modem?
I ended up buying a Sierra Wireless AirPrime MC7430, which is a mini-PCIe 4G modem that supports Band 28. It’s actually got the same LTE chipset as the Netgear AC790s. But it wasn’t so cheap - about US$130. Considering I got the Netgear for free, it does seem a bit annoying to pay more because I want less hardware.
Now, what do I plug it into? Normally the standard answer is the Raspberry Pi due to its low price, common availability and wide software support. But hard shutdowns and EMI are common in an automotive environment, both of which a Pi won’t like. More importantly, the lack of a PCIe socket means you miss out on nearly all of the better options for wireless cards, and the USB bus can be a bit unreliable.
I was presented with a Mikrotik RB2011UiAS to use, which seems like a good device. It boots quickly, it’s stable and is generally pretty reliable, it’ll run happily off an automotive DC supply, it has a decent WiFi radio onboard - an AR9344 802.11n chip with a front end capable of 30dbm (1000mw). It does not, however, have a miniPCI-e socket for the modem but as the modem actually uses USB signalling not PCIe, I can use a USB adaptor to connect the modem to the front panel USB port.
The RB2011’s WiFi antennas are non-removable… or are they? Opening the case, and usage of a little force does remove them from the case. They’re plugged into the board with MMCX connectors. Two MMCX to RP-SMA pigtails later, and it now has RP-SMA sockets. Because the router itself will be buried in the car, I bought two glass-mount wifi antennas to connect - this should ensure decent signal outside the car.
It’s not my car, so there were requirements. No drilling holes in the outside of the car, for one. This necessitates the usage of through-glass antennas for the LTE side (unless you like using magmounts with thin coax that gets repeatedly shut in a door until it fails shorted).
Through-glass antennas never perform amazingly well, but I figured if anyone could make one work passable it’d be RFI. I purchased two of the XG884 units which claim support for 900/1800/2100mhz. They don’t officially support 700mhz, but we should at least pick up something - and it should still be better than using the device’s internal antennas.
These come with 5m RG-58 patch leads with a SMA end for the antenna part that goes through the window. The other end’s a FME connector which is usually what you want (I have FME to TS9 pigtails that I ordered for connecting the Huawei E8372 up to said antennas). However the mPCI-e modem has U.FL connectors on it. I could use up U.FL to FME pigtails, but in the end I decided to just buy SMA to SMA cable in the actual length required, and use a SMA pigtail to the card. Cables are lossy, and if you can avoid having them too long, you should do so. Tanrp RF Technology on AliExpress made them in a custom length for me.
Not anybody’s ideal VSWR chart… but still better than an antenna inside the car. A VSWR of 2.0 means we’re losing about 12% of the signal from it being reflected back into the radio. This says nothing about resistive losses in the antenna and hence how much is actually being radiated - there’s probably also a bunch lost from the trip through the glass…
I could just connect the Mikrotik’s power input to the car’s accessory circuit. But another “nice to have”, would be that if you are connected when the car is turned off, the modem should continue operating. But this should preferably be on its own battery to avoid running the car flat.
I found the PicoUPS-120-ATV which will charge and switch to a 12v lead acid battery. It charges when the input voltage is greater than 13v, and runs off the battery when the input voltage is lower than the battery voltage.
Annoyingly, this model is discontinued, and the newer replacement for it won’t charge if provided less than 15v - making it much less useful for in-car applications. (Car power is typically 13.8v with the engine running, and ~12.6v with it not.)
Fortunately, eBay came to the rescue again, and I found one. Paired with a 9AH SLA from Jaycar, this looks like it will do the job.
But how do I shut the router down when it’s no longer needed? Some of the LEDs on the Mikrotik router can be user controlled, and can be scripted to change when a WiFi device is connected, or has recently been connected. The LED should then be able to be desoldered from the board, and I’ll solder a relay breakout to it to switch off battery power.
I was initially thinking of doing this with DTR on the serial port, but the RB2011 only has TX/RX.
(I really wish Mikrotik would stick a relay or two on their boards and have a few GPIOs on the back - it’d be so handy…)
When the car power is on, the device will run regardless of whether the battery is connected, because the PicoUPS is passing through input power, but when on battery, opening the relay will disconnect the battery and shut the router down.
The next step is to start building the device, and we’ll see how it all goes in practice…