Chapter 06 Raspberry Pi 3 B Getting Started Guide
User Manual:
Open the PDF directly: View PDF
.
Page Count: 3

I649E Wireless Sensor Networks
Getting Started Guide
Raspberry Pi 3 Model B
1. Installation
i. Download NOOB’s Raspberry Pi OS from
https://www.raspberrypi.org/downloads/noobs/
or from mirror at JAIST
http://ftp.jaist.ac.jp/pub/raspberrypi/NOOBS/images/
ii. Extract files into your SD card
iii. Put the SD card back to Raspberry Pi
iv. Boot and install (first item). It takes around 30 minutes to complete.
Note: If you want to connect Raspberry Pi to JAIST wireless network, please do not forget to add
MAC address of wlan0 interface (using command ifconfig in terminal to see Raspberry Pi network
information) in https://rcaci.jaist.ac.jp/apply_wifi_macauth.
2. Connect Raspberry Pi through SSH
2.1 Raspberry Pi Configuration
i. Start > Preferences > Raspberry Pi Configuration
ii. Set Hostname e.g. node3
iii. Interface tab > Enable SSH
iv. You can enable VNC for remote desktop capability though VNC Viewer
v. Use this for login as
User: pi
Password: raspberry
2.1.1 Windows
i. Download PuTTY and install from https://putty.org
ii. Enter Hostname.local or IP address
node5.local
10.10.0.5
2.1.2 Mac and Linux
i. Open terminal
ii. Type
ssh pi@<IP address>
ssh pi@<Hostname>
ssh pi@10.10.0.4
ssh pi@node4.local

3. Update and Install Essential Software
i. Type
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo pip install --upgrade pip
sudo apt-get install olsrd iperf wavemon python-numpy python-scipy
python-matplotlib -y
4. Raspberry Pi wlan0 Ad-Hoc Setup
i. Edit the interfaces file in /etc/network/
sudo nano /etc/network/interfaces
ii. Add the following
auto wlan0
iface wlan0 inet static
address <IP address>
netmask 255.255.255.0
mtu 1500
wireless-channel <channel>
wireless-essid <network name>
wireless-mode ad-hoc
wireless-ap any
iii. Reboot Raspberry Pi to take effect.
5. Optimized Link State Routing Protocol Daemon (OLSRD)
i. Start OLSRD using wlan0 interface on Raspberry Pi with debug level 1
sudo olsrd -i wlan0 -d 1
ii. Check the communication by using ping command
ping <IP address>
ping 10.10.0.5
iii. For multi-hop capability. You need to force two nodes to use a gateway by using firewall to
block each other. There is no direct implementation on OLSRD.
sudo iptables -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP
iv. Use the command route or traceroute to see if they use a gateway
route
traceroute <IP address>

6. Throughput Measurement
The command is iperf. iperf is a tool for active measurements of the maximum achievable
bandwidth on IP networks.
• Server side
sudo iperf -s
• Client side
sudo iperf -c <IP address> -t <time in second>
Revised on 12 June 2018