3

After years of raspberrypi-ing, I randomly found a much easier way to connect PC Windows <-> headless RPi, without worrying about IP address, nmap scanning. I wanted to post it as an answer.

Where is the canonical question about how to directly connect a PC Windows <-> headless RPi with an Ethernet cable?

Possible candidates:

Ethernet communication Raspberry PI and windows PC

Connect RPi to PC with direct Ethernet? (closed)

Raspberry Pi (with Static IP address) connect to PC (Windows) via Ethernet

Connection via Ethernet to Windows

All of them are 1 or 0-voted (and were -1-voted before).

2 Answers 2

2

The first one is the best candidate:

Ethernet communication Raspberry PI and windows PC

Because it is much more succinct than the others, which tend to prattle on about irrelevant or highly localized pecularities/details.

without worrying about IP address, nmap scanning

Most of the answers to those questions are not very good. I did not notice nmap mentioned but the idea of scanning a "network" of two computers with a direct ethernet connection is complete lunacy.

The linux side of this is a matter of blacklisting the eth interface from normal networking tools and then issuing two commands, one to put the interface up and the other to assign it an arbitrary (but valid) IP address:

https://raspberrypi.stackexchange.com/a/140076/5538

The routing will be done automatically by the kernel.

I've never answered the "to Windows computer" questions as I am not a Windows user, but it can't be much more difficult there. This is definitely a sort of question where people's instincts seem to tend toward making something that is drop dead simple overly complex.

2
  • Yes this one seems a good candidate @goldilocks. I posted this raspberrypi.stackexchange.com/questions/99687/…. Now I also found other answers about APIPA but not always very easy to use for a beginner.
    – Basj
    Jan 7, 2023 at 15:53
  • APIPA is clever. What if you want to connect to the Windows machine from the Pi though? Is the IP of the Windows machine predictable?
    – goldilocks Mod
    Jan 7, 2023 at 16:55
0

What is wrong with PiName.local?

This does NOT require knowledge of IP addresses, scanning or anything else and also works over a network connection (although you DO have to know the hostname of the Pi).

It actually works with ANY network connection from almost any computer (even Windows - although some old Windoze did not support IETF networking standards).

dhcpcd works with a Link-local address by default.

This has been posted as an answer numerous times including Connecting a Computer to the Pi

6
  • It works with a direct connection. Can't comment on Windows because I haven't used it for 12 years.
    – Milliways
    Jan 17, 2023 at 8:58
  • If you want to ask specific networking questions Meta is not the place. I don't see any inconsistency with Ingo's answer. You can CONNECT (which is what you asked) and use (almost) any networking tool (which obviously depends on WHAT you are trying to do). Why don't you try it?
    – Milliways
    Jan 17, 2023 at 23:35
  • Please note I don't discuss any networking question in my original post, but it is a meta question about which question is canonical about a specific topic. PS: I of course tried many solutions over the past years (and most of them are working successfully), but it is always interesting to compare different methods.
    – Basj
    Jan 18, 2023 at 8:01
  • You asked me (in a deleted comment) about Ingo's answer which is about networking tools.
    – Milliways
    Jan 18, 2023 at 8:37
  • Yes because you discussed some networking aspects in your answer. But all is good, we now have solved the question. Thank you for your input.
    – Basj
    Jan 18, 2023 at 8:46
  • This uses zeroconf. Wouldn’t a Linux computer have to have avahi running for this to work? Apr 3 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .