Mackie SRM150 repair

I received two Mackie SRM150 amplifiers that had the same problem: both powered on but did not reproduce any sound apart from some louder than normal hiss and a very noticeable pop when turning up the volume. The problem on both units turned out to be a defective linear regulator component on the preamp/mixer board. Read further if you want to learn more about the repair… Continue reading Mackie SRM150 repair

Philips PerfectCare Aqua does not pump [SOLVED]

The PerfectCare Aqua is a steam generator iron made by Philips. My model GC8620 had a strange problem: it would heat up the iron and I could hear the steam chamber heating up also, but when I pressed the trigger on the iron (after the steam chamber made no more noise and it was at the right temperature), the pump would not work. No water being pumped to the steam chamber meant no steam 🙁

Let’s dig deeper and try to find the culprit and repair this… Continue reading Philips PerfectCare Aqua does not pump [SOLVED]

A20-OLinuXino-MICRO 5V SATA MOSFET repair

I have an Olimex A20-OLinuXino-MICRO board that I use for running embedded Linux (armbian). It is a very nice board with an Allwinner A20 dual core ARM processor, 1GB RAM and a lot of connections. The features I like the most are the SATA connection and the integrated LiPo battery charger. It is like a uninterruptible power supply on board!

Unfortunately both the 5V connection for the SATA drive and the LiPo battery connection are close to each other and they have exactly the same female JST connector. You  can probably guess what went wrong: I connected the LiPo battery to the 5V SATA connector and I plugged the 5V cable from the SATA drive into the LiPo connection on the PCB 😮

Luckily all Olimex hardware is open source and that is yet another reason I love this Bulgarian company! On the A20-OLinuXino-MICRO wiki page you can find a lot of information, including a link to their github repository that also includes the full schematic!

So let’s digg into the documentation and get this thing repaired… Continue reading A20-OLinuXino-MICRO 5V SATA MOSFET repair

Enabling HSTS in Apache 2.4

After securing one of my servers with Let’s Encrypt, I was a bit disappointed that my website only got an A result on the Qualys SSL Server Test. Why did I not get the much sought-after A+?

Browsing the Protocol Details of the report, I discovered that my website was lacking Strict Transport Security (HSTS) support. This is how I enabled it on my Apache 2.4 web server running on Debian 8… Continue reading Enabling HSTS in Apache 2.4

Moving files to subdirectories based on date in the filename

My camera produces JPG files that have date and time information in the file name. I want to  move the files to new subdirectories per year, month and day.
IMG_20150723_233831.jpg -> 2015/07/23/IMG_20150723_233831.jpg
IMG_20151001_174215.jpg -> 2015/10/01/IMG_20151001_174215.jpg

I wrote this small perl script to perform this task:

#!/usr/bin/perl
# Move files to new subdirectories based on file name.
# CC BY SA 2015, Lieven Blancke
# my camera produces JPG files named IMG_yyyymmdd_nnnnnn.jpg
# I want to move these files to subdirectory per year, month and day
# IMG_20150723_233831.jpg -> 2015/07/23/IMG_20150723_233831.jpg
# IMG_20151001_174215.jpg -> 2015/10/01/IMG_20151001_174215.jpg
use strict;
use warnings;
use File::Copy;
use File::Path 'make_path';

my $directory = './';

opendir (DIR, $directory) or die $!;

while(my $file = readdir (DIR)) {
	# ignore files beginning with a period
        next if ($file =~ m/^\./);
	# only files, no directories
	next unless (-f "$file");
	# only process files like IMG_yyyymmdd_nnnnnn.jpg
	if ($file =~ /^IMG_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]{6})\.jpg$/) {
		print "$file -> $1/$2/$3/$file\n";
		# create the directory $1, $1/$2 and $1/$2/$3 in one go
		make_path("$1/$2/$3");
		# move the file to the directory
		move($file,"$1/$2/$3/$file") or die "Could not move file $1 to directory /$2/$3: $!";
	}
}

closedir(DIR);

D-Link DGS-1500-20 DHCP problem fixed

I had a very strange problem in my home network: some wired hosts did not get an IP address from my wireless router. After some sniffing with Wireshark, I concluded that this problem only occurred with hosts that were connected to my D-Link DGS-1500-20 gigabit Ethernet switch. Hosts that were connected to my wireless router received an IP address via DHCP without any problem.

I did not find any settings in the DGS-1500 that could fix this problem and even a factory reset (pushing the reset button) did not fix it. Eventually I was able to fix this problem by updating the stock firmware 1.00.013 to version 2.51.005!

Configuring the Cisco SPA112 2-Port Phone Adapter for 3starsnet VoIP

The Cisco SPA112 is an Analogue Telephone Adapter, you can configure this device to enable internet telephony (VoIP) for up to two analogue telephones.

spa112

After plugging in the power, ethernet cable and analogue telephone, you can check the DHCP status of your internet (Wi-Fi) router for the IP-address of the SPA112. I actually used the Network Discovery Android app to discover the device on my home network.

Now we have found the IP-address, let’s configure this puppy… Continue reading Configuring the Cisco SPA112 2-Port Phone Adapter for 3starsnet VoIP

Extracting audio from a YouTube video using avconv

You can download YouTube videos with the NetVideoHunter Firefox add-on. After installing the add-on, you can download a YouTube video by clicking the icon.

netvideohunter-12

By default the add-on downloads the best available quality from YouTube, that is very convenient.

The downloaded file has an mp4 extension.  Using the libav command line tool avconv, you can extract the audio without transcoding. This way the process is very fast and the audio quality remains the same:

avconv -i testvideo.mp4 -codec copy -vn testaudio.m4a

The -codec copy option makes sure the audio is extracted without conversion an the -vn option excludes the video being written to the output file.

To install avconv on Debian:

sudo apt-get install libav-tools

Fix fraying shoelaces with heat shrink tubing

Normally the ends of shoelaces are protected with plastic caps to prevent them from fraying, but they sometimes break and get loose. Once the ends of shoelaces start fraying, it is very hard to put them through the tiny holes of your shoes.  This is an easy fix:

  1. Get some glue, the right size of heat shrink tubing and a heat gun (or a lighter)
  2. Put a little amount of glue on your finger and wet the ends of the fraying shoelaces with it.
  3. Cut a suitable length of heat shrink tubing and shove it over the end of the fraying shoelace.
  4. Apply heat with a heat gun and you are done!