Hi! I hope this is the right community to ask.

Next week I will be on the road for 5 Days for work. I have quite some spare time, so I thought I would dig up my raspberry project again and hopefully finish it.

I need it with me, because it controls some hardware, so a VPN to home does not work. So only option I could think of, is to connect the pi directly to my laptop via an ethernet cable. As far as I understood from some research is that I would need to install and run an DHCP server on my laptop, which they did not recommend. Alternatively they suggested to just take a router and plug both devices in there. I don’t really have a spare router, so that’s not an option either.

To be hones it confuses me a little, that there does not seem to be a standard for connecting to a device directly over a single cable and login with a user account.

Any recommendations how I can work on the pi like with ssh?

Thanks a lot!

@JASN_DE@lemmy.world
link
fedilink
English
148M

As far as I understood from some research is that I would need to install and run an DHCP server on my laptop, which they did not recommend.

Or simply set up the Pi with a static IP.

there does not seem to be a standard for connecting to a device directly over a single cable and login with a user account.

There is. A cable. You just need two non-identical IPs from the same subnet, e.g. 10.0.0.1 and 10.0.0.2 or whichever you want from the private ranges.

@Bitflip@lemmy.ml
link
fedilink
English
18M

This for sure, and bonus points for “USB Ethernet gadget” mode if you have a 4 or zero ;)

poVoq
link
fedilink
English
2
edit-2
8M

I remember from back in the day that you need a "twisted pair” edit: ”cross-over” cable though, or do modern ethernet ports automatically adapt to that now?

You’re thinking of crossover cables, though I’m not sure if those are still necessary.

@rtxn@lemmy.world
link
fedilink
English
48M

Most modern NICs can auto-negotiate the Rx/Tx circuits on either kind of cable, but I’m not sure about RPi.

Only one device needs to be able to negotiate it.

Just about everything made in the last 20 years is capable of doing this.

@IsoKiero@sopuli.xyz
link
fedilink
English
28M

If I remember correctly, 1000Base-T standard has a requirement that device has to negotiate pinout on the fly. No matter which pin is connected to which. Obvioiusly just randomly wiring a cable up has other problems, like signal-to-noise, but in theory it should work even if you make a cable that’s as unstandard as you can make it.

@jkrtn@lemmy.ml
link
fedilink
English
18M

That’s amazing. I would love to see the algorithm for that. Hopefully I’ll find a nice explainer if I search around.

@kuneho@lemmy.world
link
fedilink
English
28M

I think it doesn’t matter nowadays. Network interfaces are smart enough to twist them internally, or at least, this is what I experienced. I have no idea when did I had to use specifically a crosswire cable, all of my ethernet cables are patch cables for a while now.

So, it shouldn’t be a problem.

@BearOfaTime@lemm.ee
link
fedilink
English
48M

Twisted pair refers to the twisting of the wires in the cable to reduce crosstalk.

Crossover cables enable permit connecting two non-sensing ports together.

poVoq
link
fedilink
English
3
edit-2
8M

Right 🤦‍♂️ It has been a while. I corrected it in the original post now.

@BearOfaTime@lemm.ee
link
fedilink
English
18M

I hear ya. I know all this stuff, but dammit if it isn’t hard to access sometimes! Haha

@lemmyingly@lemm.ee
link
fedilink
English
28M

I think this method should be the top answer.

I connect directly to devices without a router most working days for work and this is the method we use because it’s simple and effective.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 125 users / day
  • 420 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog