Serial connection to a Raspberry Pi: more useful info

From my previous post I noticed that I couldn’t re-connect to the Pi using screen after I’d disconnected using Ctrl-A Ctrl-D. Reading additional suggestions here, Ctrl-D is just a disconnect, it doesn’t end the process that’s attached.

Instead, use Ctrl-A Ctrl-\ and it will ask if you want to terminate processes using screen.

If you do detach, from here you can use this command to list processes attached to the serial port:

fuser /dev/tty.usbserial-11240

This will show a pid that you can kill, and then you can reattach again.

Raspberry Pi “Temporary failure in name resolution” errors every couple of days

I have a Raspberry Pi running PiAware headless (no monitor/keyboard/mouse) that I moved from wired ethernet to wifi, and every few days it becomes unreachable over wifi, but the activity lights appear to show it’s still up.

Looking through the syslog entries, around the time it appears to drop off the network there is this error that starts repeating:

Aug 31 00:00:09 piaware ntpd[14162]: error resolving pool 3.debian.pool.ntp.org: Temporary failure in name resolution (-3)

This post appears to see the same thing, and there’s a suggestion to turn off the power save function on the wifi:

sudo iwconfig wlan0 power off

I’ve given this a go and will monitor over the next few days.

MS Flight Simulator 2024: Around the World update 7: Continuing North-west through mainland Alaska

Following on from update 6, I continued heading north-west along the coast of mainland Alaska. I’ve gained an appreciation for how vast Alaska is. Most of my other legs flown so far I’ve easily passed through a couple of states or even countries in a single leg, but it’s going to take a few more hours to make it west to Russia and then on to Japan.

I’ve also been having a hard time keeping track of my inflight screenshots and matching where they were taken. A quick Google and I found the Geoshot add-on for MSFS, which automatically geo tags your screenshots, so I’ll be using that from this point onwards (once I’ve caught up with my backlog of the last couple of legs).

For this update I’m covering 2 legs:

Port Hardy CYZT – PAVD Valdez

PAVD Valdez – PAHO Homer

First leg:

Appreciating the scenery on this leg:

Second leg:

Continuing over Elmendorf AFB

Arriving at Homer PAHO:

Serial terminal connection to a Raspberry Pi over gpio pins

I have a Pi 3 that’s been running PiAware for a number of years, and been updated/upgraded over the years. It’s been running reliably and stays up and accessible for months with no issues, but only recently, somewhat randomly, it started becoming unreachable on my local wifi.

Since it’s running headless, I don’t normally have a screen or keyboard attached to it, and if I need to access it then I ssh into it over wifi. Without ssh access I was kind of in the dark what was going on. The power and activity lights were still on/flickering, so I knew it hadn’t crashed completely.

I remembered I had a USB/Serial cable in my box of cables somewhere, but had actually not used it since Pi 1 days, so looked around for the correct steps to connect it.

For a diagram of what colour connectors to connect to what GPIO pins, see: https://www.jeffgeerling.com/blog/2021/attaching-raspberry-pis-serial-console-uart-debugging

List serial connections over USB:

ls /dev | grep usb

For me this shows:

❯ ls /dev | grep usb
cu.usbserial-11240
tty.usbserial-11240

To connect with screen:

screen /dev/tty.usbserial-11240 115200

To exit, type Ctrl-A then Ctrl-D (from here)

To connect with minicom:

minicom -b 115200 -D /dev/tty.usbserial-11240

Esc then X to exit.