-1

I have a Raspi 2B running Raspbian and I want to connect it to the Internet with an Ethernet cable via my laptop (which is connected with WiFi to my router).

Unfortunately, I am officially connected (according to the icons in the GUI), but I can't go to the Internet and my PC cannot detect the Pi

However, when I connect my raspi directly to the router with an Ethernet cable, it works perfectly and I have a good connection.

But my router is 2 floors down, and I really can't use my Raspberry Pi properly when it is there, so I really need to connect it through my laptop (running Windows 10)...

-What I precisely want to do is to use my raspi with PuTTY on my laptop, so I enabled SSH.

-In the Network and Sharing Center on my laptop, I allowed other devices to connect to the WiFi network via my computer.

(If I don't connect it to my laptop, I know I can get a WiFi adapter, but I prefer not wasting money and trying to solve the problem instead...)

Any idea what could be wrong?

Thanks for helping

5
  • 1
    "Any idea what could be wrong?" Possibly, but as you have provided ABSOLUTELY no detail of what you have done and no status information, it would only be a guess. Commented Dec 11, 2016 at 9:54
  • In the command prompt of my pc, I tried typing ping raspberrypi.mshome.net , and the first time, I lost 75% of the packets, and then I lost 100% of them everytime I tried again Commented Dec 11, 2016 at 10:15
  • In PuTTy, when the Pi is connected to the router, I can access it, but when it is connected directly to the laptop, it is as if it wasn't connected at all ('connections times out'), so I can't access it Commented Dec 11, 2016 at 10:18
  • Did you do anything on the Windows PC to facilitate the connection? The Pi cannot control it. Commented Dec 11, 2016 at 13:27
  • I only allowed other devices to connect to the network via the PC in the Network and sharing center Commented Dec 11, 2016 at 14:04

2 Answers 2

0

If you are just using a standard Ethernet cable to connect the Pi to the PC you'll likely run into problems. You will probably need to use a Crossover cable for that or put an ethernet switch (old ISP router will probably do) in between the two and assign them both static IPs on the same subnet.

As per Goldilocks' smackdown, turns out the Pi can manage crossover... Connecting the Pi direct to my Win10 PC, enabling Allow other users to connect via this connection on WiFi allowed a newly flashed Jessie/Raspbian image to connect straight away so definitely doable. Can ping the Pi's IP and {hostname}.mshome.net from PC and the Pi can ping google. Can Putty back to the Pi (after enabling SSH). Both the Windows machine and the Pi configured themselves for 192.168.137.x - can only suggest you confirm they are on the same network.

15
  • This is almost certainly wrong, unless the PC is quite old. Contemporary ethernet ports -- including those on all models of Pi -- generally do not require the use of a cross-over cable. You can connect them directly for the exact same purpose using a normal ethernet cable. Since this is based on them sensing the crossed lines and reversing them, most likely it should work even if only one of the ports is so enabled, so it may not matter how old the PC is (I don't that for sure, but I do know that you don't need a cross-over cable to connect to a Pi to another non-antique computer). Commented Dec 11, 2016 at 13:26
  • Okay, so it's called auto MDI-X and only one of the ports needs to be so enabled -- since the Pi is, using a crossover cable won't make any difference regardless of the PC. Commented Dec 11, 2016 at 13:30
  • Ok, in PuTTy, I was typing the hostname given when I typed hostname -I when the pi was connected to the router, and now i typed the one given to me when the pi was connected to the PC. This way, I can use the pi with PuTTy, but it still isn't connected to the internet... Commented Dec 11, 2016 at 14:40
  • sudo ping 8.8.8.8 Or ping 8.8.8.8 -----> connect: Network is unreachable Commented Dec 11, 2016 at 15:44
  • also unable to ping router Commented Dec 11, 2016 at 15:51
0

Try with this way, it works for me https://www.youtube.com/watch?v=NUHRhNB67F4

Mauricio

1
  • 1
    Welcome! Please take the tour and visit the helpcenter. Whilst this may theoretically answer the question, it is preferable to include the essential parts of the answer here, and provide the link for reference. In fact we're enforcing this policy: please edit so that the answer stands on its own should the link break in the future. If it is not edited within 48 hours it will be converted to Community Wiki. Commented Jul 28, 2017 at 20:49

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.