Pi400 Network Boot and USB Drive

Pi400 at Microcenter

I had a recent trip through a city with a Microcenter, and with the past year of limited availability of Raspberry Pi devices made a quick trip to see if they had any stock. I really wanted a Pi4 8GB, or a PiZero2W but was happy enough to pick up a Pi400 as I’ve not played around with this model before.

Keyboard
Underside
Plug side

After getting home and staring at the device I remembered that most of my current development has been using cameras connected to the pi camera connector, and there is no obvious access to a camera connector on the Pi400.

I also was staring at my current collection of micro sd cards and trying to decide which one I wanted to use to get the Pi400 up and running. At this point I remembered that the Pi4 devices with USB3 interfaces supposedly can boot from a USB Drive. I have a couple of SSDs that have been sitting unused for over a year, as well as an external dock that I can at least use to get a system up and running.

SSD
Screen before Hard Drive

This is the screen I got when I powered up the Pi and then connected the screen but didn’t have the drive connected. It was in low resolution because I’d not had the screen connected when I applied power. Later images are in full resolution because the power was the last connection I made. The QR Code takes you to the Raspberry Pi Software Page.

Network, Mouse, Drive, Power, and screen plugged in

It cycled through the previous three screens until I held down the shift key to initiate the network boot.

After status messages while it downloaded a network boot image, the screen transformed to look like the same familiar Raspberry Pi Imager application I use on either Windows or Raspian to create a bootable sd card.

I selected the version of Raspian I wanted installed

I selected where I wanted Raspian installed.

I made some changes to the settings so that the machine name and default user were different from the defaults. Because this installer is running from ram, it would let me save the settings, but the drop down “for this session only” was not enabled. The most frustrating issue here is that there’s not an easy way to get my public key to the machine for ssh connections, while the Imager software running on another machine would automatically import the current user key.

After hitting the write button, the standard warning pops up.

After just a couple of minutes the system rebooted and came up with the standard Raspian desktop. It was a very easy install, and arguably much easier than having to fiddle with a microSD card and reader on my primary desktop. The only requirement that might be complicated for some users would be the need to use the wired ethernet cable.

I ran my standard update command, rebooted, and checked the status of the machine. The hard drive access light was blinking regularly for a few minutes but after a short period settled down without constant disk access.

Netflix DVD ending September 29th, 2023

I just received the sad email that Netflix will ship its last DVD on September 29th, 2023.

I’ve been getting DVDs by mail from Netflix since at least 2000 and have seen it go through all the different disk mailers and service speeds as they opened more distribution centers and then closed those in recent years. My current monthly bill is $8.81 after taxes and I can just about get a DVD a week.

Dear William,

For 25 years, it’s been our extraordinary privilege to mail movie nights to our members all across America. On September 29th, 2023, we will ship our final iconic red envelope.

While times have changed since our first shipment in March 1998, our goal has remained the same: to provide you with access to the broadest collection of movies and shows possible, delivered directly to your door, with no due dates or late fees.

As the DVD business continues to shrink, it’s going to become increasingly difficult to achieve that goal. In our final season, we’ll continue providing you the best service possible, all the way to the very last shipment.

You may have some questions, and we’ve tried to answer them in our Final Season FAQ – and if you want to share something with us, you can send feedback here.

We sincerely thank you for joining us on this amazing journey. We could never have shipped more than 5 billion discs without movie lovers like you. It’s been a genuine privilege to share movie nights with you.

Pop the popcorn, fire up your player, and enjoy this final season of red envelopes.

Sincerely,
The Netflix DVD team

I’ll definitely be sad to see it go because I’ve been able to add movies to my queue long in advance of them being available and then being pleasantly surprised when they arrive in the mail.

I’ve never found streaming to be as good an experience of browsing and discovering movies I want to watch.

Bluetooth LE Scanning and Govee Thermometers

I’ve been programming Bluetooth software to communicate with Govee thermometers for a couple of years now and still learning how Bluetooth works. I’ve been working with several devices, H5074, H5075, H5174, H5177, plus the meat thermometers H5182 and H5183. (I’ve got pictures of each at https://github.com/wcbonner/GoveeBTTempLogger/tree/master/DeviceImages)

I’ve liked the H5074 the most because of its compact size and the fact that it uses a CR2477 lithium battery for power and seems to run for close to two years without replacement. It also has been surprisingly robust when placed inside my freezer or outside on a balcony railing.

The thermometers broadcast their data over Bluetooth Low Energy (BLE) advertisements. Each of these thermometers stores the previous 20 days or more of data internally and can also be queried directly to retrieve the stored data. I only recently got the code for the direct connection download working. To connect directly the host must stop listening to advertisements, make the connection, download the data, close the connection, and then go back to scanning for advertisements.

There are two modes the host scanning can be set to, Active or Passive. Active mode is the mode I’ve been using for most of this time, and I only recently investigated the differences between Active and Passive.

Passive mode is exactly what it sounds like. The Bluetooth stack only listens for advertisements and makes them available to my program.

Active mode is more complicated. Every time the Bluetooth stack receives an advertisement, it sends a query message to the device that advertised asking for more details. This is all done by the stack with no visibility to my program. It may affect timing of messages arriving or even over the air collisions. I’ve not found detailed descriptions related to this.

The different Govee thermometers appear to operate differently. The H5075, H5174, and H5177 broadcast their temperature, humidity, and battery data while the H5074 only sends the data in a secondary response. This means that data can be gathered from the first three with a host running in passive mode, while a host running in active mode is required to get the data from the H5074. This is unfortunate in a noisy Bluetooth environment because it means that the host itself is adding to the Bluetooth noise.

NFS File Sharing on Raspberry Pi

I wanted to be able to access my Raspberry Pi filesystem from another machine to take advantage of more processing power elsewhere. It’s been many years since I’ve used NFS, and while it was easy to add to the Pi, I ran into a couple of issues that took some time to work out.

The primary use I was trying was to be able to mount the filesystem from a Debian instance of Linux running on Windows Subsystem for Linux (WSL) on my Microsoft Surface Pro 9. This would allow me to run FFMPEG working on some video files utilizing the power of the modern Intel chip instead of waiting for the Pi ARM processor to process the files.

While I was able to get the filesystem mounted from a second Pi easily, the WSL instance was more complicated. I realized that the problem is that by default WSL instances use Network Address Translation (NAT) for network access. This required the “insecure” option on the NFS server setting because NAT was changing the ports it was using to port numbers above 1024.

sudo apt install nfs-kernel-server -y

Edit the /etc/exports file to export the directory I wanted and set who has access to it. I’m limiting to my local network IP addresses, and not specifying any security. Because of my lack of security, I’ll be removing all of this after I am finished with the processing. Note the insecure tag at the end of the options.

Use the command sudo exportfs -ra to force the NFS server to reload its configuration file.

Use the command showmount -e to display what filesystems have been exported.

On the client machine:

sudo apt install nfs-common -y
sudo mkdir /media/WimPi4
sudo mount WimPi4:/media/WimPi4 /media/WimPi4

Because I didn’t squash the permissions and have matching uid and gid numbers on the machines I’m working with I can now work on the filesystem as if it was local to my machine.