BerryLan simplifies headless Raspberry Pi install
No-Head Start
BerryLan installs a system on a Raspberry Pi that can be integrated into the wireless network with a smartphone app over Bluetooth.
The Raspbian operating system can get the Raspberry Pi up and running – with or without a desktop environment. Starting with the standard installation, the system can be adapted to your own needs with very little effort. However, this requires a connected keyboard, mouse, and monitor. Even SSH access is a little more complicated because Raspbian has not started the SSH server automatically for some time now [1].
Building a headless Raspberry Pi (i.e., a computer without peripherals or even a network cable) requires more effort and a certain amount of know-how. Before the Raspbian system starts for the first time, the /etc/wpa_supplicant
configuration file has to be edited and the network access credentials entered.
The BerryLan project seeks to handle this work for you wirelessly over Bluetooth with a smartphone app. With the customized Raspbian image and a smartphone, the Raspberry Pi system will be running and on the network within a few minutes.
Jump Start
For BerryLan [2], developers resorted to the proven Raspbian distribution but have limited themselves to the Lite version (see the "Raspbian Lite" box). In addition to the basic system configuration, only the Nymea network manager [3] is added, which lets you set up the network for the Raspberry Pi on a smartphone over a Bluetooth LE connection without manual interaction. The open source project offers the apps in the respective app stores.
Raspbian Lite
The Raspberry Pi Foundation maintains a branch of its operating system that installs a lightweight system without a graphical user interface, thus conserving the limited resources of the Raspberry Pi. The Lite version is therefore recommended for users who want to run the Raspberry Pi in headless mode (i.e., without input and output devices). If necessary, however, the system can be upgraded to the familiar user interface by importing some application packages with the package manager:
$ sudo apt install raspberrypi-ui-mods rpi-chromium-mods lightdm
To load the graphical desktop environment, call sudo raspi-config
and select the 3 Boot Options | B1 Desktop/CLI | B4 Desktop Autologin option.
Installing BerryLan is similar to installing a normal Raspbian system: You download the current version of BerryLan from the project homepage, extract the ZIP archive (raspbian-stretch-berrylan-lite-latest.zip
), and write the resulting image file to the desired memory card. As usual, you can do this with the familiar command-line tools or with cross-operating system graphical tools such as Etcher [4].
If you own a Raspberry Pi that already runs Raspbian, you don't necessarily have to set up the system again with BerryLan and adapt the system to your requirements. In the project FAQ [5] you will find instructions on how to extend an existing Raspbian system with BerryLan.
Configuration
After writing the SD memory card, slot it into the Raspberry Pi and boot the system. For configuration, install the BerryLan app suitable for your smartphone. The developers maintain variants for Android [6] and iOS [7]; for this article, I used the Android version of the app.
The app immediately tries to detect the Raspberry Pi over Bluetooth, so Bluetooth must be enabled on the mobile phone. On the other side, you have to allow BerryLan on Android to retrieve the device location. Don't let this confuse you: This is not about GPS tracking, but about Bluetooth routines that can also be used for locating purposes [5].
The Raspberry Pi you booted with BerryLan shows up in the app as BT WLAN setup (Figure 1). However, other pairing-capable Bluetooth devices also appear in the list. When you tap on the Raspberry Pi in the dialog, BerryLan transfers all wireless networks in the immediate vicinity detected by the Raspberry Pi to the app (Figure 2). In the next step, select the desired network and enter the appropriate access credentials with the smartphone's keyboard. Once the connection has been established, the app displays the IP address of the freshly installed Raspbian system (Figure 3).
Now that you have the IP address, you can log on to the system under Linux by typing
ssh pi@<RaspPi-IP>
(Figure 4). The password is the usual raspberry. Alternatively, use an SSH client for Android such as JuiceSSH [8] or the Termux [9] Linux environment adapted for Android.
Now you will want to change the password without delay. To do this, either call sudo raspi-config
and select the 1 Change User Password option or run the passwd
command on the Raspbian system's terminal and follow the prompts.
Conclusions
BerryLan proves to be a useful helper after the install. If you want to use the Raspberry Pi on another wireless network, you simply boot the Pi in the usual way and launch the BerryLan app again. As in the initial installation, the smartphone should then detect the BerryLan Raspberry Pi over Bluetooth, and you can configure the wireless network in the app.
The BerryLan developers have hardly changed the Raspian system itself; they have simply added their own package source, from which the Bluetooth-enabled add-on for the network manager is installed. The operating system can be updated in the usual way, because all the updates and post-install packages come from the official Raspian package sources. BerryLan is therefore ideally suited as a basis for users who want to use a Raspberry Pi on different wireless networks in a number of scenarios.
Infos
- "Enable SSH" by Christoph Langner, Raspberry Pi Geek, issue 23, 2017, https://www.raspberry-pi-geek.com/Archive/2017/23/Future-proofing-the-Raspbian-SSH-Server/
- BerryLan: http://www.berrylan.org
- Nymea network manager: https://github.com/nymea/nymea-networkmanager
- Etcher: https://www.balena.io/etcher
- BerryLan FAQ: http://www.berrylan.org/faq.html
- Android app: https://play.google.com/store/apps/details?id=io.guh.berrylan
- iOS app: https://apps.apple.com/us/app/berrylan/id1436156018
- JuiceSSH: https://juicessh.com
- Termux: https://termux.com
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.