Arch AUR Unknown Public Key

While trying to install an update for network-manager strongswan from AUR I got the following error:

The public key needs to be downloaded using the following command:


Michal Zuber

Weather Station using Raspberry Pi & Arduino


This post will be extensive so will be separated into 3 parts to make it easier to write and read. I have spent the last couple of months developing a weather station; both for the fun of it and to improve my understanding of the C programming language. The weather station will perform quite a few tasks. It comes in 3 separate bits; several remote sensors that transmit their temperature, location and battery status over an RF link, a receiver module that receives the data over the RF link and the raspberry pi main station which talks over I2C to the receiver unit to get the data. The raspberry pi then processes this information to display on an LCD screen. It has five buttons; one switches between all remote sensors and it’s self, 2nd switches between the data&time, IP address and WiFi signal strength, 3rd switches between Celsius and Fahrenheit, 4th turns the display backlight on/off and 5th safely turns the raspberry pi off. All of the code is written in C, both the raspberry pi and arduino.

Read more…

Arduino: Using C to write 7 Segment 4 Bit Display Driver

I have started re-learning C using the “C Head First Book” after doing it at university a number of years ago and decided to purchase an Ardunio (Well Genunio as I am not in the USA). The first lab in the book was to create a moisture sensor for detecting if a plant needed watering and write the output to the serial port to display on the PC. I purchased quite a few components from Banggood including this 4 bit 7 segment display. I found some driver code via the bang good forums which worked but decided to write my own as I wasn’t a fan of how it was written. It is also far better to write it from scratch if you want to learn exactly how it works and not just pass variables into a pre-defined function.

How the 7 segment display works

The banggood display module has two 74HC595 shift registers on the back which controls the individual led segments on the display. A shift register is simply put a way of expanding the pins of a micro-controller, this means the display only needs 3 input PINS. The display is a 4 bit display because it has four blocks of 7 segments (excluding the dot). The schematic diagram I found for the display shows which pins of shift registers control which segments on the display. The display segments are labelled using letters A-G and DP. The below image shows which letters correspond to which segment.

Read more…

Restore missing LVM volume group

This post will show you how I managed to restore my laptop after the grub configuration got corrupted and could not find the LVM root partition.
The grub menu booted into grub-rescue which I could not use to boot the LVM partitions as it was an unrecognised file system. Therefore the only thing to do was boot into a LIVE system. I tried several but ended up using an Arch system as I could potentially chroot into the installed system.

Read more…

Create IPSec/L2TP, IPSec EAP for Android VPN


Android supports IPSEC/L2TP & IPSEC with XAuth with either PSK or Certificates. I struggled to find any thorough information on setting up the server in its various forms so have written this blog mainly so I don’t forget how to do it! I am using a Ubuntu server with Strongswan providing the IPSec, XL2TPD providing the XL2TP and PPP. IPSec provides the encryption, L2TP does not provide any security! Firewall rules need to be added to prevent someone trying to connect to the L2TP port outside of the IPSec tunnel.

IPSec/L2TP PSK (Pre Shared Key)

Firstly lets start with the easiest one to setup; this doesn’t use certificates so makes it quicker to setup. We need to install strongswan to provide the IPSec, ppp and xl2tpd.

apt-get install strongswan xl2tpd ppp

Read more…