-
Notifications
You must be signed in to change notification settings - Fork 22
BerePi...Network Setup
TinyOS Lover (3PO_Kang) edited this page Jul 10, 2015
·
18 revisions
-
Check current network status
-
ifconfig
shows network information -
ip addr show
gives IP address
-
-
Wi-Fi setting
- plug in Wi-Fi dongle in to the USB port of RaspberryPi
- edit /etc/network/interfaces,
sudo vim /etc/network/interfaces
- un-comment (delete # at the front of each line)
- use one at a time, OPEN mode or WPA mode
- fill in SSID and KEY
- close vi editor (:wq)
- this is example of my Wi-Fi config
- network restart, type
sudo service networking restart
- or just reboot, type
sudo reboot
- after restart of networking service, ping 8.8.8.8 to check Internet connection
- now, you can use eth0 169.254.0.2 & wlan0 10.255.11.155 (screen shot) at the same time
- It comes from MELTWATER'S RASPBERRY PI HARDWARE
- It is very convinient to use RaspberryPi without HDMI Monitor and Keyboard
- But be careful to connect to the Wi-Fi AP
- If you have a lot of RaspberryPi in the same Wi-Fi network using 169.254.0.2 same IP address, you can not control to which log-in RaspberryPi, using
ssh [email protected]
- It guides ssh to any of RaspberryPi in the Wi-Fi network. All the pre-setting SD Card image has same ID & Password.
- You can easily avoid this problem to turn-off Wi-Fi connection in case that you want to use only Direct connection to RaspberryPi
- How to delete 169.254.0.2 IP address
- just delete IP address on the /boot/cmdline.txt
-
sudo vim /boot/cmdline.txt
- dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait ip=169.254.0.2
- delete last part, and keep this 1-line, sometimes, editor make this break 2-lines
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
- Just edit any machine you want
- in the RaspberryPi shell you can use vim to edit /boot/cmdline.txt
- Mac OSX or Windows, just use SD card reader to connect Host OS, and edit with Unix-style editor, Mac Vim, Win32 Vim...