I’ve recently been using VMWare ESXi 5.5 in anger – with real VM’s rather than just testing shell commands. Plus it seems the last couple of versions of VirtualBox can no longer run ESXi as a guest.

Anyway, its soooo Windows-centric vendor-locked its unbelievable. I mean you can’t even load a bunch of ISO’s on a USB stick and put them in the back of the machine, you have to transfer them using the VSphere client over the network. I’ve not tried scp but I doubt that would work due to the cut-down SSH server and shell. Seems its not even called ESXi anymore, its VSphere Hypervisor or something.

Also there’s no way to find the physical network interface name/number/ID from the virtual nics! It seems VMWare assumes everyone is either using flat networks with no vlans/subnets or only use multiple interfaces for nic teaming/bonding; and have never needed to know which ethernet cable should go to which switchport and map to which network device in the VM.

The only good point is that the vmware-tools are now in some distro’s like RHEL so you don’t need to install kernel source, gcc and make to rebuild the kernel modules every time you do an upgrade.

There’s an annoying “feature” with the console – if you click on the console tab in VSphere it shows the console, but if you click the console icon, it then shows another one, and there doesn’t seem to be a way to disconnect the tab one and you get an annoying popup telling you there’s 2 connections all the time!

It still seems a bit flaky regarding screen resizing and networking, and the whole virtual switch thing is a mess as you end up having to define one switch per interface with only that interface in it if you want your guest to have multiple network cards. It seems more like a virtual router to me.

I’ve also installed a CentOS7 virtual machine, but don’t like it much, networking seems very buggy – especially the new interface naming conventions described here, and that NetworkManager doesn’t seem to track changes made with ifconfig. Systemd is a pain and I even found that rpcbind can’t be disabled using the systemdctl command, you have to symlink rpcbind.service and rpcbind.socket to /dev/null

I’ve just soldered the pins on my Arduino Pro Mini, and found its not well documented – probably because its not an official Arduino (its kind of based on the Arduino Mini) its a SparkFun board that’s been revised and cloned a lot. I finally figured out the pinout for uploading using a CP2102 – its RX-RX, TX-TX, GND-GND, 5V-VCC, DTR-DTR and don’t connect the reset pins or use resistors or capacitors as some sites say.

The Makefile for the 5V 16MHz ATmega328p board is:

BOARD_TAG    = pro5v328
include /usr/share/arduino/Arduino.mk

Rather annoyingly I’d soldered the rear analogue headers on before I realised that it wouldn’t fit breadboard anymore, so I’ve removed them again and may put right-angled headers on at some point. I much prefer the Nano or even Pro Micro.

I just compiled XBMC 14a4 from git and pretty much nothing seems to have changed from 13.2 other than the Kodi name. Had to disable the Google Test Framework to get it to build as its now enabled by default.

I also upgraded the blog to WordPress 4.0

Nearly 2014

Since Xmas I’ve been busy hacking away at things. I tried to install Ubuntu on my Mac Mini and ended up screwing up the EFI pretty royally to the point where I had to remove rEFInd (which didn’t work well anyway), repartition the drive, reinstall OSX, update, and fix things like a randomly disappearing RecoveryHD partition and OSX installing an old version of Safari 5.1 instead of the current 6.1, and then never updating it. The fix for that was to delete it and then Software Update can see the new one is available:

sudo rm -rf /System/Library/StagedFrameworks/Safari/WebKit.framework

Also it seems you have to use special Mac alternate versions of the Ubuntu DVD’s as it seems the Mac’s EFI (BIOS thingy) can’t read Joliet discs, and the bootloader is 32-bit despite the kernel being 64-bit.

Next I noticed that somehow my Raspberry Pi’s weather database had a bunch of duplicate entries in it, despite me creating the database with a unique constraint on the timestamp column and a Python exception to catch it and rollback. I’m also not sure how duplicate entries happened even without the constraint, unless I had manually run the script at the same time as cron did or something odd…. So I had to go through removing the duplicates:

SELECT id,date(*) FROM rf24weather GROUP BY id HAVING count(*) > 1;

And add the unique index back:

CREATE UNIQUE INDEX date on rf24weather(date);

They weren’t tweeted as Twitter doesn’t allow duplicate posts.

I’ve also been working with the Debian package maintainers to get arduino-mk updated in their Git repo, and have also built a SPEC file to make Fedora RPM’s, which are stored here for F18 and F20 alongside my Jessie debs.

Finally, I’ve updated this blog to WordPress 3.8, time for a good sleep now!

RF24 Weather Station Nearing Completion

I’ve soldered on my waterproof/wired DS18B20 and written a Python wrapper that prettifies the data written by the C++ daemon. So it converts a text file containing “8110:2396:1449:23:49:1170:2343:1383008407” to:

BMP085 altitude: 81.10m
BMP085 pressure: 14.49psi
BMP085 temperature: 23.96c
DS18B20 temperature: 23.43c
DHT11 temperature: 23c
DHT11 humidity: 49%
DHT11 dewpoint: 11.70c
Date: Tue 29 Oct 2013, 01:00:07

The entire code can be downloaded as a tarball

Here’s a photo of the Arduino transmitter, I’ve ordered a plastic project box to make it waterproof:

Next I’ve got to look into posting to Twitter and possibly overlaying the data onto a photo from the camera board. I’ve also got to add some error checking, as sometimes the DHT11 comes up with stupid values like 152% humidity. I assume that’s to do with the 3.3v – or possibly DHTlib, as I’ve never had the problem at 5v using the Adafruit lib in my LCD project.

My new PN+LNA+antenna RF24’s have arrived and work ok although the range doesn’t seem to be much longer – still can’t get even halfway down the garden, so range has increased by 2-3m at most. I’ve moved the Pi to my bedroom so it can reach the Arduino in the garden shed.

I received my USB-ASP and got it working with the IDE and even arduino-mk. I created /etc/udev/rules.d/74-usbasp.rules which allows users in the dialout group (same as the Arduino itself) to use the device without being root:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="dialout", MODE="0666"

If the blog seems more sprightly, then that’s because I migrated to a new server as my previous hosts seem keen to wind down their VPS business and concentrate on “the cloud”. I also updated to WordPress 3.7

Raspberry Pi First Look

I’ve just received my Raspberry Pi miniature computer and some SD cards to go with it to experiment with.

First off I inserted the Raspbian (Debian Wheezy for ARM) SD card, which I’d written to disk in 8mins using the following as root:

dd if=2012-12-16-wheezy-raspbian.img of=/dev/sdc bs=4M

Or for RISC OS (2Gb took 7mins):

dd if=ro519-rc6-1876M.img of=/dev/sdc bs=4M

Or for Chameleon (4Gb took 15mins):

dd if=chameleon_v02.img  of=/dev/sdc bs=4M

Next I plugged in all my cables – HDMI to the TV, powered hub to the micro-USB port and a regular USB port on the Pi, then into the hub my Logitech EX100 wireless keyboard and mouse transmitter. That’s kind of cool as it means I don’t have to have an extra couple of wires hanging around and I could just put the kb+mouse in a cupboard somewhere and leave the transmitter plugged in. That was the plan anyway. I think I’ve sorted it now with a few presses of the “Connect” buttons, but I’ve had a terrible time trying to get the Pi to see both kb+mouse rather than one or the other. I think that’s the issue I had with it when I used it with a regular PC though, it was pretty flaky and lost its config then, so not really a Pi issue I don’t think.

Anyway, after configuring things on first boot via raspi-config I got an LXDE desktop. Well all I can say at this point is whomever thinks they can replace their laptop with a Pi hasn’t actually tried it yet! Its slow as molasses and I’ll be changing to runlevel 2 on next boot lol; Hell an apt-get dist-upgrade took about 2 hours with the screen redrawing every 30secs or so. OK this is using a Class4 SD card, but the main problem was CPU was at 100% throughout.

I’ve got to re-run raspi-config in a bit to fix the black borders on the screen, apparently turning off overscan will fix that. Edit: disabling overscan has stretched the display to fill the screen now, but actually its a tiny bit too wide and chops off the left and right of the screen. Mplayer stuttered and didn’t actually display anything when trying to play a 1080p or 720p .mkv file over NFSv4, hopefully raspbmc does better. Edit 2: I found a better fix is to add this lot to /boot/config.txt, which also overclocks a little to 800MHz:


I tested that a couple of programs I compiled for ARMv6 worked which they did, I used the official toolchain from GitHub. First off was a simple “Hello, World!”:

arm-bcm2708hardfp-linux-gnueabi-gcc -o test test.c

Then I compiled iperf, which gave me an error regarding malloc which I fixed using the instructions here which allowed me to compile it using:

export PATH=$PATH:~/raspberrypi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin
export ac_cv_func_malloc_0_nonnull=yes
./configure --host=arm-bcm2708hardfp-linux-gnueabi

The case that comes from CPC doesn’t allow access to the GPIO headers so I’ve got to try opening it up in a bit. Edit: it was easy enough to open, in fact I did it when it was turned on and all the cables plugged in!

The Raspbmc installer is rubbish, after running and re-running it three times I gave up, I think i’ve got it to the point where its just failing to umount the drive now, it should have written the distro and config ready to boot on the Pi. Edit: Turns out that the installer is only a basic image – when you first boot it goes and downloads the actual installation! Its runs pretty well too – 1080p/720p MKV’s played fine over NFS, even over 100BaseT, as did 480p XviDs. I can see how you could replace your Atom HTPC with one of these (and a remote control) although the menus run a bit slowly and I’ve not tried Library mode.

Edit: RISC OS 5 runs fine on it, including my my old Assembler/BASIC programs – just had to set the filetypes and the ones that were crunched I had to reset to their original BASIC sourcecode and up the memory allocated a bit. Screenshot. It does seem pretty dated though, all those weird mouse button combinations that could be so easily just be replaced using keyboard shortcuts, even drag’n’drop saving doesn’t seem so natural anymore. It seems to get files onto the Pi you have to use Fat32FS with a USB stick, odd that its not included with the OS, as RISC OS 3 even could read FAT32 disks….?

Chameleon is fun too, there’s a lot of old computers I recognise that it emulates – ZX Spectrum, Atari ST, C64, VIC-20…. They don’t do much without any ROM’s though.

Edit: I found rpi-update which fetches the bleeding-edge firmware image for the Pi including a 3.6 kernel.

Edit 2: It seems that the Pi’s USB stack doesn’t like my USB webcam driver (PWC) as Motion doesn’t create any output. I do recall that even on my desktop machine when plugged into a hub the PWC driver would kernel panic, and really even the built-in USB ports on the Pi are hubs, so its not surprising I guess.

I also upgraded WordPress

Debian Sid on EeePC 1001P

As Debian Wheezy beta1 got released the other day I thought it was high time I updated my netbook from Fedora14.

I was pleasantly surprised how little tweaking was needed to get to Sid, even Gnome 3.4 only needed a few extensions and CSS tweaks.

For the sake of speed I only encrypted my /home partition, chosing not to bother with a swap partition, and as /tmp is on tmpfs these days, the only permanent storage that’s not encrypted is the OS like /bin, /sbin /etc and so on.

The hotkeys and powersaving work out of the box with the 3.2 kernel, no need for eeepc_laptop or Jupiter anymore.

My /etc/apt/sources.list looks like this, which gives me Debian-unstable (Sid) and some packages like Firefox/Thunderbird from Debian-experimental:

deb http://ftp.uk.debian.org/debian/ sid main non-free contrib
deb http://ftp.uk.debian.org/debian/ experimental main non-free contrib
deb http://www.deb-multimedia.org sid main non-free

I noticed that the package difference between Wheezy and Sid was only about 200Mb worth of downloads, a lot less than between Squeeze and Wheezy.

I halved the size of the icons in the Gnome Shell Dash by editing /usr/share/gnome-shell/theme/gnome-shell.css like so:

.icon-grid {
    spacing: 18px;
    -shell-grid-horizontal-item-size: 96px;
    -shell-grid-vertical-item-size: 96px;

.icon-grid .overview-icon {
    icon-size: 48px;

To get the taskbar as I like it I installed the following extensions:

Alternative Status Menu (adds suspend/poweroff)
Quit Button (replaces username/IM status with an Ubuntu-esque power button)
Remove Accesibility (removes the alternative input method icon)

To make the fonts look a bit nicer I followed this post that tweaks fontconfig. Still not sure it looks great though on very small fonts, but it is a 10″ screen I guess….

The only problem I had was that NetworkManager was not configured to control my WiFi interface for some reason, possibly as I configured that as my primary interface during install – as eth0 was set to use NetworkManager which doesn’t make much sense. Anyway, to get NetworkManager to control it I just removed all references to wlan0 from /etc/network/interfaces

The extra packages I had to install (some odd ones like gedit were missing!) are:

aptitude install deb-multimedia-keyring gdebi icedove knockd rsync gstm ntpdate gnome-tweak-tool lm-sensors gkrellm gnote pidgin-plugin-pack pidgin-sipe gedit geany qgit backintime-gnome backintime-common nautilus-open-terminal nmap zenmap gftp-gtk flashplugin-nonfree gnome-mplayer mencoder ffmpeg ttf-mscorefonts-installer msttcorefonts libxml-dom-perl libspreadsheet-writeexcel-perl pyrenamer grdesktop ia32-libs openjdk-7-jdk icedtea-7-plugin enigmail file-roller

apt-get -t experimental iceweasel icedove iceowl-extension

I also manually installed Google Chrome, Talk plugin plus Opera and Nessus (4.4.1 not 5.0.1)

Disabled IPv6 using:

echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf

Finally I stopped a lot of useless servers starting at boot, for example:

update-rc.d -f avahi-daemon disable

I also updated the blog to WordPress 3.4.1

Update: I’ve upgraded my F14 desktop to Sid too, as I do compiling and stuff on that I had to install a few more packages:

aptitude install java-package fakeroot conky libxml2-utils pwgen john-data john texlive-fonts-recommended texlive-fonts-extra gcc g++ bcc iasl xsltproc uuid-dev zlib1g-dev libidl-dev libsdl1.2-dev libxcursor-dev libasound2-dev libstdc++5 libhal-dev libpulse-dev libxml2-dev libxslt1-dev python-dev libqt4-dev qt4-dev-tools libcap-dev libxmu-dev mesa-common-dev libglu1-mesa-dev linux-kernel-headers libcurl4-openssl-dev libpam0g-dev libxrandr-dev libxinerama-dev libqt4-opengl-dev makeself texlive-latex-base  libc6-dev-i386 lib32gcc1 gcc-multilib lib32stdc++6 g++-multilib ttf-mscorefonts-installer ttf-liberation ttf-linux-libertine libvncserver0 libvncserver-dev optipng

I also forgot to mention that due to a recent upgrade (OpenSSL?) pidgin-sipe is broken, the fix is to make a wrapper script:



Then edit /usr/share/applications/pidgin.desktop to Exec=pidgin-wrapper

I also installed Sun Java 6 using these instructions, which I tweaked a little to use the /usr/lib/jvm/java-6-sun symlink which CyanogenMod expects.