Decentralizing the hotspot market: introducing btc-hotspot

With everybody busy with the bear market I thought of making an LApp for the community, is time to give back and I’d like to introduce the reader to btc-hotspot. It’s a DIY solution to create your personal hotspot system powered by bitcoin micro-payments, it leverages the lightning network and is self contained in a tiny device worth around fifty bucks.

Does it sound all buzzwords to you? Don’t worry, just think of the last time you found yourself offline because of whatever reason but still you saw a bunch of WiFi networks and wondered: can I pay the owner a little bit and use his network? Should I knock at her/his door? btc-hotspot fills the gap and allows virtually anyone to do just that, on one side you can ‘dispense’ internet traffic and on the other side the ‘clients’ will be able to give you some satoshis for it.The final UX for the client should be to connect, visit the captive portal, pay via lightning and use internet. It’s worth to note that the system is not reliant upon a central server and bitcoin is the only supported payment method, this means that to setup btc-hotspot you won’t need anyone’s approval (but please check the regulations in your country). Once installed on the hardware you can manage it via the web dashboard and create custom offers, for example one can decide how long and at what price the “clients” can use his internet connection. Although not yet implemented it is also possible to limit the speed and the overall traffic size, or even force the client to go through ads to make it a self-paid solution.

How does it work

The device of choice is the popular Raspberry Pi (v3 mod B), a general purpose SoC (System on a Chip) with integrated WiFi adapter, you can grab one for less than 50$ and it’s sold pretty much everywhere in the world. To put it simply the pi creates a new WiFi network and forwards the (authenticated) traffic to your router (via ethernet cable), meanwhile the newly created network implements a paywall that accepts bitcoin over the lightning network (BOLT#11).

There is a lightning network node (eclair) running on the device and in mainnet it will be up to the user to open a channel with a node to accept incoming payments (eventually there can be a step-by-step wizard in the admin panel to help the user).

The admin panel is available only for the owner, it’s accessible through his pre-existing network and allows to see currently connected clients, their payments, and withdraw money (on-chain too).

Representation of the wizard installing btc-hotspot on your pi.

To ease the installation process there is a one liner command that will do most of the work for you, check out the instructions and please leave some feedback if any problem occurs.

The takeaways

Btc-hotspot was born while ago as toy project and only recently has been brought up again and adapted to lightning (it used to use BIP70). The alpha release goes by default in testnet and for ease of testing (accepting incoming LN payments is a bit hard at the moment) the system connects to my testnet eclair instance, please don’t abuse it. The project is still in its infancy but the alpha release can do the basic functionalities, although with some rough edges, and is not that hard to set up. The code is released under GPLv3 and PRs are welcome (check out the repo).

A payment to the hotspot done via eclair android wallet.

Challenges

As mentioned the first version of btc-hotspot used BIP70 payment protocol and it was very convenient to let the client sign the transaction while offline, however on-chain payments can get really expensive and they are not suited for micro transactions. The lightning network comes to the rescue but has a major culprit, you must already be online to use your channels so how are you going to pay the hotspot if you’re offline? I believe there is no silver bullet (yet) to accomplish this, the solution right now is to enable a quick (~5 min) of internet usage at the moment of the payment so that the client’s lightning wallet can bring up his channels and send the satoshis to the hotspot. Another way would be to whitelist custodian wallets through which users can pay the hotspot.

Is it real? Show me the pictures!

The hamster will intercept your http calls and redirect you to the captive portal
The hotspot page welcoming newly connected clients
This is where the clients choose an offer
The invoice page
The admin panel showing the sessions and received payments

Github: https://github.com/araspitzu/btc-hotspot