2

I'm trying to get my pi4 to ssh, and since I don't have a micro HDMI to HDMI cable using a display isn't an option. I've tried a few different ways but I recently tried to get it to work by setting everything up on my pi2 and then moving the SD card back to my pi4. I got everything to work on the pi2, it can connect to the internet, but when I move the SD card back to the pi4 and check the ifconfig that it ran while it was running it shows the pi4 didn't connect to a network.

What am I doing wrong?

Should I not swap sd cards between pis? (previously I tried editing the wpa_supplicant and enabling ssh before I plugged the sd card in for the first time and it still didn't work)

I have some log files, but I'm not sure which ones to look at. I tried installing bootlogd but it came back with the response "(Nothing has been logged yet. If you're still seeing this message your current init system might not write bootup messages to the system console at all.)"

Edit: My bad, I forgot to say I'm using the latest version of raspbian from the rpi website. Thanks for reminding me Dougie!

  • 1
    What OS is on your SDCard? Anything earlier than Raspbian Buster will NOT boot on any RPi4 model. – Dougie Apr 26 at 9:30
  • 1
    have you tried a wired connection? – Jaromanda X Apr 26 at 10:47
3

Thanks to the good advice by Jaromanda X I shared internet through ethernet into my computer. I was able to ssh through that, and when I logged in it said that wifi was blocked because of rfkill. I did not install that package, and I don't know why the service was active by default. All I know is that entering:

rfkill unblock wlan

fixed the problem, and connecting over wifi and ssh finally works.

Edit:

To answer the original question posted as the title for this thread, yes you can. However you have to be aware about rfkill. My guess why this only affected the pi 4 is because it has a built in wifi card and rfkill specified that device, and not the third party wifi dongle I used for my pi2.

| improve this answer | |
  • 1
    "I did not install that package..." Don't try to uninstall it, it's a basic tool. The systemd service actually doesn't use that anyway, it has its own internal version (so you need rfkill to set it manually). Pretty sure the service just saves and uses whatever the setting was at shutdown, so you should not have to do it again. – goldilocks Apr 26 at 14:00
1

If you have an up to date Raspbian Buster installation with a standard network setup it is portable between all Pi models.

Seeing as the Pi2 doesn't have on-board WiFi there are possible errors and it is Essential that a valid country=XX is included in wpa_supplicant otherwise WiFi will be disabled.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.