Routour🗼: Building the Ultimate Travel Router

6 minute read

Published:

Recently I finished the project Routour🗼, a powerful travel router that is compact yet supports many features with components including Raspberry Pi CM4, Intel BE200 WiFi card, DeskPi Mini Cube, and RaspAP with Debian. In this post, I am documenting the entire process since I believe this would help someone in the future. This includes the hardware modifications and software configurations needed to achieve a feature-rich yet portable network router.

Features

Let’s start with the features first.

  • Full router functionalities with dual-band (2.4GHz and 5GHz) with gigabit ethernet
  • WiFi repeater capabilities (WiFi Client mode and AP mode at once)
  • Ability to host VPN, adblocking, and Tailscale
  • Ability to run media servers and other containers with Docker
  • Efficient on power consumption (less than 10W)
  • Smallest possible size

Hardware Part of the Story

For my build, I wanted the smallest form factor possible while still satisfying my requirements. So I opted to use standalone hardware with some modifications. I am outlining here the components I used for this project and the modifications I did for them, however, if you don’t want to do hardware modifications you can change the components based on your liking.

Components

  • Processing Unit : Raspberry Pi CM4 board without onboard wifi. Since the Raspberry Pi onboard wifi is not powerful enough, we will be using a separate wifi module. Therefore, opting for the CM4 without onboard wifi will save some power.
  • Wifi Module : Intel BE200NGW dual band wifi card
  • Case and Motherboard: GeeekPi DeskPi Mini Cube which has Gigabit ethernet and M.2 M-Key PCI-E interface.
  • Adaptor Card: Since our Motherboard only has a M.2 M-Key Slot, we have to convert this to M.2 E-Key Slot so that we can use our wifi card. I used this one.

Modifications

For the CM4 I had a low-spec one lying around that I bought for a previous experiment which had 1GB RAM and 8GB EMMC. Since I wanted the Docker support, I upgraded the RAM and EMMC to 8GB and 128GB respectively (Yes, it is a tedious process that requires a lot of patience). GeeekPi Mini Cube is packed very much within a very tiny space. For this reason, the adaptor card and the wifi module do not fit within the available space without modifying M.2 M-Key Slot on the motherboard. I had to desolder the original M.2 connector, which was 8.5MM in height, to a connector with 6.5MM. Then I had to find a suitable pair of antennas with dual-band support. Note that BE200 antenna connections use MHF4 connectors, not UHF. Other than that, no major changes were required.

Soft(Firm)ware Part of the Story

I think this is the most important part of the building process for several reasons. I could not find good enough documentation to make everything work as I wanted. So after a lot of trial and error, I found the configurations that supported all the features that I wanted.

  • Debian Bookworm (64bit) without GUI
  • RaspAP is a powerful platform that supports all the fancy features that I wanted from my router.
  • Intel BE200 firmware Driver.

I am not going to talk about installing each of the above components since there is information about installing each of the components in their corresponding documentation pages.

By default, RaspAP supports wifi repeater mode (both in the community edition + insider edition) as long as you have two physical adaptors with two separate interfaces. But the interesting thing is that BE200 supports multiple bands and multiple channels. This means we should be able to create multiple interfaces in theory. This is where I had to do several experiments to figure out the components.

Virtual wlan Interfaces

This process elaborates on the process of creating the virtual WLAN interface. I am giving the name wlan0_ap for this interface. You can create the interface with the following command.

sudo iw dev wlan0 interface add wlan0_ap type managed

You can check whether the new interface is available with the ifconfig command. Next, we have to set a static IP for the interface. You can use your favorite private network IP for this.

sudo ip addr add 10.4.141.1/24 dev wlan0_ap
sudo ip link set wlan0_ap up

You can verify the assignment of IP with the following command

ip addr show wlan0_ap

Next, we have to restart the socket related to the iwlan0.

#reinitialize socket
sudo wpa_supplicant -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0

To make the interface available permanently, create a file /etc/systemd/system/wifiap-setup.service and place the following components inside the file.

[Unit]
Description=Setup wlan0_ap and wpa_supplicant on boot
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/iw dev wlan0 interface add wlan0_ap type managed
ExecStart=/usr/sbin/wpa_supplicant -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Next, we have to reload systemd, enable, and start the service with the following commands.

sudo systemctl daemon-reload
sudo systemctl enable wifiap-setup
sudo systemctl start wifiap-setup

Hotspot and Configuring DHCP

Once you have the interface up and running, you can use the newly created interface as the access point. To do that, login to the RaspAP admin panel and use the Hotspot tab. Select the newly created wlan0_ap interface. Configure the rest of the settings to your liking. After saving the settings and restarting the AP, you will see the SSID of your network. If you try to connect, it will fail due to an invalid (unavailable) DHCP.

Let’s configure the DHCP for the interface. Go to the DHCP server tab from the RaspAP admin panel. Remember the static IP (10.4.141.1 in my case) used during the creation of the wlan0_ap interface. Based on that, we have to create the DHCP settings.

Conclusion

At the end, Routour🗼 has been a rewarding project. I hope this documentation helps others who are interested in building their own custom router. If you have any questions or suggestions, feel free to reach out.