Infra Insert 05

This page was last edited on 1 February 2024, at 13:56.
Revision as of 13:56, 1 February 2024 by In-grid (talk | contribs)

wiki4print raspberry pi

Raspberry pis are small single board computers. https://www.raspberrypi.com/

Prerequisites

  • Raspberry pi + peripherals: HDMI screen, keyboard, mouse etc.
  • Pi OS booted: we used Armbian OS https://www.armbian.com/
  • Knowledge of terminal/bash
  • have SSH installed on laptop (most OS have it by default now, if not then manually install)

After flashing the Armbian disk image on an SD card, plug the Pi in and then just follow the prompts on screen.

If for any reason (like a power cut or accidental un-plugging) you have to enter the Armbian default username and password before you can boot the OS. It is usually:

blank user name
pw: 1234

You will later need to change the password and user name.

Fragment from the Servpub docs [see page 2]

SSH requirements:

being on the same internet router as the pi

Note: If you are moving around, get a dongle, tether form your phone data package or "share wifi" form your laptop.

IP address of the pi: one way to do this is, through is this command line on the pi:

$ hostname -I

or, scan the network from the client (laptop) using:

$ nmap

nmap requires that you know the IP address of the network your on. You can easily find this from your network settings on your laptop. The first three numbers of your network IP will be the same on the pi, but you have to tell the scanner to traverse all possible options for the last number.

Assuming that your network IP is 192.168.0.0, This is the syntax to do that:

$ nmap 192.168.0.0/24

You can also use a network scanning app (on a phone) and it should come up.

Pro tip: don't do it in a building with over 200 devices like I did!!!

Connecting from a client:

now that we have the IP address, any computer can request to SSH into the Pi through these commands:

& ssh pi@<pi ip>

eg. $ ssh pi@100.10.1.90

you are now "logging into" the pi, so the password requested here is would be a default one according to the OS you have installed.

Enter the password

You should now see your terminal username change from your laptop's local user to something like:

$ pi@raspberry~$.


To exit out of the pi type:

$ exit

Hit enter.

Fragment from the Servpub docs [see page 2]


Stories of Troubleshooting


Some of the limitations of working with a Raspberry pi are:

  • The size of the SD card you use, we used a 32GB card for wiki4print. This will put limit on what you can put on your pi.
  • Connectivity, ethernet is always the better option for stable network connections. Using mobile data or wi-fi is great, but once you need stable access, use an ethernet cable.
  • Heat! If the CPU overheats the pi can freeze / shut down processes

During the month of January we were plagued by 502 bad gateway errors indicating that the pi was down.

This was partly due to poor internet connectivity at the location where the pi was in London, an art studio in Woolwich.

We also later discovered that it was also due to the pi overheating. This discovery was confirmed once the pi was moved to the house of an In-grid member where it lived under a bed for 1 week in January. This problem was solved by adding a heat sink to the pi which also has a fan that pulls cool area past the CPU chip on the pi 4B [see centerfold image].

After the addition of heat sink the pi has been stable. Ethernet connection at HKW has allowed us to access the pi via the Servpub VPN for the duration of the Content/Form workshop 29.01.2024 to 03.02.2024


Wiki4print Raspberry Pi system snapshot 01.02.2024 [the day before this publication went to print]

 ____                 _                            ____  _   _  _   
|  _ \ __ _ ___ _ __ | |__   ___ _ __ _ __ _   _  |  _ \(_) | || |  
| |_) / _` / __| '_ \| '_ \ / _ \ '__| '__| | | | | |_) | | | || |_ 
|  _ < (_| \__ \ |_) | |_) |  __/ |  | |  | |_| | |  __/| | |__   _|
|_| \_\__,_|___/ .__/|_.__/ \___|_|  |_|   \__, | |_|   |_|    |_|  
               |_|                         |___/                    
Welcome to Armbian 23.11.1 Jammy with Linux 6.1.50-current-bcm2711

System load:   6%           	Up time:       1 day 2:52	Local users:   2            	
Memory usage:  19% of 3.53G  	IP:	       172.31.6.198 10.10.12.4
CPU temp:      36°C           	Usage of /:    32% of 29G    	
storage/:      53% of 58G    	
RX today:      179.6 MiB  


NOTE ON IP:

  • 172.31.6.198 is the IP address that the Pi was accessible on at HKW Berlin Germany
  • 10.10.12.4 is the local IP address assigned to the Pi in the Servpub VPN network

NOTE on storage amount 58G:

  • We have two drives, the 32GB SD card & usb thumb drive for backing-up the wiki4print content