1

Around June of last year, I got myself a Raspberry Pi Model B+. I was super excited, but all that excitement died down when I moved overseas. I used the Pi off and on, not doing some real powerful stuff. Now, I am ready to use my Pi: in headless mode. I tried connecting my Pi to my router, with a fresh install of raspbian. Then, I powered it on. I waited around 5 minutes. Then, from my Mac, I typed ssh pi@192.168.1.38 I had previously connected to my Pi via VNC and SSH. Now, it says: connection timed out, and: host is down. I tried also doing: ping 192.168.1.38 Still the same messages. What is going on? I need help!

Side note: this is not a duplicate of other questions, because others like this use a wifi dongle, or their internet works, but not their pinging.

rajap
  • 11
  • 1
  • 4

4 Answers4

2

This is the Poor Man's Broadcast Ping. I'm assuming that this is a class C network.

$ i=1 ; while [ i -lt 255 ] ; do ping -c 1 192.168.2.$i ; i=$((i + 1)) ; done | grep -B 1 "1 received" 

--- 192.168.2.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
--
--- 192.168.2.102 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
--
--- 192.168.2.103 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
ott--
  • 189
  • 1
  • 1
  • 7
1

You probably have the wrong IP address for your Raspberry Pi. You could go to your router's admin page (the directions to get to the page is usually in the instructions for the router or somewhere on the manufacturer's support page) and look at the list of connected devices and their IPs. Try each of the listed devices and if none of them work, then I would reinstall Raspbian on the SD card and start over.

Jal
  • 31
  • 3
1

There are two mostly possible reasons for such issue:

  1. Your RPi receive ip through dhcp service from your router and it is not 192.168.1.38.
  2. Your Rpi cannot connect to your router because it has incorrect settings of default gw.

In first case your goal is determine what is actual ip adress of your Rpi. You can try to investigate dhcp logs of your router (but be attentive that you find your current Rpi device, but not previous). Or use script from previous answer, but with a little fix (because for you case it is not correct, there should be 1 instead to 2 in ping mask):

 i=1 ; while [ $i -lt 255 ] ; do ping -c 1 192.168.1.$i ; i=$((i + 1)) ; done | grep -B 1 "1 received"

There are different ways to solve the second issue, but in your case I suggest to try the next one:

  1. sudo nano /etc/dhcpcd.conf

  2. Type in the following lines on the top of the file:

    interface eth0
    static ip_address=192.168.1.38
    static routers=192.168.1.1
    static domain_name_servers=192.168.1.1
    
  3. sudo reboot

Hope this helps.

1

mDNS

Try connecting to the raspberry pi using its mdns name:

ssh pi@raspberrypi.local

I just tested it today with fresh installs of 2016-03-18-raspbian-jessie and 2016-03-18-raspbian-jessie-lite on my original Raspberry Pi B: both versions grab an ip address via dhcp, start avahi and start sshd right out of the box.

Patch Cable

If that doesn't work, please make sure you are connecting to your router with a patch / straight-through cable, and not a crossover cable.

Hydraxan14
  • 1,876
  • 1
  • 13
  • 23