Networking and communications (Apr 24)

Assignment
   Build a wired &/or wireless network with at least two nodes



This week I will practice with the WiFi communications of the mainboard I want to use for my final project, the Raspberry Pi. I looked for a USB WiFi to connect to this board

Raspberry Pi
Raspberry Pi Logo.svg
RaspberryPi.jpg
"Raspberry Pi" Computer Model-B Rev1
Developer Raspberry Pi Foundation
Type Single-board computer
Release date 29 February 2012[1]
Introductory price US$ 25 (model A) and US$ 35 (model B)
Operating system Linux (Raspbian, Debian GNU/Linux, Fedora, and Arch Linux ARM)[2] RISC OS, FreeBSD,NetBSD, Plan 9
Power 2.5 W (model A), 3.5 W (model B)
CPU ARM1176JZF-S (armv6k) 700 MHz,[3]Raspberry Pis can dynamically increase clockspeeds, and some can temporarily reach speeds up to 1 GHz.[4]
Storage capacity SD card slot
(SD or SDHC card)
Memory 256 MByte (Model A)
512 MByte (Model B rev 2)[5]
256 MByte (Model B rev 1)
Graphics Broadcom VideoCore IV[3]
Website www.raspberrypi.org

The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools.

The Raspberry Pi is manufactured through licensed manufacturing deals with Element 14/Premier Farnell and RS Components. Both of these companies sell the Raspberry Pi online.

The Raspberry Pi has a Broadcom BCM2835 system on a chip (SoC), which includes an ARM1176JZF-S 700 MHz processor (The firmware includes a number of "Turbo" modes so that the user can attempt overclocking, up to 1 GHz, without affecting the warranty),VideoCore IV GPU, and was originally shipped with 256 megabytes of RAM, later upgraded to 512MB.It does not include a built-inhard disk or solid-state drive, but uses an SD card for booting and long-term storage.The Foundation's goal is to offer two versions, priced at US$25 and US$35. The Foundation started accepting orders for the higher priced model B on 29 February 2012,and the lower cost model A on 4 February 2013.

The Foundation provides Debian and Arch Linux ARM distributions for download.Also planned are tools for supporting Python as the main programming language,with support for BBC BASIC,(via the RISC OS image or the "Brandy Basic" clone for Linux),C,and Perl.

On 17 December 2012 the Raspberry Pi Foundation, in collaboration with IndieCity and Velocix, opened the "Pi Store", as a "one-stop shop for all your Raspberry Pi (software) needs". Using an application included in Raspbian, users can browse through several categories and download what they want. Software can also be uploaded for moderation and release.


First I Prepare the SD card for the Raspberry Pi



This page contains links to SD card images for various operating system distributions. The minimum size SD card you can use is 2GB, but it is recommended to get a 4GB SD card or above. For each distribution, we provide both a direct HTTP download, a torrent file and a SHA-1 hash; the total number of concurrent direct downloads is limited, so we encourage you to use the torrent file if at all possible. It’s helpful to us if you download the torrent from this page, because it means we can see how many downloads are going on and use that to make rough predictions about sales.

If you’re a total beginner and the above paragraph makes no sense at all to you, please come to the beginners’ section of our forum, where you can ask questions and members of our very friendly community will do their best to help you out.

If you are unable to torrent the file and we’ve run out of HTTP download room here, you can see a list of mirrors for direct HTTP downloads that our amazing community has set upon on the wiki .

To use an image file, you will need to unzip it and write it to a suitable SD card using the UNIX tool dd. Windows users should use o. Do not try to drag and drop or otherwise copy over the image without using dd or Win32DiskImager – it won’t work. If you’re still not clear on what to do, the community on the Raspberry Pi Wiki has written a guide for beginners on how to set up your SD card.


If you’re just starting out, this is the image we recommend you use. It’s a reference root filesystem from Alex and Dom, based on the Raspbian optimised version of Debian, and containing LXDE, Midori, development tools and example source code for multimedia functions.



Torrent 2013-02-09-wheezy-raspbian.zip.torrent
Direct download 2013-02-09-wheezy-raspbian.zip
SHA-1 b4375dc9d140e6e48e0406f96dead3601fac6c81
Default login Username: pi Password: raspberry

Booting my Raspberry Pi for the first time

  1. On first boot you will come to the Raspi-config window
  2. Change settings such as timezone and locale if you want
  3. Finally, select the second choice:
    • expand_rootfs
    • and say ‘yes’ to a reboot
    1. The Raspberry Pi will reboot and you will see raspberrypi login:pi
    2. You will be asked for your Password:raspberry
    3. You will then see the prompt:pi@raspberry ~ $
    4. Start the desktop by typing:startx
    5. You will find yourself in a familiar-but-different desktop environment.
    6. sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback

#DHCP
#iface eth0 inet dhcp

#STATIC
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

#WLAN (WiFi)
auto wlan0
iface wlan0 inet static
address 192.168.2.150
netmask 255.255.255.0
gateway 192.168.2.1
wpa-ssid "Network name"
wpa-psk "Network password"
  1. sudo /etc/init.d/networking restart
  2. ifconfig


To remotely connect to the Raspberry, I need a ssh connection

Ubuntu

Ubuntu install the SSH server by default, I can run it
ssh user@hostname

In this case : ssh pi@192.168.2.150
How do you generate the SSH keys

Windows

In Windows I need to install an SSH server, for example Putty




This is my WiFi network with at least two nodes. I



Update Raspberry pi connected to Internet



 PC connected to Raspberry pi