Skip to main content

New Raspberry Pi B Wi-Fi and HDMI problems

A few days ago I acquired a shiny new Raspberry Pi 4B. I got it to do my microcontroller programming with to save having to wrestle Windows into doing Linuxy stuff.

I bought the 4Gb Pi along with the necessary power supply, HDMI cable and 32Gb SD card (with pre-installed NOOBS). Some heat sinks, a case, a fan and a fan controller completed the order with those nice people at the Pi Hut.

In general this is an impressive piece of kit but I've encountered some problems with it that I thought I'd share in case I can help prevent someone else from tearing their hair out.

About my setup

It's relevant to what follows to point out the following:

  • I use a stand-alone monitor with my laptop and share this with the Pi by means of an HDMI v2 compatible switch.
  • A powered 4 way USB3 hub is plugged into one of the Pi's USB3 ports. There's a Logitech wireless dongle plugged into the hub that enables use of my Logitech wireless keyboard and mouse with the Pi. Each of the hub's ports has its own on/off switch and all unused ports were off.
  • The laptop and monitor (and lots of other MIDI stuff) are plugged into the same wall outlet via a power block. The Pi and its USB hub are plugged into a different outlet via another power block.
  • The Wi-Fi signal is showing at about 80% on my Windows laptop. Th Pi lives behind the laptop and probably has slightly worse reception.
See the photo below for how this is all cobbled together (ignore the Arduino Uno clone and the breadboard):


First boot - all seems hunky dory

When the Pi was booted for the first time I ensured it was using only the official Raspberry Pi branded power supply & HDMI cable along with the SD card by SanDisk - no 3rd party extras and no corners cut. I had my laptop running on mains and displaying the relevant docs on the Raspberry Pi web page, which I was following.

The Pi started up and ran the configuration program. That went fine until just near the end of the setup when the Pi turned itself off. This was during, or just after, the OS update stage. Because the update takes a long time I'd gone off to have a cuppa and consequently didn't see what caused the Pi to go on strike. Weirdly, my laptop also went to sleep at the same time! Since I've got the laptop configured so that it never sleeps while plugged into the mains, that was a surprise. I assumed there must have been a mini power cut.

Anyhow, re-booting the Pi re-ran the setup program from the start. Some of the information I'd entered was remembered but I had to re-enter my new password along with Wi-Fi details. It didn't try to do an update again and this time it all ended correctly.

Assuming all was well I waited for the Pi to cool down then fitted the heat sinks and installed it into its case, along with the fan.

Flaky Wi-Fi

With the Pi powered on again and seemingly happy in its new case, I started exploring. All seemed well so I installed the Arduino IDE, which worked fine. Next I installed Samba and shortly after that the internet went down.

I (wrongly) blamed Samba for conflicting with the net connection and tried uninstalling it, but made a bit of a mess of it. After rebooting, the net just wouldn't come back. Sometimes my router could see the Pi but most of the time it couldn't. Running ifconfig wlan0 on the Pi showed up my Wi-Fi router, but I could not connect to it.

After a couple of hours getting nowhere I decided I'd re-install the OS from scratch. So I downloaded the latest Raspberry Pi OS from their website, "burned" it onto the SD card using the Raspberry Pi Imager, plugged it into the Pi and powered up.

Well, exactly the same thing happened: towards the end of the setup the Pi turned off and the laptop went to sleep! Re-running had the same result as before. But the net was back ... 

... until the following day when it died again!

Pi won't stop

One other weird, unrelated, issue was that if the laptop was plugged in I couldn't turn off the Raspberry Pi. Not with the inline switch & not by pulling the plug. WTF!? 😲

It turns out that modern HDMI can feed power back to the units that are plugged into it. Was power from the laptop going out onto its HDMI cable and somehow leaking back to the Pi, even with the HDMI switch set against the Pi's cable? Or maybe the power was coming from the monitor which was also still plugged in? Either way, power was getting into the Pi via the HDMI cable. The proof of this came when I pulled the HDMI cable out of the Pi and it turned off instantly.

Now there are many people on the net who say HDMI can't supply power that way. Seems to me it can.

Sorting it out - almost

Stay with me, we're nearly there. I read on the net that HDMI could interfere quite badly with Wi-Fi. Hmm. Next I found claims that there's a problem with the first HDMI port on newer Raspberry Pi 4Bs that interferes with Wi-Fi. Oh great, because this port is the one that Raspberry Pi say you really should use when setting up a Pi - they caution against using the second port.

Sod that. I moved the HDMI cable from the first to the second port and rebooted. Wi-Fi's back folks - and it's also a bit quicker now. And the Pi turns off - sometimes.

If the laptop and monitor are plugged in, but the laptop is off or hibernating then the Pi will switch off using the USB cable switch. But if the laptop is running then the Pi won't turn off. If I pull the HDMI cable from the Pi with the laptop running it turns off and doesn't come on again when the cable is re-inserted. Obviously!

I'd love to get to the bottom of the HDMI cable issues, but enough of my life has been wasted on this. The worst that can happen is that I'll waste a bit of power occasionally running the Pi when I don't need it.

So, happy, happy, happy (ish). Apart from the aforementioned waste of precious life that is.😒

Have I fixed the Wi-Fi problem? Three days in and all is well, but only time will tell. If you're experiencing similar issues then switching HDMI ports could be worth a go. (Usual disclaimers apply re any damage you may cause.)

Moving to ethernet?

Our 1950s bungalow has incredibly strong brick interior walls that are pretty adept at blocking Wi-Fi signals. The signal in my "tinkering" room isn't too good at the best of times, let alone for the poor little Pi tucked in behind the laptop, underneath a rather large powered monitor speaker (see the photo above).

So at some point I may run an ethernet cable from my Wi-Fi hub and plug the Pi into that. We'll see. Of course the laptop doesn't have an ethernet port - I mean that would be helpful - so I'll need to source a USB to ethernet adapter for it. One more thing to go wrong, eh!


Comments

Popular posts from this blog

Total Overkill - Controlling Diorama Lighting With A Microcontroller

I'm building a scenic model - a diorama indeed.  In fact this diorama is the reason I got interested in electronics in the first place. You see the model will have a few buildings & they'll all be lit with LEDs. There may also be some motorised gimmicks if I can get them to work. The problem was that I didn't know how to wire up LEDs, so hit Google and disappeared down an electronics rabbit hole. The original plan that was to have a simple set of circuits where each LED had a potentiometer to adjust the brightness along with a fixed resistor to protect the LED. The LEDs would be switched on and off using some slider switches that I got from an electronics surplus shop many moons ago. All would be powered from an old model railway 12V power controller I've had since I was a teenager. Yep, it's old! But that'd be too simple wouldn't it? So now I'm planning to electronicify it. Not that it needs doing of course, but it'll be more fun. The plan is to...

A Sort-Of-Theremin - Another Project?

Yep, even before getting anywhere near completing my first project I've got an idea for a second. In my defence, they're both related. The idea is to construct a Theremin-like instrument. Theremin-like because my idea uses a slightly different principle to control it. So, what's a real Theremin? Briefly it's an instrument that uses radio waves to deduce the proximity of the player's hands to two aerials: one that controls pitch and another that controls volume. It uses the capacitance of the human body to determine the hand's position relative to the aerials. There's much more info on howstuffworks . My idea is to use the same capacitive sensing as is planned for my first project, the Electro Tongue Drum . But, instead of detecting an actual touch on a key I'm hoping to use the fact that the metal sensor can detect the proximity of a finger or hand. While a real Theremin uses radio waves to detect the position of the player's hand mine w...

My 1st Project - Say Hello to the "Electro Tongue Drum"

The electro-what? If you've read my previous post you'll know I'm an amateur musician of sorts. I play guitar, fumble with keyboards and have a liking for weird and off beat instruments. Canjo anyone? One such instrument is the Tongue Drum (aka Tank Drum, aka Hank Drum). I fancied buying one, but a decent one isn't cheap, so I couldn't justify the cost given the small amount of use I'd have for it. But how about an electronic emulation of one? I got the idea when I was down the rabbit hole looking at lots of other peoples projects online. I stumbled across the paper piano project. The person who built this simply drew the keyboard on cardboard and filled in the keys with pencil "lead". Those "keys" were connected to a wire using a paper clip, of all things, and the wire was attached to an Arduino Uno micro-controller via a large value resistor. The Arduino can then sense when a finger touches one of the pencilled in keys and play a (horri...