My wireguard cheatsheet

I always search for this so I will write it down here.

Client

cd /etc/wireguard
wg genkey | tee privatekey | wg pubkey > publickey
vi wg0.conf
[Interface]
PrivateKey = 
Address = 10.9.0.X/24

[Peer]
PublicKey = dg1cKCId81d6h5cWUQ61BMHksBbi0FdFnitjxDuOuno=
Endpoint = vpn.danman.eu:51820
AllowedIPs = 10.9.0.0/24
PersistentKeepalive = 25
wg-quick up /etc/wireguard/wg0.conf
systemctl enable wg-quick@wg0.service
systemctl edit wg-quick@wg0.service
[Service]
Restart=on-failure
RestartSec=5s

Server

systemctl stop wg-quick@wg0.service
vi /etc/wireguard/wg0
systemctl start wg-quick@wg0.service

Reload

wg syncconf wg0 <(wg-quick strip wg0)

miniPCI-e dual USB card extender

Recently, I was looking for an affordable LoRaWAN gateway with 3G/LTE connectivity. I like Mikrotik products because they are easy to use and have many features (e.g. Wireguard VPN 😎 ) . I found RBwAPR-2nD which has a miniPCI-e slot which can be fitted with R11e-LR8 LoRaWAN gateway module or a card for mobile network connectivity (e.g. R11e-4G). The problem is you cannot have both because there is only one slot. Or can you?

Continue reading miniPCI-e dual USB card extender

Hellobox B1 satellite finder teardown

It is a very simple device for about $15. The main SoC is GX6605S. There is some limited info about this chip on C-SKY page and some technical docs at their tools repo. It communicates with a Bluetooth module TLSR8266 using UART. There is also 4MB SPI flash holding the whole bootloader called GxLoader, Linux kernel and filesystem with the main app. The last important chip is RDA5815M which handles the RF to I/Q conversion. In the future I plan to add an USB-to-Ethernet adapter and repurpose it as an cheap opensource SAT>IP server.

Continue reading Hellobox B1 satellite finder teardown

Wio Terminal in PlatformIO

Seed Studio offered me a sample device (see specs) for exchange for an article on my blog and I accepted. The device came a few weeks ago so I am fulfilling my part.

When it came, I went to their page and searched for some example code to test and I picked GitHub Stats example. The documentation is pretty good but it describes the usage with original Arduino IDE which is not my weapon of choice. Some time ago I noticed PlatformIO added support for this device so I wanted to use it.

Continue reading Wio Terminal in PlatformIO