Your SD Card will go into the SD slot in the BACK of the Pi. Make sure to insert the card in the proper orientation.
NOTE: you will need to get the serial connection working eventually, but if you are having troubhle with the following, skip ahead to the WiFi section and use the /boot/wpa_supplicant.conf
trick to get LAMPI on the WiFi network.
- Carefully connect the Micro-USB Cable to the Micro-USB connector on the board, matching the cable orientation to match the connector.
BE VERY, VERY CAREFUL WITH THE MICRO-USB CONNECTION - IT HAS MINIMAL STRAIN RELIEF AND CAN BE PULLED OFF THE BOARD IF YOU ARE CARELESS
BE VERY, VERY CAREFUL WITH THE MICRO-USB CONNECTION - IT HAS MINIMAL STRAIN RELIEF AND CAN BE PULLED OFF THE BOARD IF YOU ARE CARELESS - Plug the power cord into an AC outlet, then plug the power adapter into the LAMPI. The Pi should have a steady red light on.
- Plug the USB part of the Serial Cable into your USB port of your computer.
- The LAMPI Interface Board has an FTDI Serial-USB chip (an FTDI FT230X) to simplify connecting your computer to the serial port on the Raspberry Pi. Install any needed Virtual COM Port Drivers for the FTDI USB-Serial chip FTDI VPC Drivers needed for your OS.
- Install any necessary terminal emulator software needed for your OS (see Serial Terminal Basics which has helpful basic information as well as links to several popular terminal emulator applications for various Operating Systems; note: the baud rate and other settiings in that link are focused on connecting to Arduino devices, which are slower and have a much lower baud rate - use the settings below for the Raspberry Pi).
- Then in your terminal emulator, connect to your Pi. The following images are from the Serial app for OSX, a non-free application.
The Line Settings within Terminal Settings should be:
- Baud Rate: 115200
- Data Bits: 8
- Parity: None
- Stop: 1
- Log into your Raspberry Pi:
- login:
pi
- password:
raspberry
- login:
- Run
sudo raspi-config
to perform initial setup. - Highlight
1 Expand Filesystem
and press enter. Follow the prompts. - Highlight
2 Change User Password
and choose a new password.
Congratulations, your LAMPI is up and running!
NOTE: your Raspberry Pi is about to be connected to the network - you must change the password from the default. In several cases, we have seen Raspberry Pis with default passwords become compromised within 10-15 minutes of being connected to the internet. When this happens it can be destructive but not immediately obvious.
Some helpful instructions: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
NOTE: the Linux sudo
command allows you to execute commands as another user. By default, that other user is root, the superuser. Executing commands as root can be dangerous - you can, for example, delete every file on the system. That would probably be bad. We will require superuser privileges to access certain hardware devices, change system settings, and generally muck about with the Raspian system.
Use sudo carefully. Don't let the power go to your head.
-
In the terminal, scan for WiFi networks via
sudo iwlist wlan0 scan
. You'll see networks listed. You'll want to find the name of the network and password.- The name of the network is from either ssid or ESSID.
-
Add the network details to your Raspberry Pi. A configuration for connecting to "CaseGuest" and "csuguest" is shown below.
- Using whatever terminal text editor you prefer (https://www.raspberrypi.org/documentation/linux/usage/text-editors.md), open the
wpa_supplicant.conf
configuration file. The command will look something like:sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
. - The configuration file will open, add the information for your network below the existing content.
country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="CaseGuest" key_mgmt=NONE } network={ ssid="csuguest" key_mgmt=NONE }
- Save the updated
wpa_supplicant.conf
file.
- Using whatever terminal text editor you prefer (https://www.raspberrypi.org/documentation/linux/usage/text-editors.md), open the
-
At this stage, reboot your Raspberry Pi via
sudo reboot
(a reboot is not strictly necessary, but it is the easiest way to ensure all of the network configurations are updated). -
After the pi reboots, login again via the serial console and test your network connection via
ping www.google.com
to verify that you are connected to the Internet. -
Test that ssh is working. Get the IP address of your Pi via
ifconfig
which will have output likenbarendt@nick-raspberrypi:~$ ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:2f:9f:38 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:72 errors:0 dropped:0 overruns:0 frame:0 TX packets:72 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6288 (6.1 KiB) TX bytes:6288 (6.1 KiB) wlan0 Link encap:Ethernet HWaddr 00:13:ef:30:02:72 inet addr:10.0.1.34 Bcast:10.0.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:40 errors:0 dropped:4 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6883 (6.7 KiB) TX bytes:8131 (7.9 KiB)
SSH is the "Secure Shell". Linux and Mac's have an SSH client installed by default. If you are on Windows, consider PuTTy.
Fom ssh to your Raspberry Pi's IP address viassh -l pi PUT_YOUR_PIS_IP_ADDRESS_HERE
or, alternatively,
ssh pi@PUT_YOUR_PIS_IP_ADDRESS_HERE
Recently releases of Raspbian support a convenient trick to configure WiFi. You can put an appropriately configured wpa_supplicant.conf
file in the /boot
partition on the SD card when it is inserted into your computer and mounted. At boot time, a helper script will check /boot
for a wpa_supplicant.conf
file; if the file is found, it is moved to /etc/wpa_supplicant/wpa_supplicant.conf
replacing any file that might be there already. (This is similar to the trick of creating an ssh
file in /boot
, which we did previously, to enable the SSH Server).
Here's how to use this trick, if needed:
- Power off LAMPI / Raspberry Pi
- Remove SD Card from the Raspberry Pi
- Insert SD Card into your computer
- Mount the
/boot
partition, if needed - Create a properly formatted
wpa_supplicant.conf
file in/boot
- Unmount
/boot
/ Properly Eject the SD card from your computer - Insert the SD Card into the Raspberry Pi
- Power LAMPI / Rasbperry Pi
Typically, you want your devices to reduce their energy usage. For instance, a default configuration for Raspbian on the Raspberry Pi 3 is to put the WiFi interface to sleep if it is idle for a certain lenght of time. This creates some problems for us, though, as LAMPI will disappear from the wireless network if there is no wireless traffic. We therefore need to disable power management on the WiFi interface. n
-
Using your preferred text editor open the
/etc/network/interfaces
file as root. The command will look something like:sudo vi /etc/network/interfaces
. t -
Edit the file to include
wireless-power off
after theiface wlan0 inet manual
line, like so:# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet manual wireless-power off wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
-
At this stage, power down your Raspberry Pi via
sudo poweroff
and disconnect the power.
Next up: go to Interface LED
© 2015-18 LeanDog, Inc. and Nick Barendt