Welcome to the fourth of six blog posts in support of the Raspberry Pi Zero 2W Roadtest. The blog posts will explore different aspects of the product while attempting to engage the E14 Community members. Comments and questions to the blog posts are welcomed and encouraged. The blog posts will serve as the resources for assembling the RoadTest Review document.
The project objective is to pair a Raspberry Pi Zero 2W with a camera, assemble it on a HO scale model railroad car with a power source and stream or record video of the train in motion.
My initial focus for this RoadTest was to get on with an operating system (O/S) install on the Pi so I could use the camera. On discovering the SD card provided in the kit had content on it, I thought it was prudent to check it out before I wiped the card with my own O/S installation.
RoadTests Reviews are sponsored by vendors. The objective is to provide product feedback. In fairness to the product vendor, I felt it was important to not just blown away the card content and proceeded with my application. We are going to take a slight detour to find out what is on the card before proceeding with the self styled O/S load.
Detour
Here is a collection of short video clips strung together of the Pi booting, using the vendor SD card.
The opening screen indicates NOOBs is on the SD card. Stands to reason. NOOBS is a way to make setting up a Raspberry Pi for the first time much, much easier (so it is said). You won’t need network access, and you won’t need to download any special imaging software. Just head to the downloads page, grab a copy of the NOOBS zip file, and unpack it onto a freshly formatted 4GB (or larger) SD card.
I failed to find any reference to NOOBs at the official Raspberry Pi OS download site. I did locate a repository at a github link. I confess I have never used NOOBs. I started out ten years ago doing O/S installs for Raspberry Pi using the dd command. The Unix command dd (disk destroyer ), provides bit copying of raw data from one source to another. It's not used to copy individual files like cp. Instead, it lets us read from and write to block devices — for example, physical hard drives.
I migrated from command line dd to my first imaging software application Etcher, which is now called balenaEtcher, after the company was acquired. I got tired of chasing balenaEtcher software upgrades and went looking for a solution. When Raspberry Pi OS's software Imager became stable I moved to that.
I have no experience with NOOB's. Over the years I have become very familiar with the O/S install process. It appears NOOB's reduces the need for all that knowledge. If NOOBs make it easier for people to work with the product, than that is a good thing.
You may notice mouse movement is slow in the video. I ran into a few glitches trying to get hardware installed on the PiZero2W so a mouse, keyboard and video would work. The kit doesn't contain a USB micro B to USB-A adapter cable. I don't have a USB keyboard or mouse that is USB micro B capable. I dug through my bins to find an adapter I received with the very first Pi Zero I purchased.
I think the adapter should be included in the kit along with the HDMI mini to HDMI standard adapter.
The next issue was discovering NOOBs would not recognize any USB devices connected to my unpowered USB HUB. A succession of mouse and keyboard changes as required to navigate the NOOBS menu got me to the familiar Raspberry Pi Full O/S screen. At one point the install refused to recognize my USB mouse. Switching to a second mouse cleared the problem. When I switched back to the original mouse it worked but failed again later. Not sure if it's mouse or Pi-related. I going with a bad mouse and will cull it for parts.
I did follow the menus and got the operating system installed. This took me to the startup screens that are part of the O/S install. At the end of the video clip it was discovered that the Winnipeg timezone is not supported on the menu. That is a first for me! I later resolved the issue by using raspi-config localization option to set a Winnipeg timezone. The operating system installed was Version 10 (buster) confirmed by looking in /etc/os-release file.
I observed NOOBs established the typical /boot and /root filesystem directories along with a directory called /SETTINGS. I had never seen that directory before. Since I am not interested in learning NOOBs and I feel I have explored what the vendor has provided sufficiently, I will leave this detour and get back on the main road to establishing an operating system.
Main Road
As was indicated in the detour Raspberry Pi Imager is the software I use to install images on SD cards.
{gallery}My Gallery Title |
---|
O/S Tweaks
After setting the configuration option for Imager, four screens later I had an SD card ready for use. Well, not quite to my liking. It needs a few tweaks.
I do two manual steps when configuring an SD card. Since I rarely use a locally attached keyboard, video and mouse (KVM), I require remote access when the Pi boots for the first time. I use ssh protocol over a network connection. The setup is typically done in the raspi-config tool after boot, but you need a KVM to do that!
The solution to establishing a wireless network and enabling SSH before that first boot, is to add some files to the /boot directory of the SD card. These files get read on boot to establish the much-needed configuration for remote access.
The procedure for establishing the wireless connection before the first boot is documented in this resource. If the operating system finds a file named wpa_supplicant.conf in the boot directory on startup, it will use the details in the file to establish a network interface.
Turning on SSH support on boot can be accomplished by installing a blank file named ssh (no file extension) in the /boot directory. If the operating system finds a file named ssh in the boot directory on startup, it will enable ssh access to the Pi.
I left the KVM hardware connected to the Pi in case I needed console access before proceeding with the first boot. Any device connected to a Local Area Network is assigned an IP address. In order to connect to your Raspberry Pi from another machine using SSH, you need to know the Pi’s IP address. Console access allows you to look but we need to the address to establish the console.
A quick network scan (computer guys and their tools) and I could see a new device on the network sporting a Raspberry Pi Foundation operating system.
But wait, what does a person do to find the IP of the PI if they can't scan the network? Use the services of multicast DNS (mDNS) to connect to the device. Raspberry Pi Documentation is a great resource to explore this solution.
From the command line enter ssh pi@raspberrypi.local and an ssh connection terminal window will call for authorization. Of course, you will have to know the default Raspberry Pi password to gain access.
A quick check of the contents of file /etc/os-release to Version 11 (bullseye) operating system is installed. Just what I ordered.
Firing up the Raspberry Pi configuration tool raspi-config with superuser privileges, I stepped through the menus to change the hostname, replace the default password, made some localization changes to provide a US keyboard configuration, if ever needed, and established the timezone. Yes, America/Winnipeg was supported.
With a quick reboot to confirm those changes, I perform an O/S update and upgrade from the command line.
sudo apt update
sudo apt upgrade
The operating system is now to my liking, almost. My preference is to do as little typing as possible. Logging in requires password exchanges. You do a lot of logging in during development. If this task is automated using the ssh toolset, password sign-in becomes a thing of the past.
ssh-copy-id -i ~/.ssh/id_rsa.pub pi@pitraincamera.local
After the initial login, it is password typing no more.
With an O/S installed the platform is ready for the next phase. The next blog post will be Riding-the-Rails with a Raspberry Pi Zero 2W: Camera. Installation and testing of the camera.
See you at the next stop.