Category Archives: Linux

Posts about and around the operating system Linux and all open source stuff I use or write

TL-WA901ND, vpnc and fritzbox

I bought a TL-WA901ND v3 as an access point in a remote location. The first thing was to install openwrt on it. This was easy, as the wiki describes it fairly straight forward.

Download the current trunk firmware. Then go to the configuration page of your TL-WA901ND and flash it over the current one. Rebooting will cause the device to fall back to and only telnet as a connection method. Log in via telnet and do a simple “passwrd” command to change it to something good. After that you have to log out and log in again using ssh.

This was the point I realised that the current version of openwrt as provided by trunk does not contain vpnc. This tool is needed to connect to my fritzbox, it does not have a standard openvpn. Even if it had, the openvpn packages and dependencies eat up all the available space on the TL-WA901ND making it unusable.

I then found out I could add and remove packages to the trunk firmware using the ImageBuilder tool. A detailed guide on how to install it can be found here.

Flashing the WA901ND over ssh is quiet easy. Go to the /tmp directory and wget the new file you want to flash. Then run

sysupgrade -v /tmp/yourfile.bin

and wait for the device to reboot.

I tried adding the latest available vpnc package to my custom firmware, but I could not get it to connect to the fritzbox, as the vpnc package is missing this patch.

As I now needed to compile my own vpnc I followed this wiki to get the toolchain installed. Make sure you get a the git sources of a the latest version of openwrt that contain vpnc.

I did a “make package/feeds/packages/libgcrypt/compile” and then later a “make package/feeds/oldpackages/vpnc/compile”.

After hat a

make package/feeds/packages/libgcrypt/install

and then later a

make package/feeds/oldpackages/vpnc/install

You will find the new packages in the “bin” directory.

All files I compiled for my use can be found here:








Skeptiker in Hamburg Homepage

In den letzten Wochen haben wir die Homepage der hamburgischen Skeptiker überarbeitet. Nun findet man dort einen Veranstaltungskalender, der auf “The Events Calendar“, basiert. Ich habe schon aus der alten Version (auch GPL2) von The Events Calendar das Feature Google Kalender wieder hinzugefügt (Listen Sicht).

Die Patch Datei kann hier gefunden werden. Zusätzlich zeigt es auch die Kategorie in der Listenansicht an. Der Patch funktioniert auch mit Version 3.5.1 des Kalenders.

RSS feed from a directory full of MP3s

I use BeyondPod to listen to a lot of Podcasts, but I also have a bunch of audiobooks I have converted from CD to MP3s. I could manually upload them to a directory on my phone, but who has the patience for that?

First step: Fix the tags in your MP3s. I use easyTAG. I can change the filenames based on clean tags. Well formated filenames are very important when automating the RSS feed creation. You want your audiobooks to be in perfect order every time. I have settled for this mask:


Second step: Get fapg! This little tool creates the rss feed we later need.

Third step: Make a directory on your apache server, where you will either place the MP3s or symlinks to the files. I have chosen to call the directory “audiobooks”. Clever!

Fourth step: If you want security, you can use apache to do it for you.

<directory "/var/www/audiobooks">
AuthType Basic
AuthName "Audiobooks"
AuthUserFile /etc/apache2/httpd-passwords
require user yourusername

Fifth step: Run fapg in the audiobooks directory.

fapg -f rss -n -o ./rss -p "" *

The “-f rss -o ./rss” makes it create a file called rss in the directory. “-p” adds your domain to the filename because not all Podcatchers understand that your MP3s are in the same directory as the feed file.

Now you have a working feed in that directory. Rerun fapg after adding new or removing old MP3s.

Piwik create export from Google Analytics and import without shell

I came accross the tool Google2Piwik and wanted to use it to import from Google Analytics to Piwik, but I don’t have shell access to the site I run. This is my solution:

  • After installing Piwik via FTP I got myself a server API key for Google Analytics.
  • I created a dump of the database (phpmyadmin) from Piwik and imported it into my local mysql server.
  • I git cloned the Google2Piwik github project to my local linux client and edited the config file to include the Analytics server token and the database data from the client.
  • After running the Google2Piwik tool I had all the data in the local database. I exported _log_action, _link_visit_action and _log_visit.
  • I imported the export into the original site.

To then force Piwik to create the required archives I used this command;method=CoreAdminHome.invalidateArchivedReports&amp;idSites=2&amp;dates=2014-02-01&amp;token_auth=XYZ

You need to change:

  • Sites= to the actual number of your site
  • dates= to the earlyest date of your Analytics export
  • token_auth= to the piwik auth token