Tag Archive: Linux

I’m there! After quite a few hours of pain- I’m finally there. I ended up having to compile gambas2 from source- see previous posts:



Hopefully tomorrow I’ll have a few devices up and running!


And as if by magic… several moments after my previous post:

I’m off out for a while but if it’s possible will share the compiled version (I’m not sure how yet… but I’m sure I will work it out!). And then to go back to trying to get DomotiGa up and running!!


I’m currently battling trying to get gambas2 installed on one of my raspis so I can try out DomotiGa http://www.domotiga.nl

sudo apt-get install gambas2

Looks to install AOK but when trying to run from the desktop nothing happens and when trying to run from the terminal gives:

pi@raspberrypi:~$ gambas2
Segmentation fault

Googling around suggested synaptic has better dependency checking so I tried again from scratch. This gave me 3 errors (404 page not found for openssl, libcurl3-gnutls & postgresql). I installed these 3 packages using apt-get, fired synaptic up and was able to complete the gambas2 installation without any errors/warnings.

But alas, firing up gambas2 presents the same lack of activity from the desktop and segmentation fault error from the terminal.

Another search result suggested trying the development / testing version of gambas2 from the wheezy repository. Unfortunately (unless I did something wrong) it appears the same version is in both the stable repository- doh!
*EDIT* I just found out that I could have figured this out pretty easily by browsing: http://packages.debian.org/search?searchon=names&keywords=gambas2 which would also have pointed out the fact that there is a third repository: Unstable (sid). This doesn’t have the latest 2.24 but does have 2.23 (I may try this at some point to see if it is possible to avoid the hassle of compiling yourself)

Next to try compiling from source: http://sourceforge.net/projects/gambas/files/gambas2/ (which is nearly complete- but will inevitably cause me to pull out my hair!)


Now my 2nd Raspberry Pi has turned up I can (re)start work on my home automation project.

Previously I’ve setup a wireless sensor network (WSN) comprised of a number of jeenodes (http://www.jeelabs.org) using the RFM12B to connect back to central jeelink usb plugged into a repurposed orange livebox router (running http://www.homeautomationhub.com). Additionally I installed a number of CurrentCost individual appliance monitors (iams) and a EnviR energy monitor plugged into the home automation hub (hah) to monitor and log household and appliance level energy consumption. Refer to some old blog entries: https://tickett.wordpress.com/category/home-automation/. All of the data was being sent to pachube for logging.

I wasn’t too keen on the home automation hub as I didn’t really fully understand it and couldn’t push it where I wanted to go (although the community was really good and I imagine I will be seeking assistance from them in connection with the new project :)

In my new setup I intend to use a Raspberry Pi the "hub"- with a "full blown" linux distribution (debian?) I should hopefully be able to accomplish everything I am looking for. As python is the first language discussed in conjunction with the raspi I’ve started playing with that, but eventually may move to a LAMP solution (php with mysql backend for logging and apache web front end).

Here’s a high level summary of the steps I’ve covered:

The python example from the link above didn’t produce any output for me so I modified it slightly:

import serial, sys
ser = serial.Serial('/dev/ttyUSB0', 57600)
while 1 :

That’s all I have time for now- watch this space.


Raspberry Pi #1 – RaspBMC

I’ve been very quiet (that means work has been very busy!) but some waiting is starting to draw to a close:

-Fibre has finally been installed in my local exchange and cabinet and should be installed at my house June 6th!
-My first RaspberryPi has arrived:

My Acer Revo R3610 running XBMC has been playing up lately and pulling far too much juice (30 Watts+ if I remember correctly) so I thought that could be the destiny of my first Raspi.

Sam over @ http://www.raspbmc.com/ has been working on a dedicated linux distribution RaspBMC- so I thought I’d give the beta a whirl.

The installer image was downloaded in no time at all and writing to my Sandisk 16GB class 10 SDHC card:

Unfortunately when trying to boot the device just sits repeating mmc0: Timeout waiting for hardware interrupt:

I found information suggesting this would be fixed in the release but I’m far too impatient to wait so thought I’d try a workaround found http://forum.stmlabs.com/showthread.php?tid=184

By overwriting the kernel.img and start.elf with those from https://github.com/raspberrypi/firmware/tree/master/boot the installer was able to boot and the install process complete. Unfortunately then when the device tries to boot it, once again, gets stuck mmc0: Timeout waiting for hardware interrupt.

I decided to try another SD card, this time a Verbatim 16GB class 6. This time the installer fired straight up without needing patching but after completing I was faced with a login prompt and no XBMC GUI. I re-imaged the SD card and re-ran the installation. Third time lucky! XBMC appears, as if by magic :)

I was quickly able to mount my Samba (SMB / CIFS) network media share and start setting up my library:

Playback seems pretty good, although I currently have it connected to my Onkyo amp so it doesn’t need to decode audio. I understand it struggles a little if connected directly to a TV which requires audio to be down mixed.

I’ve yet to get my MCE remote working but XBMoteC works perfectly from my iPhone.

*EDIT* At one point after rebooting RaspBMC i got an error in /etc/rc.local: ./getfile.sh: not found. Fortunately i was able to fix this by SSHing into the device, and:

cd /scripts/upd_sys
sudo wget http://svn.stmlabs.com/svn/raspbmc/testing/update-system/getfile.sh 
sudo chmod +x getfile.sh
reboot now

Next stop- a little overclocking :)

Now just to wait for my 2nd Raspberry Pi so I can’t start hacking the thing to hopefully get my home automation project back on track!


Busy busy busy

Unfortunately I’ve been very busy with work so little time for blogging. Just a few little bits:

Problem Steps Recorder

A colleague told me about this recently. A new tool available in Windows 7 designed to record steps to recreate problems- you can then send the output to support desks etc who can analyse the output.

You can access PSR (Problem Steps Recorder) by typing psr into the start menu and clicking the top result (highlighted above).

The tool is very straight forward- I’ve only used it a few times to date, but essentially it records screenshots and describes each "action"- for example clicking, dragging, user input etc. The output file is then a zipped, self-contained html type structure. See example: http://tickett.net/downloads/ip_address.zip (I have to admit I’m a little puzzled as I recorded the steps to launch a command prompt and run ipconfig to determine your ipaddress but the keyboard input doesn’t appear to’ve been captured- I think I need to play a bit more).

The beauty of the tool is that it could quite easily be used to simplify the process of creating documentation and user guides as well as the intended purpose of recording problem steps (currently we often create documentation but taking numerous screenshots and manually pasting into word with annotations- this automates that process somewhat).

Lock Screen in OS X

I did a google a while back as I’ve started to use my laptop in the office a lot more and never like leaving the screen unlocked. In windows I’m sure we all know ctrl-alt-del allows us to lock the workstation, but I’d yet to find an option/keyboard shortcut in OS X. My search didn’t turn up much- and the first item I tried didn’t work at all.

The next day a colleague showed me the "hot corners" option available in the system preferences under displays / screen savers. This works pretty well but my ideal solution would be a keyboard shortcut.

I resorted to trusty stackexchange and was informed that shift-ctrl-eject which actually puts the display to sleep but effectively achieves the desired result of locking the screen (as once awoken the password is requiring to resume).

Ubiquiti AirVision / AirCam Update

I have finished permanent installation of my 3rd Ubiquiti AirCam but have been experiencing increasing problems with the AirVision and NVR software.

For example the above screenshot- you can see the Back Garden feed is blank. These increasingly problems in addition to the rather cpu/memory hungry windows processes spurred me on to give the linux software a go.

I diverted a little from the linux installation guide on the forum: http://forum.ubnt.com/showthread.php?t=44098

Here are my steps:

  • Install Ubuntu server edition checking only the OpenSSH option
  • SSH into the ubuntu server and escalate to root: sudo su
  • Modify the apt-get sources file: nano /etc/apt-get/sources.list
  • Add at bottom of file: deb-src http://extras.ubuntu.com/ubuntu natty main
  • Add at bottom of file: deb http://www.ubnt.com/downloads/airvision/apt natty ubiquiti
  • Quit and save changes: ctrl-x
  • Update apt-get: apt-get update
  • Install AirVision and all dependencies: apt-get install airvision
  • Install AirVision NVR and all dependencies: apt-get install airvision-nvr
  • Ensure everything is up to date: apt-get upgrade

You should now be good to go! Try an browse to https://server-ip-or-hostname:7443 and you should be presented with the configuration/setup wizard.

NB: HTTPS. I made the mistake of trying to browse to http://server-ip:7443 and wondered why it wasn’t working :)

So far performance seems better and resource usage seems a little lighter. Fingers crossed.


Small PC Options

I’m eagerly awaiting the release of Raspberry Pi : http://www.raspberrypi.org/ a credit-card sized computer. I intend to use one (or more) for home automation and possibly XBMC (media pc) for streaming movies throughout the house.

This got me looking at what other options are currently out there for small computers which can run linux:

Raspberry Pi CuBox PlugPC Alix
Website http://www.raspberrypi.org/ http://www.solid-run.com/ http://www.plugcomputer.org/ http://pcengines.ch/alix.htm
Cost $25 / $35 $135
Size 85.6 mm x 53.98 mm 2" x 2" x 2"
Housing No Yes
Processor ARM v6 ARM v7
Video HDMI + RCA Video HDMI
Audio Analog Audio Jack SPDIF
USB 2x USB 2.0 2x USB 2.0
Network No / 100 Mbit Ethernet 1 Gbit Ethernet
RAM 128 MB / 256 MB 1 GB
Power MicroUSB 5V DC PSU?
Card Reader SD MicroSD
Extra IR, eSATA
Power (Watts) ~3


You can see I’ve only partially filled out the table as the PlugPC (many variations available) and the Alix didn’t really excite me like the Raspberry Pi and CuBox. The first of which still looks the most promising because of it’s incredibly low price point. Neither product are currently available (as of posting this article 7th Jan 2012) but the first 10 beta boards from the Raspberry Pi are currently being auctioned off on eBay for charity http://www.ebay.co.uk/sch/raspberry_pi/m.html?_nkw=&_armrs=1&_from=&_ipg=&_trksid=p3686 and fetching over £1,000 each!

I’m hoping to see both devices available later this month and will be trying to get my hands on both!

*EDIT* Forgot to add this link to a video of the Raspberry Pi running XBMC: http://www.youtube.com/watch?v=iKhnoQMwjmQ&feature=player_embedded

*EDIT* Thanks to Tyrell Beveridge for pointing out the fitpc: http://fit-pc.co.uk/ this looks like another good contender although rather pricey

*EDIT* 11/01/2012: Discovered another device- the Bifferboard: http://www.bifferos.co.uk/. It’s not very powerful and will set you back about £50 include a case and power adapter but does support a few common linux distros with apt-get/yum etc


I started identifying all twin tuner DVB-S2 enigma2 satellite receivers:

Then opted to buy the cheapest i could find- AB IPBox 9900HD for £200 on eBay. If i can see myself completely dropping the Amstrad DRX890 i may invest in one of the more expensive receivers.

It took quite some time to get the hang of it- i got through a number of firmware images before finally settling on the SWF 3.8 (found on http://www.sat-world-forum.com)- this seemed most stable and to provide the best plugin/extension/emu/cam abilities.

I ran a scan and picked up all 1000+ channels but could only view the free to air ones… seems i need to configure a softcam to use the sky viewing card. I tried all of them not really knowing what i was doing but eventually pieced together bits of various guides to get oscam working with the following configuration files:

# oscam.conf
nice = -1
WaitForCards = 1
ClientTimeout = 5
CacheDelay = 120
logfile = /usr/local/etc/oscam.log

enabled = 1
au = 1
boxtype = ipbox
user = user
pmt_mode = 0
request_mode = 0

httpport = 16002
httpuser = root
httppwd = swf
httprefresh = 10
httpallowed =,

# oscam.server
label = SkyUK
Protocol = internal
detect = CD
device = /dev/sci0
Group = 1
EMMCache = 1,3,2
#BoxID = 001F1F1F
CAID = 0963
ident = 0963:000000

# oscam.client
user = user
pwd = password
group = 1
au = SkyUK
CAID = 0963

The HD channels didn’t work at first… but removing the BOXID=XXXXXXXX line from the oscam.server file fixed that!

Now i was ready to tidy up the channels- i found a bouquet on http://www.digital-kaos.co.uk (just search for sky uk channel bouquet. Then using DreamBoxEdit (http://sourceforge.net/projects/dreamboxedit/) open and upload to the IPBox (you will need to configure your box’s IP, ftp username/password in DreamBoxEdit- default username= root & password = swf)

The EPG wasn’t really showing a lot so i did a little research and it seems CrossEPG is recommended (available on http://crossepg.googlecode.com). It didn’t seem possible to download directly on the box so i ftp’ed it to /tmp and installed from the “setup -> software management -> install local extension” menu. After installation you need to reboot and can then access the CrossEPG setup menu- enable the OpenTV Sky UK (Astra2 on 28.2) provider and hit download. Your EPG should now be populated. I still don’t like the look of the EPG so need to do some more research!

Live TV can be streamed on the network easily using VLC media player and recorded programs can freely be moved around the network- love it!

Seemed to have a problem with network connectivity being lost a few times- restarting the network in the setup -> system -> network menu seemed to work but not too sure why it dropped yet…


%d bloggers like this: