Althea Development Update #78: Building a phone client

It would be great for people to be able to buy a connection directly via their phone. You can’t really compete on price with something people already own.

Althea Development Update #78: Building a phone client

In the developing world smart phones are the ruling platform. Home internet and by extension home routers as a delivery method for that internet hardly exist.

An EdgerouterX running Althea starting up

Althea maintains an incredibly low entry price for home routers, on the order of $20. We’ve worked hard to make this low entry price possible partly because we have a aspirations of introducing much more affordable home internet into some developing markets.

But it would still be great for people to be able to buy a connection directly via their phone. You can’t really compete on price with something people already own.

With this in mind we’ve started an Althea android app.

How it’s structured code wise is pretty interesting, we’ve pulled in the userspace encryption implementation from WireGuard android into our own app. This provides the encryption we need to connect to Althea exit servers since we just use a standard WireGuard tunnel internally.

This means that we don’t have to re-do all the hard work of creating a WireGuard for android client in the first place and can take advantage of the excellent engineering common to all official WireGuard implementations.

Next up we implement a stub client of the babel routing protocol I say stub because it is very much not a complete implementation and that’s intentional. This client has no support for advertising arbitrary routes or routing packets, this is intentional.

Phone WiFi systems are too weak to effectively provide internet service in a peer to peer fashion. Not to mention that Android is a pretty restrictive development environment when it comes to things like modifying WiFi and Bluetooth from inside an app. This is understandable due to the tracking possibilities tracking people by checking nearby WiFi networks is very common but unfortunate if you would like to have phones dynamically connect to each other without an existing network being shared.

By restricting the Althea phone client to ‘bandwidth buyer only’ we can get the engineering down to a manageable scope without too much trouble.

The source code can be found here and I encourage everyone to follow along with development. I plan to have a very rough proof of concept (hard coded user credentials) ready before Turkey day and then flesh out the UI and user experience during the first week or two of December.

Also expect an update tracking some of the difficulties of developing a networking application on Android, so far it’s been an experience full of pitfalls and unexpected behaviour.

What’s New in Beta 10 RC4

  • Added toggle to ease scd -> mcd transition for the xdai bridge.
  • Added Wyre integration
  • Added Lagos exit
  • Added the ability to remotely change release feeds of routers so that releases don't have to be global
  • Compressed logging saves bandwidth when metrics collection is enabled, 95-99% improvement
  • Allow the free tier to be 'router only' when users haven't paid depending on organizer configuration
  • Change Oracle behaviour so that a user can refuse price oracle updates and still receive other settings updates


Beta 10 originally had ambitions of including IPv6 support, which is <languishing in this pull request> right now due to lack of time to properly test. What did end up making it in are features focused on improving the developing world experience in line with our Abuja deployment and a few quality of life updates for existing users.

Logging bandwidth isn’t really a problem in the developed world as it’s only significant for relays but for deployments with more restricted bandwidth you really need to make every byte count.

Likewise the default ‘free-tier’ of 1mbps is a practical solution in markets where streaming is popular but as we try and serve a more diverse group of people it’s hardly a one size fits all. This adds a toggle option for specific networks where free bandwidth isn’t a practical choice.

The other two major changes that made it into this release are to facilitate the change to Multi-collateral DAI and allow users in the United States to buy Ethereum using a credit card directly from the router. Wyre (the payment processor that allows this) is still in the trial phase with us right now but we’re optimistic that this will make things even more seamless.