Some Bits: Nelson's log

Unifi LTE notes

Update (Dec 2021): do not buy this product. It does not work well; there are numerous problems with the failover. And at least in my case, the cell service was terrible. Worse, Ubiquiti’s management of it is terrible. The web UI for cancelling the subscription is broken. And once my Unifi network saw the Unifi LTE once it will not let go of it. I keep finding vestiges of it in the management console (including a popup message every single page load) and cannot figure out how to remove it. (If this happens to you try the classic console. Apparently this is yet another missing feature in the new UI.) UniFi LTE is a bad product.

I finally have a home network cellular backup option; I bought a UniFi LTE. This integrates with the rest of a Ubiquiti home network via their UniFi platform to give seamless failover to an AT&T cell tower when your main ISP is down. Price is $200, $15/mo, $10/GB. Right now there’s a sale where it’s $5/mo and $5/GB until May 2021; kinda hoping they keep it that way, we’ll see.

The bad

I’ll get the bad out of the way first. The LTE device is AT&T only, with a hardcoded SIM. You cannot use any other network provider and you must buy your contract via Ubiquiti on AT&T. Their network is high quality, but if you’re using a lot of LTE data, AT&T is expensive. My intention is to only use this as failover, hopefully never more than a few GB a month, so I’m willing to accept this limit. It’s a dumb limit though. If you want more flexibility there are a variety of LTE modems sold as hotspots. Also a bunch of routers have LTE failover built in, particularly things meant for installation in trucks and RVs.

The other bad is the UniFi LTE is definitely a Ubiquiti proprietary product. It will only work if you have one of their USG or Dream Machine routers. Many routers (including those two) support a more generic WAN failover, where you have a second WAN port and load balancing or failover rules to use it. The UniFi LTE is not that. In fact you don’t plug it into your router at all, it can go anywhere on your LAN and looks like a local ethernet device. (The docs say the router “makes a tunnel” to the LTE when it needs to route that way.)

One final bad: the numbskulls at Ubiquiti failed to include a power adapter. $200 and there was no way to turn the thing on. The docs are cryptic saying “use a UniFi switch to power it”. Digging deeper and I see the UniFi LTE is an 802.3at device; most UniFi switches that supply POE are 802.3af, a lower power standard. What’s weird is the LTE device only needs 8.5W, well within the capabilities of 802.3af, and some reports are that the device works on 802.3af. I didn’t chance it. (It does have the ability to pass another 8.5W through to a second POE port, that’d require more power than 802.3af requires, but it’s optional.)

Anyway this $110 8 port switch is the cheapest thing I could find that Ubiquiti sells that provides 802.3at. I was stubborn and didn’t want to buy a switch, particularly since I’m not sure where I’m going to locate the LTE modem, so I bought a $20 Shenzen special 802.3at injector instead. It seems to work.

The good

The reason I put up with the bad is I wanted a no nonsense device with no confusion, something that would Just Work. And so far so good. I plugged it in and had it up and running within 5 minutes, including buying the contract service. The only fiddling I had to do is I was required to enable “remote management” on my USG; that’s some scary thing where your router state is accessible via the Internet with a password. I don’t love that idea but I relented.

I’m grateful for this simplicity. Doing it myself with an LTE modem would require researching a suitable modem, picking a carrier, picking a data plan for that carrier. Then getting it all working first on a laptop (for testing). And only then, plugging it in to the WAN port on my router and seeing if the failover actually worked. Probably in a way that violated the data contract I signed up for. Yuck. I’m happy I just bought my way out of all that effort.

Another bit of good; judging by the device’s shape and performance it has a pretty serious antenna in it. Ubiquiti got their start making excellent WiFi antennas and I’m hoping that extends to LTE. There’s also a coax connector for an external antenna but I think I’m unlikely to do better unless I put up a mast.

In practice

Like I said, I got it running with no stress at all. It seems to work.

There’s very little configuration on the device. About your only choice is the max data cap (3 GB / month by default) so you don’t get hit with an ugly bill if something goes wrong. I think I saw some reference to being able to set policy so some devices don’t get to use the cellular backup, probably involving a VLAN. Need to look into that.

I simulated a failure by unplugging my normal ISP (the simplest possible failure; detecting a flaky ISP is harder). The failover happened in under 15 seconds. The LTE connection was OK for this area: 14/1 Mbps and somewhat reliable and with lower latency than expected. (My experiments with a phone as hotspot are all over the place but often much worse). It switched back to the ISP when I plugged it back in, but took a minute or two. I did get email alerts about the outage but there was no obvious view on the Controller dashboard about the failover (there is one hidden status message). Anyway, it basically worked.

I’ve also had two unplanned failovers, both lasting less than a minute. I was away from the computer at the time so I didn’t notice. My ISP sometimes has hiccups where all my sessions are terminated and it’s out for a few seconds, I wonder if that triggered the failover? I don’t know that I mind exactly, but it’s something to keep an eye on.

I’ve read some complaints that networks were failing over to LTE, maybe on false pretenses, and then never recovering back to the preferred ISP. I don’t think I’ve seen that behavior yet. I did get a failure where I unplugged the LTE while I’d failed over to it. I then plugged my regular ISP back in expecting the network to go back to it. But it never did. I finally powered the router off and on and after 5 minutes (!) my network came back.

More generally I just wish the LTE failover state were much more prominent in the dashboard. Also that there be a big toggle switch I could hit manually to swap WANs.

Antenna placement

What I really want is a tool to help me better situate the LTE antenna. I can’t find one; I’ve asked here. There are some diagnostics, including enough signal strength readings that I can probably experiment with different placements but there’s no live tool guiding me which direction to point in or anything. I think their long distance WiFi link utilities do have that.

I’m astonished at that “Good signal strength” measurement; we have terrible reception here at my house. Phones get 0 or 1 bars. All I did was put the antenna in a window pointed roughly towards where I think a tower is.

What do all those numbers mean? This article was helpful. The key number there is the RSRQ or “Reference Signal Received Quality”; it’s sort of like SNR but for multi-channel connections. That -11dB qualifies for “good”. The RSRP number is also useful, it’s the raw signal strength for a single channel and -115 is not so good. Band B12 is a 700MHz frequency.

Annoyingly, I can’t find a time series graph of the history of these readings. The Performance graph shows dropped packets, etc so that may be helpful but there’s no simple graph of RSRQ.

As for where the towers are, this article has lots of useful advice. Looking on CellMapper I think I found out which cell tower I’m connected to; there’s a A3E49 on the map north of me and the cell ID (blanked above) I have is 0A3E4911. The 11 stands for the cell to the south so that makes sense too. That tower is further away from me than I’d like but is way up high on a hill. Most of the other AT&T towers are lower, along the highway, which seems dumb. I need to do further experimentation with my phone as a signal tester.

I tried various locations in my house for the antenna. Some not very reliable data:

  • Office window: 0A3E4911, B12 RSRQ -12, RSRP -112 to -115
  • Office closet: 0A3E4911, B12, RSRQ -9 to -13, RSRP -114 to -125
  • Garage pointing north: 0A3E490A, B2, RSRQ -13 to -14, RSRP -119 to -120.
  • Garage point north after use: 0A3E4911, B12, RSRQ -10

Interesting the garage location uses a different cell (same tower) and band. The B12 bands are in the 700MHz spectrum, B2 is in 1900. I think that means the B2 option could be higher bandwidth. However it only stayed connected on B2 until I tried to use it, at which point it switched over to the other cell on B12. I don’t have a clear line of sight (including a metal garage door, among other things) so I suspect 700MHz is the better choice.

Conclusion

I’m pretty happy with the UniFi LTE, particularly at the current $5/GB sale price. It worked right out of the box once I found a power adapter for it. Now I need to run it for a few months and see what happens in practice.

Configuring failover behavior

Some extra notes written after the main piece.

After 48 hours I’m annoyed that the LTE is being failed over to for 5-15 seconds at a time. It’s happened maybe 8 times. These all might be legitimate primary failures, my ISP is flaky, but then it seems disruptive to fully change the routes since that terminates all active TCP connections. I’d rather the thing not respond to failures so quickly.

There’s very little docs on failover and no config options. I did find this discussion thread which says

It tests whether it can ping out via that interface to ping.ubnt.com. So it will detect a failure upstream. It takes a little longer to failover to not be overly-touchy, it’s immediate when you lose link, 3 failed monitoring checks when link is still present (which is, at most, 40 seconds from failure to failover).

Create an upstream failure, and watch “show load-balance watchdog” via SSH to USG. After 10 seconds you should see “run fails” increment to 1/3, then later 2/3, later 3/3 and it’ll fail over at 3/3.

I wonder if that’s still true (this was late 2019). It’s a reasonable heuristic! And that show command shows “run fails: 0/3” which suggests 3 is still the threshold.

Group wan_failover
eth0
status: Running
pings: 3160
fails: 1
run fails: 0/3
route drops: 4
ping gateway: ping.ubnt.com - REACHABLE
last route drop : Sat Sep 19 22:52:34 2020
last route recover: Sat Sep 19 22:53:07 2020

tun900
status: Running
failover-only mode
pings: 120
fails: 1
run fails: 0/3
route drops: 0
ping gateway: ping.ubnt.com - REACHABLE

This gives me a way to monitor and/or simulate their own failover algorithm too, I can at least verify it’s doing what it thinks it’s doing.

I think I found the config JSON on the USG router that controls this too. Following these instructions about config files I ran mca-ctrl -t dump-cfg to inspect the config. Among other things I found this block:

"load-balance": {
  "group": {
    "wan_failover": {
      "flush-on-active": "enable",
      "interface": {
        "eth0": {
          "route-test": {
            "initial-delay": "20",
            "interval": "10"
          }
        },
        "tun900": {
          "failover-only": "''",
          "route-test": {
            "initial-delay": "60",
            "interval": "600"
          }
        }
     },
     "lb-local": "enable",
     "lb-local-metric-change": "enable",
     "sticky": {
        "dest-addr": "enable",
        "dest-port": "enable",
        "source-addr": "enable"
     },
     "transition-script": "/config/scripts/wan-event-report.sh"

Updates and failures

Last night, after a couple of days of installation, we had the failure mode I was afraid of. The network failed over to the LTE at 9:30pm and didn’t switch back. Something else happened at 2:10am and again at 2:30am but it didn’t switch back to the ISP. Usually these last just a few seconds and it switches back to my ISP. This morning we were still on the LTE even though the ISP link was fine. Had to unplug the LTE and then reboot the router to get the thing back.

The main thing I’m seeing are clusters of 4 events; I’m thinking of these as failovers in response to a temporary short ISP outage.

  1. 15:48:06 LTE to state active
  2. 15:48:06 ISP to state inactive
  3. 15:48:40 LTE to state failover
  4. 15:48:40 ISP to state active

That’s what a normal working failover looks like. Not thrilled about having so many of them, but it seems to work. Here’s what happened last night

  1. 21:33:09 ISP to state inactive
  2. 21:33:10 LTE to state active
  3. 21:33:43 LTE to state failover
  4. 21:33:43 ISP to state active
  5. 02:09:39 LTE to state active
  6. 02:09:39 ISP to state inactive
  7. 02:30:21 LTE to state failover

That’s the event report.

First thing to note is that it was the 21:33 failover that actually started the problem. Even though events 3 and 4 make it look like the ISP should be active (not the LTE), I have independent logs of IP addresses that show me my home network was on LTE since 21:33. So that’s weird. The other weird thing about the 21:33 logs is that the events are backwards from normal; ISP to inactive first, then LTE to active. I don’t know how Unifi publishes events though so I’m not sure event ordering is strictly guaranteed. I suspect it is though and that timestamp difference (:09 vs :10) is evocative.

Then there’s the 02:09 events. No idea what those are about, it looks incomplete. I wonder if the router was using LTE but the watchdog infrastructure thought it was on the ISP? Whatever the case it’s a failure.

Ubiquiti is usually more reliable than this. I’m annoyed.