Tag Archives: Ubuntu

Wireless Setup on the Pandaboard

Having given the Pandaboard a battery pack the only wire that remained connected to it was the Ethernet cable. I had hoped that simply switching to using WiFi, something that the Pandaboard has built-in, would be an easy task, however I could not have been more wrong.

Firstly it took me almost a day to get the WiFi working on the Pandaboard, I tried a large number of guides all asking you to install and do different things but to no avail. The guide I finally used which worked was the one available here, for which there is a video available via a link at the top of the section. A useful resource for configuring the /etc/network/interfaces file (which I sadly found after working it out myself) can be found here. I should also point out that I have to perform an additional restart of the network interface via the command:

sudo /etc/init.d/networking restart

I’m not sure why this is, however I had spent far longer than I wanted to setting it up so I decided to just accept it and added the line to the end of the /etc/rc.local file which is automatically run on start up.

I then needed to install git on my laptop, which had been running Ubuntu 10.11, however as it has been discontinued the repositories were unavailable. I therefore decided to upgrade to Ubuntu 12.10, though after many hours of research I found that my Laptop’s WiFi card (a Broadcom BCM4311) was unsupported and none of the numerous fixes listed worked. I then downgraded to 12.04 but had the same problem (again after many hours messing around). I worked my way back through the versions until I eventually settled on Ubuntu 10.04 (a Long Term Support release), which worked. This whole process took over 2 days.

A final caveat is that Ubuntu 10.04 does not support Ad Hoc networks secured with anything other than WEP, something that I was unable to get the Pandaboard to connect to after several attempts. My solution was to use an old smartphone as a Wireless Hotspot (secured with WPA2) and connect to it from both the laptop and Pandaboard. As this assigns different addresses each time you connect to it so I wrote a short script to run on the Pandaboard each time it boots up to locate the laptop and save its address. I also synchronise the system clock with the Laptop’s as, since I disconnect the battery pack when not in use, it does not stay up to date.

I now have everything working, and I intend to have as little to do with Linux’s wireless networking in the future as possible.

Setting up Ubuntu and Kinect Drivers on the PandaBoard

Having now had to install and configure Ubuntu on the PandaBoard three times I thought I would make a blog post about the setup procedure. If nothing else this will serve as a reference to myself should I have to do it again. I am using an Ubuntu 12.04 Desktop build.

 

Installing Ubuntu 12.04 Desktop on an SD card:

The first step is to install Ubuntu on an SD card. For this I followed the instructions provided at the Ubuntu Wiki, which I will briefly go through here for a Linux-based host computer (the Wiki provides instructions for doing this on other OSs). You do not need a serial cable as some guides suggest.

1. Download the Texas Instruments OMAP4 (Hard-Float) preinstalled desktop image from the official site.

2. Insert the SD card into the host computer and make a note of its device interface. You can find the device’s name using the GUI (it should appear at the top of the file explorer window when you navigate into the disk). Knowing this you can then find the associated device interface using the command:

mount -l

and finding the device’s name in the list. The device interface usually looks like /dev/sdX (where X is a single letter, ignoring any subsequent numbers). Once you have found this, unmount the disk. This can be done with the GUI by hitting the eject button.

3. Next run the following commands to unextract the image, copy it over and flush the system buffers. Make sure to replace /dev/sdX with the device interface identified in the previous step:

  1. gunzip ubuntu-12.04-preinstalled-desktop-armhf+omap4.img.gz
    sudo dd bs=4M if=ubuntu-12.04-preinstalled-desktop-armhf+omap4.img of=/dev/sdX
    sudo sync

This will take some time (around 30 minutes).

 

Configuring the installation:

Once the image is written to the SD card it can be removed from the host computer and inserted into the Pandaboard. At this stage the Pandaboard will need a 5V power supply, an ethernet cable, a monitor, a keyboard and optionally a mouse (I am making do without one).

1. Turn on the Pandaboard (by simply connecting the power cable) and it should begin booting (it takes a while for anything to appear on the display). When it has finished (it takes about 5 minutes) it will begin installing Ubuntu which takes around 50 minutes to complete.

2. Once Ubuntu has finished installing, update the system to the latest version using the commands:

sudo apt-get update
sudo apt-get upgrade

This again will take a while to complete.

3. After updating I chose to install an ssh server so that I would be able to control it from my desktop computer. This is achieved by using the command:

sudo apt-get install openssh-server

The default configuration should work fine, however it can be changed if necessary by editing the file /etc/ssh/sshd_config. From this point on everything can be performed over ssh.

 

Installing the Kinect Drivers:

Finally, to install the Kinect Drivers I followed the instructions provided by Pansenti, which are simple to follow and highly detailed so I don’t feel it necessary to repeat them here. I shall, however, point out a couple of deviations I made from their instructions:

1. The bulk-install method mentioned on Pansenti’s site did not work for me (both times I tried it the PandaBoard hung up unexpectedly half way through). Instead I had to install all the drivers separately, like so:

sudo apt-get install gcc-multilib
sudo apt-get install libusb-1.0.0-dev
sudo apt-get install git-core
sudo apt-get install build-essential
sudo apt-get install doxygen
sudo apt-get install graphviz
sudo apt-get install default-jdk
sudo apt-get install freeglut3-dev
sudo apt-get install libopencv-dev

This step takes a considerable amount of time (at least an hour and a half, more depending on your internet connection): many of the libraries listed are very large (they total nearly 1GB) and heavily compressed.

2. I did not find it necessary to alter the MAKE_ARGS to change the threading flag.

3. Once I had finished the installation the tests mentioned did not work. After some head-scratching I realised this was, as very briefly mentioned at the bottom of the article, because the installation removes a kernel module – gspca_kinect – which comes with Ubuntu 12.04 and otherwise stops the Kinect from being visible to the rest of the system. For this removal to take effect the PandaBoard has to be restarted, after which the tests will function as the guide says: allowing a default test to be run as follows:

cd ~/kinect/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1.5.4.0/Samples/Bin/Arm-Release
./Sample-NiSimpleRead

Progress Update

Over the past week or so I have acquired a Pandaboard to run the project on, and organised a Microsoft Kinect and an iRobot Create (a Roomba without the vacuum cleaner compartment) for the main components.

I have spent some time setting up the Pandaboard and installing an Operating System. I have opted to use an ARM desktop build of Ubuntu 12.04 for buycbdproducts time being as it is relatively straight forward to use and people have previously got a Pandaboard running it and interfacing with a Kinect via the open source drivers. As such I figured that while it is a fairly heavy-weight Operating System for the task in hand – especially from a performance/power-consumption point of view – it is a known working configuration and is a great place to start and learn the process of getting it working.

I have tried to install and run the drivers, however while installing one of the libraries the system crashed and eventually had to be manually restarted. This left it in a partially upgraded state which did not find my somewhat heavy-handed restoration attempt pleasing. I am now back to square one and need to reinstall Ubuntu on the SD card and try again.