Intro Linux, Raspbian dhcpd, hostAP Raspberry PI 3 Dr. John Yoon
Intro Linux, Raspbian
dhcpd, hostAP
Raspberry PI 3
Dr. John Yoon
RPi 3B
RPI 3 Specifications
1.2 GHz 64-bit Quad-core ARMv8 CPU
802.11n wifi
Bluetooth 4.1
BLE
1 GB RAM
4 USB Ports; Full HDMI port; Ethernet port
40 GPIO pins
3.5mm audio jack; composite video
Camera interface (CSI); Display interface (DSI)
Micro SD card slot
VideoCore IV 3D graphics core
GPIO Pinouts
Raspbian Linux
Pre-Knowledge
SD Card Formatting• SF formatter for windows to download from sdcard.org
• Run the formatter after inserting the SD card
NOOBS (New Out Of the Box Software)• Download from raspberrypi.org/downloads
• Copy all the files/folders of NOOBS to the SD card
Now, on Raspberry Pi• Install OS
oRasbian (based on Debian)
oUbuntu Mate (based on Debian)
Raspbian on RPi3
Choose
• Raspbian (debian)
• Language: English (US)
• Keyboard: US
Now
Ready to issue shell commands
VNCVirtual Network Computing
Download & Install
Advanced IP Scanner
• https://www.advanced-ip-scanner.com/
Real VNC
• https://www.realvnc.com/en/connect/download/viewer/windows/
VNC Configuration on RPI
Menu on Top Left
• Preferences > Raspberry Pi Configuration > Interfaces
o Enable VNC
o Enable SSH
• Or, on terminal
o Type: sudo raspi-config
o Enable VNC as above
Software Installation on PC
To obtain the IP of Raspberry PI• By double-clicking VNC on RPi: get the IP
• Or, terminal command-line on RPio Command: ifconfig –a
o Then, find the IP of RPi
• Or, using “Advanced IP Scanner on Windowso IP range on Advanced IP Scanner can be figured out form
cmd > config /all– Get your laptop’s IP
– Based on the IP, 192.168.1.1-254 to scan
VNC Viewer• File > New Connection > enter IP
• Double-click on the icon to start VNC
On IP Scanner
Get the IP for your raspberry
On VNC
File
• New Connection
Now Connect
Your login and password
What About on Mac?
On terminal
• Command
o ssh pi@<your raspi IP>
VNC on Mac?
Install on Raspberry Pi
• ssh apt-get install tightvncserver
Run on Raspberry Pi
• vncserver :1 –geometry 1920x1080 –depth 24
Now on Mac (as Client)
Install realvnc
• Choose VNC Viewer
Run vnc viewer
• After this, very similar to Windows
To Connect to RPi from Windows
Raspbian login from Windows
• The default credential:
o ID: pi
oPassword: raspberry
Note that
• If your AP is changed,
oRe-configure for VNC connection again for new IP’s!
Networkingdhcpdnsmsqdhostapd
Wifi Access Point
In Raspbian
Commandssudo apt update
sudo apt install network-manager network-manager-gnome
openvpn \openvpn-systemd-resolved network-manager-openvpn
\network-manager-openvpn-gnome
sudo apt purge openresolv dhcpcd5
sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf
On RPi
Click on top bar
• Panel Setting > Panel Applets >
oRemove “Wired & Wireless Networks”
oRemove “Spacer”, the one below
Then Reboot
Task Bar Setting on RPI
Choose Panel Setting
Panel Applet on RPI
Wireless & Wired Network > Remove
Spacer > Remove
On RPi
Click on top icon “wireless…”• Edit Connection > Add > Wi-Fi
o Then, click on the “Create” button
• Click on the Edit button
• On the Wi-Fi tapo Enter on Connection name
o Enter SSID // maybe the same as above
o Choose Mode to “Hotspot”
• On the Wi-Fi Security tapo Choose Security Name: WPA & WPA2 Personal
o Enter Password – // this will be used to connect from your device to this AP
Then Reboot
After that,