12/15/2012

Getting started with Raspberry Pi (without needing a separate keyboard)

The wonderful little Raspberry Pi



Purchased from http://www.newark.com/


RASPBRRY-MODB-512M - MODEL B


  •  Silicon Manufacturer: Broadcom
  •  Core Architecture: ARM
  •  Core Sub-Architecture: ARM11
  •  Silicon Core Number: BCM2835
  •  Kit Contents: Assembled Board Only
  •  RoHS Compliant: Yes

Ports on Board:
  • Ethernet
  • 2 USB
  • 1 Micro USB for power (5v 1A)
  • 1 HDMI (full-size)
  • GPIO
  • Coaxial Audio Out

Accessories required

SD Card
Full Size SDHC Card  minimum 2 GB storage (I used 4 GB Kingston MicroSD with Adapter). The advantage of MicroSD over SD is that you can swap it out eassily while the adapter stays put in the motherboard.

Power Adapter
I have used the Nexus 7 Power adapter with ratings 5V 2A. RPi is finicky about power so  choose a "good" power source.

HDMI Cable
Bought it real cheap from Amazon.  HDMI Cable Link

TV/Display
For your visual gratification only.

Keyboard
Not really required, I will explain how your existing computer's keyboard can be used.

Ethernet Cable
Required.

Router and Internet Connection
Your existing Wireless Router should work.

Installation

Download the Raspbian Wheezy image from http://www.raspberrypi.org/downloads and write it to the SD card. Instructions are given on the download page.

Plug the HDMI cable into your Display and the other end into RPi.

Plug the Ethernet cable into RPi and the other end into one of LAN ports available on the router.

Slide the SD Card into RPi.

Power on the Display.

Attach the MicroUSB power cable and power it on.

You will see some text scrolling on your display. 

The first time boot will end up in a "blue" raspi-config screen asking you to configure some settings. But, hey, there is no keyboard! 

Before you can use PuTTy, you need to find the IP of RPi. If you can access the admin console of your router (usually available at http://192.168.1.1) navigate around and find the page when all computers in the network are shown.
In my case the RPi shows up as

PC Name:raspberry
Connection Type:
Ethernet
IP Address:192.168.1.6
Status:Active

Now start putty and SSH your way into RPi. Default user/password in given in the RPi download page.
After you have successfully logged in, run the following:

raspi-config

This will open up the same window which is showing up on your display right now. Use Tab, Up/Down and Enter keys to make your selections.

Most important are:
  • Resize Partitions to fill the space.
  • Enable SSH on startup.
  • Desktop Mode.
Make your selection and reboot. RPi will restart and your SSH connection will be lost. When it boots up, you have to reconnect using PuTTy.

Now you can install some utilities.

To be able to connect to other shared folders on the network.
apt-get install cifs-utils
To be able to remotely control the RPi User Interface (that's how you don't need a Keyboard!)
apt-get install x11vnc
Light DM
apt-get install lightdm
During the installation of LightDM, it will prompt you to choose a default login-manager. Use LightDM.

Reboot. (reboot command on PuTTy).

Once RPi is back up, reconnect PuTTy. (Meanwhile, your display should have a Login screen, asking you to enter User Id).

Execute this command on PuTTy:

x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage

You also need to install a Vncviewer on your computer. I used TightVNC http://tightvnc.com/download.php

Start the VNC Viewer on your computer. There would be an option to enter the Remote Host information.
Specify 192.168.1.6::5900

Note the IP 192.168.1.6 is same as the IP of RPi that we found out earlier.

This will take you straight to the Linux UI where you need to enter the UserId and Password. Whatever you do on your computer int the VNC Viewer window will also be visible on the Display attached to RPi. (See, no extra keyboard necessary!).

For playing Audio/Video on your Display/TV use this command from the PuTTy window:

omxplayer -o hdmi /path/to/your/media/file

And voila.

Want more fun, install the VNC Viewer App from Android Market on your Phone/Tablet.
Want even more fun, install XBMC, the full feature media console. We'll talk about that some other time.




















  






2 comments:

  1. Is display really needed except to be sure the RPi has finished booting?

    ReplyDelete
    Replies
    1. Not needed, if you all you need is to be able to SSH. If you want to play a movie you'll need to connect it to a display.

      Delete