Raspberry Pi Troubleshooting List

This is a place to store notes and tips when I run into troubleshooting issues on the Raspberry Pi.

Wireless Issues:

  1. If using a USB wi-fi dongle that has the Ralink RT5370 ** chip. I have been experiencing lost signals and shutoff after using for short and long periods of time. This dongle has a power management feature that is causing issues. From the command line on Pi type iwconfig . Do you see an entry for Wlan0 that mentions power management: on  ?
    Hop into your interfaces file at the command line using

    sudo nano /etc/network/interfaces

    Add the following line. wireless-power off in the file. Exit and reboot.
    There is a good forum discussion on the topic here. http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=40474#p330868

  2. If you’ve made a change to /etc/network/interfaces you can restart networking with the command:
    sudo /etc/init.d/networking restart

RaspBian Package Updates & Reinstalls:

  1. Clear your package cache :
    sudo apt-get clean
  2. If you know the name of the package and want to remove it:
    sudo apt-get --purge remove packagename
  3. Install and use the Synaptic Package Manager:
    sudo apt-get install synaptic


    sudo synaptic
  4. Distribution upgrade command: sudo apt-get dist-upgrade
  5. Remove unneeded packages, fix broken installs, update package list, upgrade installed packages).
    sudo apt-get autoremove && sudo apt-get -f install && sudo apt-get update && sudo apt-get upgrade -y
  6. List all packages installed


    dpkg-query -l


    List packages using a search pattern


    It is possible to add a search pattern to list packages:

    dpkg-query -l 'foo*'


    Show status of all packages on the system


    To check the status of all packages on your system:

    dpkg -l | more


    This will show all packages (1 line each) that are in various stages of install (this includes packages that were removed but not purged). To show only the installed:

    dpkg -l | grep '^i'

Project Notes: Make: A Raspberry Pi Controlled Robot by Wolfram Donat

I’ve already been building various smaller robotic vehicles using the Raspberry Pi . However, I came across a review of the book by Wolfram Donat called MAKE: A RASPBERRY PI CONTROLLED ROBOT. Building a Rover with Python, Linus, Motors and Sensors. ( Book Link ) I’ve had some trouble using higher voltage motors (from a drill), a PI camera and various servos all on a working Rover. I knew I could learn something from this book so I bought if off Amazon.com and starting digging in a few days later. I am soooo glad i bought this book!!

I’m currently in Chapter 6 and I’ve really learned a lot already that is going to take my Rover to the next level.
I’ll chronicle my efforts on this blog along with my project notes. Stay tuned.

Changes to Pi:

1. Added static ip to /etc/network/interfaces so that I can use the same ip to SSH into every time.

2. Created a second /etc/network/interfaces file with an Ad Hoc network. This allows the PI to create a wireless network anywhere that you can log into with a computer or mobile device even if there is not a wireless network present. Great if you are testing outside, in the woods etc….

3. Added Tight VNC Server so that I can VNC into the pi if I ever want to use the GUI Desktop.
sudo apt-get install tightvncserver

Once VNC is installed you can start from the command line on the pi with :
vncserver :1 -geometry 1024×768 -depth 16

You’ll need to install VNC on your PC or Mac and then connect to the pi with this client.

4. Installed ServoBlaster for managing the Servos on my Pi Rover.

I’ll post instructions for the 4 steps soon. Drop a comment on here if you have any questions.

Setup Raspberry Pi for WebIOPi & Python PiCamera

These are my setup notes for flashing the SD drive with the latest version of Raspbian and installing everything I need.

1. Use SDFormatter to wipe my SD card and format it for the Raspbian OS image. Download is here.

2. Use Win32DiskImager to write the OS image to your flash drive.

3. Fire the Pi up. You’ll need to have a screen connected via HDMI and a keyboard for the initial setup.

4. You’ll arrive at the Setup Options blue screen. First thing to do is Expand Filesystem. Check.

5. If you are located in the U.S.A like I am, you’ll want to set the Pi to a U.S. keyboard layout. It’s default is a UK style board and can cause a U.S. user some weirdness if not switched.
So, Follow Internationalazion Options => Change Timezone . I then selected U.S and then mountain timezone. Check.
Next, go back into Internationalazion Options => Change Keyboard Layout
  It can get a little tricky here so pay attention!
a. Pick your keyboard. I have a generic Dell so I just selected Dell and then OK.
b. The next section asks for Keyboard Layout – Pick “Other” and then Ok.
c. Now is another selection: Country of origin. Select English (US) and then Enter
d. Another Keyboard Layout Page !!!! Stay with us, almost done. Select the first option which is English (US) again and then Enter
e. Key to function as AltGr. Select “The Default for the keyboard layout”. Enter
f. Compose Key:. Select No compose Key.
g. Control Alt Backspace. Select your preference here. Yes or no.
h. Congratulations! You’ve selected your keyboard!!! Wooo hoooo.

6. Enable Camera if you are using the RPI Cam. This is done in the raspi-config tools.

7. Install RPI Cam Interface. ( http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=63276 )

** Note: If you don’t have GIT installed do it now.
sudo apt-get install git-core

git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh

./RPi_Cam_Web_Interface_Installer.sh install

8. Update your repository listings and Pi. At the command line type:
Sudo apt-get update  and then hit enter.
Sudo apt-get upgrade and then enter.
This might take awhile.


9. Install Python language additions. From raspberrypi.io …. While the RaspberryPi (& Raspian) run Python out-of-the-box, you’ll likely want some common packaging tools for more advanced development. The following gets you some common Python tools (distribute for packaging, pip for easy installation/removal of packages & virtualenv for nice isolated environments):

  • sudo apt-get install python-setuptools
    sudo easy_install pip
    sudo pip install virtualenv

10 . Install Python PiCamera if you have the RPI Camera.

sudo apt-get install python-picamera

The documentation for the Python PiCamera is located here. http://picamera.readthedocs.org/en/release-1.8/