Check out the new projects site for A-i-S

Monday, January 31, 2011

PandaBoard: Setting up Wifi on the comand line (Ubuntu)

If you want to set up Wifi from the command line (it might be the only way to install a desktop for example) you will need to edit the following file:


If you don't know how to use vim or other command line text editors and just want to edit the file, try installing nano this needs an Internet connection though),with:

sudo apt-get install nano

Nano is fairly obvious as it follows normal GUI based methodologies.

Now you can use nano (or any other text editor, just substitute it for 'nano' in the below command) to edit the interfaces file:

sudo nano /etc/network/interfaces

To determine what entries should go into this file review the options at this page:

My interfaces file looks like the following (I am using WPA2 security):
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid <--NAME OF AP-->
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
The items in green above are placeholders for your security settings. You need to replace them with

Once you have completed the amendments to the interfaces file and want to test the setup enter the following command to restart the networking services:

sudo service networking restart

If that all goes well, check the interface is working (up) with this command:

ifconfig wlan0

Hopefully some traffic is reported to have taken place and that an IPv4 address has been allocated.

If not, check the dmesg log for error messages:


Finally to test everything is working, try pinging a site, for example:


Sunday, January 30, 2011

Linux Tip: Reloading bashrc

In Ubuntu ~/.bashrc contains the paths for each terminal session create.
Once you've edited the bashrc file, you can reload it with the following command
. ~/.bashrc

Wednesday, January 26, 2011

Pandaboard Cooling

It is Summer in Australia and about 31 degrees Celsius where I am.

The above setup is a 80mm PC case fan plugged into 12V.

Surprisingly it cools the OMAP4/RAM package from the point where I cannot touch it to a point where I can place my finger on it.

If choosing direct heatsinking of the CPU/RAM package consider that the WiFi and Bluetooth are in close proximity and their antenna configuration may be affected by metallic (ferrous) objects.

UPDATE - 13 March 2011:

In a room which is ~27 degrees Celsius the PandaBoard CPU is measuring ~54 degrees under Xubuntu idle load (both cores ~5% ultilisation)

Saturday, January 22, 2011

Pandaboard: How to read the temperature sensor

From the IRC chat logs, user mru provided userland code to read the internal bandgap temperature sensor in the OMAP4 used in the Pandaboard. Code can be found at:

Linux Tip: Finding out how big a directory is

At the terminal, if you are wondering how big a directory is you can enter the following command to find out;

du -sh /home/user/interesting_directory/

Obviously replace "/home/user/interesting_directory/" with the location you are interested in.

If you leave off the location it will measure the current directory

du is the "disk usage" tool, option '-s' is for sum, and "-h" is human readable format.

Executing this command in my home directory reports back:

Wednesday, January 19, 2011

Linux Tip: Finding out how to save power in Linux

Whether running on a laptop battery or a home built robot's RC Car battery if you want to know what commands to run to shutdown unnecessary process, shorten timeout periods on errant power hungry daemons or stop uncessary disk writes, you need "powertop"

Under Ubuntu:

sudo apt-get install powertop

Then open a terminal and run 'sudo powertop' and let it run.  Every 15 seconds or so it will update with a tip, usually an example comand to run, to save power.

Cheap source of DC Power Plugs and Jacks

An often overlooked component for project is the humble power plug.  Ignored until you need one, then you end up scrambling around contemplating if you can cut up a power pack here or there.

Well put those scissors down and go to Futurlec and order some for very little money:

Tuesday, January 18, 2011

Xubuntu on 701 eeepc is totally worth it

Ok with a caveat - I've got 2Gb of RAM in my 701 eeepc.

Xubuntu runs great.

Installs in 1.9Gb of NAND, is fast and responsive and so far fits into the 800x480 really well.

Xubuntu on a 701 eeepc

If install Xubuntu-altenate-10.10-i386 on a Eeepc 701 (4G) please be very very patient during installation.

Xubuntu can be downloaded from here:

At one early stage you will be told the installer can't find a proper video mode, choose the option at this stage.

Stages such as "Detecting Hardware" will take ages but then it will be quick.  I'm guessing something in the installation routine fails and has to wait until it times out before it proceeds.

I've install 2Gb of RAM in my 701 eeepc with relatively fast SD cards and USB sticks etc and it still takes ages on these points so I'm thinking it is a timeout period thing.

Speeding up Ubuntu on the Pandaboard with Xubuntu

RAM issue

Ok, so if you are currently using an A1 Pandaboard and the Ubuntu kernel, you will see the kernel has only allocated ~768Mb of the actual 1Gb of ram, this is due to a segfault when trying to compile things using 1Gb of ram.

SD Card speed issue

It seems either Ubuntu or ARM kernels have an issue with the SD card controller on the Pandaboard.

How to speed up Ubuntu on the Pandaboard

Easiest step is install Xubuntu by entering this on the commandline

sudo apt-get install xubuntu-desktop
It will take a good long while to complete but then you will have this:

As well you can try disabling the swapfile by editing it out of the /etc/fstab file and rebooting.

Saturday, January 15, 2011

Linux Tip: Accessing files over SSH

Nautilus can automatically access remote files over SSH.

In Ubuntu:
If you click on the desktop and hit CTRL+L

then type


Then you will be prompted for a password and options

Now you should be able to browse the remote system like it was local

Linux Tip: How to search a project for a string

If you need to search for a string such as "nasm" in a directory full of files and sub-directories try:

 grep -R -B2 -A2 nasm /home/dingo/program_dir/*

Sunday, January 9, 2011

How to set up Solr in Ubunutu 10.10


Based on

I have only just started with Solr so YMMV and feedback welcome.

Step 1:

Use Syanptic to install solr-jetty [and associated dependencies]

Step 2:

Open a terminal and run "sudo java -jar /usr/share/jetty/start.jar"

Step 3

Make sure Apache2 can run by "sudo apache2ctl start" and look for error messages.