Raspberry Pi 3 Model B+

The Raspberry Pi 3 Model B+ is a compact, affordable single-board computer ideal for DIY projects, education, and IoT applications. It features a 1.4 GHz quad-core CPU, 1 GB RAM, built-in Wi-Fi, Bluetooth 4.2, and Ethernet. With USB ports, HDMI, and GPIO pins, it's highly versatile for tasks like media playback, programming, robotics, and home automation.

Raspberry Pi 3 Model B+
Fig.: Raspberry Pi 3 Model B+

Applications

Features/Specifications

Processor Broadcom BCM2837B0, Quad-core ARM Cortex-A53 (64-bit) 1.4 GHz
RAM 1 GB LPDDR2 SDRAM
Wireless 2.4 GHz and 5 GHz IEEE 802.11.b/g/n/ac Wi-Fi
Bluetooth Bluetooth 4.2, BLE
Ethernet Gigabit Ethernet over USB 2.0 (max throughput ~300 Mbps)
USB Ports 4 × USB 2.0
Video & Audio Full-size HDMI, MIPI DSI display port, MIPI CSI camera port, 4-pole stereo output and composite video
Storage microSD slot for OS and data storage
GPIO 40-pin GPIO header, fully backward-compatible
Power 5V/2.5A DC via micro USB or GPIO header
Dimensions 85.6 mm × 56.5 mm
Weight ~50g

📄 Raspberry Pi 3 Model B+ datasheet (676 kB)

Connections

Pinout-Chart of the Raspberry Pi 3 Model B+ (Copyright: https://www.raspberrypi.org/documentation/usage/gpio/)
Fig.: Pinout-Chart of the Raspberry Pi 3 Model B+ (Copyright: https://www.raspberrypi.org/documentation/usage/gpio/)

Used Components

Setting up the Raspberry Pi

Preparing the Operating System "Raspbian"

(The following steps were performed using Microsoft Windows 10.)
One of the official operating systems for the RPi is Raspbian, a derivative of Debian Linux. First, download the latest image of Raspbian:
https://www.raspberrypi.org/downloads/raspbian/
I used "Raspbian Stretch Lite" because I wanted to set up the RPi via SSH and therefore did not need a desktop environment. After extracting the .zip archive, the IMG file is flashed onto the SD card. For this, you can use a program like Etcher. After successfully creating the flashed SD card, two partitions are created, but only one (boot) is readable under Windows. To enable SSH on Raspbian immediately after booting, simply place an empty text file named "ssh" in the root directory of the boot partition on the SD card.

First boot of the Raspberry Pi

Now insert the prepared SD card into the RPi, connect a LAN cable between the RPi and your router (e.g., FritzBox), and connect the RPi to a power source (e.g., the included power supply or a power bank). The power source should be capable of supplying 2000mA, otherwise unexpected behavior of the RPi may occur.
The boot process only takes a few seconds, and then you can connect to the Raspberry Pi via SSH using a terminal program (e.g., PuTTY):

Hostname: raspberrypi.local
Username: pi
Password: raspberry
First login using SSH terminal PuTTY on the Raspberry Pi
Fig.: First login using SSH terminal PuTTY on the Raspberry Pi

You don’t have to use the hostname; you can also find out the IP address (192.168.xxx.xxx) of the RPi via your connected router. For security reasons, the password should also be changed after the first login:

$ sudo raspi-config

Additional users can also be created and added to the sudo group, for example:

$ sudo useradd -m christian -G sudo

Important commands and programs

Properly shutting down and restarting the Raspberry Pi

Raspbian is a Linux operating system and, like any other OS, often temporarily stores data in a cache before writing it to permanent storage. You should never power off the RPi "hard," meaning you should never just unplug or switch off the power supply. Doing so can compromise data and system integrity, and may even lead to hardware damage.
To shut down the system:
$ sudo shutdown -h 0 or sudo shutdown -h now
or you can use the alias:
$ sudo poweroff
To restart the system, use the following commands:
$ sudo shutdown -r 0 or sudo shutdown -r now
or the shorter alias:
$ sudo reboot

Becoming "root"

For certain actions, you need to be logged in as root. This can be done with:

$ sudo su -

BIOS Settings with "config.txt"

Instead of a traditional BIOS, the RPi uses the configuration file /boot/config.txt. In this text-based file, all BIOS-related settings can be made.

$ less /boot/config.txt

Configuring the Raspberry Pi

Basic settings can be configured using a small configuration tool. These include changing the user password, localization, enabling the Pi camera, hostname, assigning shared memory to the GPU, enabling an SSH server, booting to command line or desktop, and more.

$ sudo raspi-config

Preserving the SD card

Outsourcing logs to RAM

Since many processes on Raspbian (i.e., Linux) repeatedly write small and large amounts of data to the disk, i.e., to the SD card — especially log files — this section shows how to reduce such write operations to the SD card in order to extend its lifespan. In the following file:

$ sudo nano /etc/fstab

add this line:

$ tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0

and then reboot the system.

Disabling swapping

The following command completely disables swapping to the SD card, so only RAM is used for processes.

$ sudo swapoff --all

Caution: Only disable swapping if you're aware of the consequences, as this can lead to major performance issues when running memory-intensive programs!

To check the status, the following command can be used:

$ sudo free -mh

Setting up Wi-Fi

To access the RPi without a LAN cable, we first need to enable and configure Wi-Fi so that our RPi can connect to the local wireless network (e.g., via a FritzBox).

First, check whether the system detects the Wi-Fi adapter:

$ sudo iwlist scan

The network interface name on the Raspberry Pi 3 is wlan0, while older RPis with USB Wi-Fi adapters may show a different name depending on the kernel module used for the adapter.

Now scan the area for available Wi-Fi networks:
$ sudo iwlist wlan0 scan or sudo iwlist wlan0 scan | egrep "(ESSID|IEEE)"
This will give you a list of all nearby Wi-Fi networks. Your desired network should also appear in this list.

In order for the RPi to connect to your Wi-Fi network, we need to provide the authentication details. First, open the following file:

$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add the following lines:

network={
   ssid="XXXXX"
   psk="YYYYY"
}

where XXXXX should be replaced with your Wi-Fi network's SSID and YYYYY with the password.

Also, the power-saving mode should be disabled while the Wi-Fi module is in use, as otherwise the RPi might disconnect from the Wi-Fi network after a while. To prevent this, add the following two lines at the end of the /etc/network/interfaces file:

pre-up iw dev wlan0 set power_save off
post-down iw dev wlan0 set power_save on

Now briefly "restart" the network, unplug the LAN cable, and Wi-Fi should be active:

$ sudo ifdown wlan0
$ sudo ifup wlan0
$ sudo ifconfig wlan0 | grep inet

Of course, the active SSH connection will be interrupted, but you can now reconnect — this time via Wi-Fi. To check if the Wi-Fi connection is working properly, try pinging a public website, for example:

$ ping turanis.de

If the Wi-Fi connection does not work, try rebooting the RPi.

Wi-Fi connection with an Android Phone

When on the go (e.g., for taking time-lapse recordings), there may be no Wi-Fi network available. However, you can still connect to the RPi by setting up a Wi-Fi hotspot on your Android phone and preconfiguring it on the RPi. Then, you can conveniently connect to the RPi from your smartphone via SSH (e.g., using the app JuiceSSH).

Setting up a mobile Wi-Fi hotspot on an Android phone (tested with Samsung Galaxy S8):
- Turn off "Data Saver" in the "Data Usage" settings menu
- Go to "Mobile Hotspot and Tethering" in the "Connections" settings menu
- Enable "Mobile Hotspot" and remember the SSID and password

Setting up the configured hotspot on the RPi:
First, open the following file:

$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add the following lines:

network={
   ssid="XXXXX"
   psk="YYYYY"
}

where XXXXX should be replaced with the hotspot's SSID and YYYYY with the password.
Reboot the RPi:

sudo reboot

After the RPi has booted, it will appear in the "Connected Devices" list in the "Mobile Hotspot" menu on the smartphone. Tap on it and allow the connection. Now you should note the RPi's IP address, and then you can connect to it using the SSH app.

Pairing Bluetooth devices

The RPi's pairing mode is activated as follows:

$ sudo bluetoothctl

You are now in the control interface for the Bluetooth module. Next, activate the Bluetooth agent:

agent on
default-agent

Now scan the surrounding area for pairable Bluetooth devices:
scan on These will be listed one by one. When the desired Bluetooth device appears, it can be paired with the following command:
pair xx:xx:xx:xx:xx:xx (the displayed MAC address of the device)
Typically, you’ll receive a confirmation with:
Device xx:xx:xx:xx:xx:xx Connected: yes
Confirm passkey xxxxxx (yes/no):
Confirm this with yes. The devices are now paired.

Playing MP3 Files on the Raspberry Pi

To play one or more MP3 files on the RPi, you only need a small helper program, in this case the "OMXPlayer":

$ sudo apt-get install omxplayer

To test the player, you can download a sample file:

$ wget https://sample-videos.com/audio/mp3/crowd-cheering.mp3

and then play it with:

$ omxplayer crowd-cheering.mp3

To actually hear the MP3 file being played, you must of course connect headphones, a headset, or external speakers to the RPi's audio output.

Further information

Last edited by Christian Grieger on 2025-05-14
X
  1. [top]
  2. Applications
  3. Features/Specifications
  4. Connections
  5. Used Components
  6. Setting up the Raspberry Pi
  7. Important commands and programs
  8. Setting up Wi-Fi
  9. Pairing Bluetooth devices
  10. Playing MP3 Files on the Raspberry Pi
  11. Further information