2

I've just completed setting up my RPi (model B) with a Realtek WIFI adaptor, and assigned it a static local IP.

After I verified that I had a connection to the internet (checking assigned IP from ifconfig and using ping www.google.com), I tried connecting to my RPi, from my laptop, via ssh.

It always failed with an error no route to host.

I then connected from my RPi to my laptop via ssh and then exited. Now, I can connect successfully from my laptop to my RPi!


This thing, happens again with my Desktop PC (running Ubuntu) with which I am getting the same error as before.

My question is why does this happen? Why do I have to connect from my RPi to a device via ssh, so as to be able to connect from that device (after this "hand-shake") to my RPi?

Update:
[1]
Adding more info on my network:

  1. The desktop PC is connected directly to the router
  2. I have installed a TP Link powerline adaptor that supports a WIFI network, as well
  3. My laptop, my mobile and the RPi are connected to the powerline WIFI network

[2]
I've changed the device that I had the problem as it is the same - had my mobile phone and changed it with my desktop PC.

  • 1
    The message «no route to host» indicates a routing issue which makes sense only if both your PI and laptop are located in different networks. What are your PI and laptop IP addresses? – user29510 May 2 '15 at 9:42
  • My Raspberry IP is 192.168.1.100, and the IP of my laptop is 192.168.1.65. They are both connected to the WIFI network created by a TPLink powerline adapter. – Chris May 2 '15 at 11:27
  • What happens when you ping each device one another using their IP address before ssh'ing? Does a ping sort of "open the route" ? – user29510 May 2 '15 at 11:29
  • Now I am on my desktop, and I am getting Destination Host Unreachable when pinging the RPi. – Chris May 2 '15 at 11:50
  • It looks like a firewalling issue I have already had, just not in the same context. I'd like to rule that out as TPL is known to be an environment with heavy parasites. Have you tried the same while your PC and PI are wired to a switch? You can as well wire both directly if your laptop has an Ethernet plug. Be sure to use a different subnet from your wireless network. – user29510 May 2 '15 at 11:57
1

It is possible that your wifi adapter is going into power saving mode. When you connect out from your RPi, it wakes up, and for some time thereafter, you can reach it. If it powers down, other device cannot reach it. You'll have to read up on the required settings for your wifi adapter necessary to change this behavior.

1

To disable power saving mode, you have to add "wireless-power off" in your "interfaces" file

1/ Type

sudo nano /etc/network/interfaces

2/ Add at the end of file

wireless-power off

3/ Reboot by typing :

sudo reboot

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.