Router setup

From BeeeOn
Jump to: navigation, search

Router setup

This page contains a quick guide on how to turn your router into a gateway.


  • You will need the USB gateway dongle. Ask for one on Google+ and Facebook
  • A device running on OpenWrt-based firmware (it might be possible to get other devices to work but you will have to port the packages yourself)
  • You can either compile the necessary software yourself or use the pre-copmiled binary packages from our package feeds. We currently only have package feeds for the Turris and Omnia routers from CZ.NIC (, but are planning to add package feeds for more devices soon.
  • You will need a root shell on your router, preferably via SSH

Installing beeeon-gateway from the package feed

You will need to install the beeeon-gateway application in order to be able to use your router as a gateway.

Importing certificates

Packages from our package feed are retrieved via HTTPS, but the Turris and Omnia routers do not come pre-installed with the root certificate of the CA (Let's Encrypt) we use on our site. It is therefore necessary to import the root certificates before setting up the package feed. This can be achieved with the following command:

cd /etc/ssl/certs && \
echo "-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----" \
> dstrootx3.pem && \
chmod 644 dstrootx3.pem && \
ln -s dstrootx3.pem $(openssl x509 -hash -noout -in dstrootx3.pem).0 && \
cp dstrootx3.pem ../ && \
cd - && \
echo "Certificate import OK!"

Setting up the package feed

In order to be able to install the beeeon-gateway app, you will need to add our package feed. Use the following command for Turris:

echo "src/gz beeeon" >> /etc/opkg/opkg.conf && opkg update

and the following command for Omnia:

echo "src/gz beeeon" >> /etc/opkg/opkg.conf && opkg update

Installing the application

You may now install the gateway application using the following command:

opkg install beeeon-gateway

The application will automatically start running as a service once the install is complete. You can use the procd script to control the application:

/etc/init.d/beeeon-gateway {start|stop|restart|enable|disable}

Compiling beeeon-gateway using the OpenWrt SDK

If you can't or don't want to use any of the official binary package feeds, you will have to compile all the necessary software yourself. If you want to use our source package feeds, you will need a working OpenWrt build system. You can also try to find a fork of the official OpenWrt build system for your device (a fork for Turris and Omnia is available here). This will likely be much easier to set up than the official bleeding edge version.

Importing source package feeds

You should now have a copy of the OpenWrt build system which is correctly set up to compile software for your device. Please note that all commands and examples in this section assume that your working directory is the root of the OpenWrt build system. Proceed to import our OpenWrt package feed by adding the following line to the top of the feeds.conf.default file:

src-git beeeon^$commit_hash

Most people will probably want to replace $commit_hash with the hash of the latest commit in the repository.

Updating the feeds

It is now necessary to update the package feeds and retrieve the newly added package sources. You need to clean the existing feeds and fetch all the feeds including the BeeeOn feed again.

scripts/feeds clean
scripts/feeds update -a
scripts/feeds install -a

Compiling beeeon-gateway

The recommended way to compile the gateway application is via

make menuconfig

Navigate to Extra packages and select beeeon-gateway as a modular feature (press M). You can then run make to start the build. If the build fails, try running make with V=99 to see a verbose output. If everything is successful, you should be able to find the binary .ipk packages in bin/your_architecture/packages/beeeon. You should then be able to copy those packages over to your device and install them with opkg. Please note that you will probably need to install some additional dependencies which are part of the standard OpenWrt repositories as well (opkg will display an error if you attempt to install a package without satisfying its dependencies first).