0

QUICK QUESTION: Laptop has wifi. I have ethernet cable connecting laptop and raspberry pi to share wifi from laptop to pi. How to check the ethernet ip address of pi on laptop? (ipconfig doesn't work)

DETAILS: I am running windows 10 on laptop. I am following guides to use laptop as monitor for my raspberry pi and I need to establish ssh connection between laptop and pi using ethernet cable and putty.

The problem is that, using an ethernet cable, the eth0 ip address of pi (from ifconfig) changes when it reboots, and it also does not agree with the ip address on my laptop ethernet setting (from ipconfig or checking control panel), which means I cannot use ipconfig to identify the correct ip addresss of pi even if I change the ethernet setting on laptop to 'obtain ip address automatically' (because obviously it doesn't obtain the right one but use another weird-looking ip that it obtains from nowhere). Thus I cannot input the correct ip address into putty to establish ssh without first accessing pi itself and running ifconfig. Oddly, I am able to get ssh working if I input the correct ip address found using ifconfig on pi, regardless of what is found using ipconfig on windows.

My goal is to be able to ssh my laptop with pi and ultimately use laptop as screen for pi, anytime and anywhere using anyone's wifi, as long as there's wifi connectivity available on laptop. To do this, I need to get the right ip address without checking ifconfig (since checking ifconfig requires a screen in the first place but screen is what I want after all)

In conclusion, how do I check the ip-address of pi using laptop with ethernet connected, OR, not desired but if possible, how to make raspberry pi to always use the ip address I can find on laptop windows ipconfig (or at least a fixed ip address) for ethernet connection?

Thanks.

EDIT: I had terrible understanding about ip address. Now I vaguely know that raspberry pi is assigned an ip address within a range defined by ethernet setting on laptop. The exact ip address and hostname can be found using ip scanner application. Now the question becomes, how do I relibaly make raspberry pi to use a fixed ip address for ethernet under any wifi, by either changing some settings on pi or laptop windows? Or even better, establish a one to one network without wifi?

  • ipconfig a windows command that displays the laptop IP address ... ifconfig is a linux command that should display the RPi IP address – jsotola Apr 8 '18 at 23:32
  • saying something like this does not help to answer your question use another weird-looking ip – jsotola Apr 8 '18 at 23:33
1

I won't address any of the issues you may or may not be having with Windows 10, and the "guides" you mention you're following, but didn't share in your post. This is an RPi forum, so we'll stick to that, OK?

That said, you probably know that it's relatively straightforward to set up a "console/command line" connection with your RPi with a USB cable, or via Bluetooth (if your RPi has Bluetooth of course). Let us know if you wish to take that route, and need some help. Anyway - once you've established a connection between your RPi and your Windoze box, you can configure the RPi's wifi connection "manually" by following the instructions here.

As far as your question about making raspberry pi use a fixed IP address, I don't think you want to do that under the scenario you've described; i.e. "under any wifi". If you're going to use a fixed IP address, you must have control of the network - or at least know how it's configured.

  • I didn't know I could set up a command line connection using usb. Could you please show me a link on how to do that? I am not sure which one I googled to follow. I am using raspberry pi 3, that said if I am able to set up the command line communication like you said instead of using putty ssh, then it would be much easier to set up vnc viewer, because using the ethernet & putty ssh approach I need to use ip scanner to scan for the pi's ip address for ssh connection which can take a long time. Using usb I can just enable wifi, run ifconfig to get the exact ip address and set up vnc from there. – Y.JQ Apr 9 '18 at 20:45
  • For a Pi3, I believe you'll need a cable like this one from pimoroni. Or, if you have a Pi3B, here's a guide to setting up shell access via its native Bluetooth. Note that this is not a secure connection!! And not to confuse things, but how are you doing this ip scan? – Seamus Apr 10 '18 at 3:45

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.