Monday 22 February 2016

Debugging Issues with your DreamPi

Sometimes despite your best efforts, your DreamPi setup just isn't working. This blog post will summarize some of the things you can do to debug the issue!

SSH is Your Friend

The first thing you need to do is to be able to connect to your DreamPi to see what is going on. Now you could do this by connecting a keyboard, then connecting it to the TV and switching between outputs. This works, but it's fiddly, if you do this you can't really see in real-time what is going on.

SSH is a protocol for allowing you to remotely connect to a machine and run commands as if you were directly logged in. If you use Windows you'll want to use Putty, if you use another (more sensible :p) operating system SSH should be built in or easily installable and usable from the built-in terminal.

If you do use Putty, there is a tutorial here for setting it up. The key thing is that you are connected to the same network as your DreamPi, and the hostname you use to connect is "dreampi.local". The username must be "pi" and the password is "raspberry". Once connected you will be dropped to a Linux command shell. If you want to disconnect press CTRL+D at the same time.

Watch the Logs!

Whether you're directly connected to the Pi or over SSH the next thing you'll need to do is run a Linux command. This one:

sudo tail -f /var/log/syslog

I'll break it down so you know what it's doing:
  • sudo - runs the command as an admin, you'll be asked for the password again
  • tail - the "tail" command shows the end of a file
  • -f - this flag tells the tail command to stream the file in real-time 
  • /var/log/syslog - this is the file we're watching
Now, that's all you need to do. Now if you connect your Dreamcast you can see the output from the DreamPi software but also from the PPP service which is responsible for routing the connection.