SW Installation

Hello, today I inaugurate the english version of my blog.

As soon as I can I’ll translate also the static pages.

By the way, consider that this project is based on raspberry pi (rev B) for the motion control of the quadcopter.

Here there is a description of the necessary sw installation.

I’m using a laptop with ubuntu, and there I installed  ninja IDE, direcly from  ubuntu software center.

On this laptop I create a folder home /home/pyton/qpi.

Considering the rpi installation:

I copied a 2013-02-09-wheezy-raspbian.img on a  2GB SD.(right now you can find an updated verison of raspbian, on the rpi website  here: link

Start rpi connected on a monitor,my case was tv  via hdmi wire , mouse and keyboard and a ethernet cable.

Leave the default setting in the config.

Now you can disconnect all from rpi except the ethernet wire.

On the router  I defined a static address :192.168.0.50 , related with rpi mac address. (i have a netgear router and it waas really intuitive to set it ).

From the laptop , on the terminal use [See note below if you encounter problem with ssh]:

ssh pi@192.168.0.50
password : raspberry

Now yuo are using rpi from the laptop

Execute:

$ sudo apt-get undate
$ sudo apt-get upgrade

The update/upgrade can take up to one hour.

Since I ‘ll use rpi to pilot the motors I ‘nned to install the library that can manage the GPIO in rpi.

This library  RPIO allows to set any output as PWM:

$ sudo apt-get install python-setuptools
$ sudo easy_install -U RPIO

Now let’s see how to set up the Wifi Connection via usb dongle.

Do not connect the usb dongle.

Install the  wpa_supplicant  utility:

$ apt-get install wpasupplicant

Run the utility to create the password_phrase:

$  wpa_passphrase My_WiFi_SSID mypassword

Yuo will get this output.

network={
    ssid="My_WiFi_SSID"
    #psk="mypassword"
    psk=b2abb0fcd2f4527e11817de0823a57bb19ba4622f4595062c94ec4dd1370b5fe
}

Copy the  psk value.

Run the editor to modify the  /etc/network/interfaces

$ sudo nano /etc/network/interfaces

Modify the file (pasting the psk value):

...

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
  wpa-ssid "My_WiFi_SSID"
  wpa-psk b2abb0fcd2f4527e11817de0823a57bb19ba4622f4595062c94ec4dd1370b5fe

Switch off  RPi.

Connect teh dongle and disconnet the ethernet wire.

Restart rpi and you are on line.

Set the router in case you want a fixed ip address for the wifi connection.

Link:

ninja IDE

RPIO

NOTE: recently I clean up my laptop and installed ubuntu 13.10 on it.

From that moment it has been not possible to use ssh using wired connection.

So I solve it modifying the rpi eth0 configuration manually.

pi@raspberrypi ~ $ sudo nano /etc/network/interfaces
iface lo inet loopback
#iface eth0 inet dhcp
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1

In the same way, in the laptop I defined a static ip address 192.168.1.1

Advertisements

2 thoughts on “SW Installation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s