Thursday, January 16, 2014

Raspberry Pi - Part 1

PiStories Part 1

Getting up and running

I finally succumbed and bought a raspberry pi. I went for the Maplin kit n34qg. On unboxing I realised I had probably spent more than I had to in order to get started. The box contains:

  • Pi Model B
  • Case
  • Wireless keyboard
  • Wifi dongle
  • 4port powered USB hub
In fact in my odds and ends drawer I had a wifi dongle that I used to use on an old laptop and an 8 port hub which would work better because the footprint is pretty well the same size and the pi itself and it sits on top of it with a bit of bluetack.

The keyboard's ok, if a bit small and I wouldn't want to use it for any serious typing. It will come into it's own if I ever get the Pi linked to the TV and want a remote.

In terms of booting up everything worked pretty well out of the box.

I am running on a Toshiba TV and a Benq monitor. The monitor only has a DVI port but a cheap adaptor from Amazon sorted that out.

The sound didn't work on the TV immediately I had to add the line hdmi_drive=2 to the /boot/config.txt and things started working.

The wifi utility is on the desktop and it connected to the home wifi no problem.

During the setup I realised that the keyboard wasn't really working for me so I plugged in an old usb keyboard I had. It detected it straight away. I had to remove the wireless kb dongle because it was causing some strange behaviour with missed keys and key repeats.

One of the first things you should do is fire up raspi-config. Before you use it the first time go to the last menu item and get the update. The other thing you might want to do set the gui to start automatically.


I decided early on that the footprint of yet another keyboard on the desk was not practical so I decided that remote desktop was the way to go.

The recommended remote server for Raspian is TightVNCServer. The command line to get it is

sudo apt-get install tightvncserver

and the instruction to start it is just


The first time you use the password file is not present so it prompts you for a password for read/write access and an optional one for read access only.

When it starts it tells you it has started but not which port it is listening on or the ip the pi is sitting on. The best way to find out the port is to have a look at the log file like this:

I haven't quite got to the bottom of the last two errors but it works ok anyway.

So from that you can see that we are running on port 5901. You can try and connect using the machine name and DNS. That was not working for me so I needed to get the ip address of the Pi like this:

You will see from that that the wired Ethernet (eth0) is not connected. The bit we are interested in is the wlan0 connector and there you can see the internet address that has been assigned by the router. I have a long lease on the addresses so I usually don't bother setting up a fixed IP on the local network.

Now I have all the information I need to connect. On the laptop I have to run windows for work. I am using the TightVNC client for windows. When you start it up it looks like this:

Not the double colon before the port number...that had me guessing for a while.

When you have a good connection you can enter your password:

And bingo you should be connected.

...Coming soon

  • Connecting with the remmina remote desktop in Linux
  • ssh remoting
  • My appraisal of Python
  • tkinter GUI programming

Wednesday, January 1, 2014

Akademic Shokalsky

If you are going to argue you need facts

There have been lots of words written about  These are just facts. I present them to you without comment:

  • There is a ship stranded in ice in the Antarctic. 
  • It is mid summer in the southern hemisphere.. 
  • The Guardian and the BBC are represented on board. 
  • Along with eco-activists and scientists. 
  • The mission was a scientific one.
  • They said so when they failed to raise public funds through croudsourcing site (they raised $1000)
  • There were two icebreakers trying to break through to them. 
  • One of the icebreakers seems to be stuck itself and the other one is trying to free it but making only around 10 metres an hour. It has about 3 nm to cover
  • The BBC has reported that a third icebreaker is on its way. The USCG has failed to confirm this.
  • The chief scientist on board is claiming the ice that is trapping them is caused by the warming of the Antarctic. 
  • The thermometers are showing a cooling trend.
  • The same chap runs a company that seeks to make money by carbon capture
  • His family are stockholders
  • 100 years ago the area they are in was navigable.
  • The BBC and guardian would like you to think it is a cruise ship, they are either not allowing or deleting comments that contradict their view of the world.

I am  not a scientist. But I hope I can think critically and I know where the facts are leading me. 

You can refute the facts above present new facts. I have evidence to back all of these. If you want to join the discussion make sure you bring some evidence to the party. 

The truth will come out when someone has to pay for it all. The finger pointing has started already. Don't hold your breath though maritime insurance claims can go on 20 years or more.

Update Noon 2nd January

  • The 52 passengers have been airlifted by Chinese Helicopter to Australian icebreaker.
  • The crew remains on board.