Cannot resolve hostname - LAN cable lights on Pi not showing

Hi there… We’ve just finished building our GoPiGo (my 9 year old daughter and 7 yr old son and I). Awesome instruction video, thank you…

We’re using:

1 - The Base GoPiGo kit
2 - The Raspberry Pi 2 that came with our Kano programming kit
3 - The dexter industries Raspbian SD card
4 - the WiFi dongle that dexter industries supplied
5 - Am using DHCP

So - We’ve plugged it into my Macbook Pro running OSX 10.9.5 and have powered the GoPiGo through both wall socket and battery pack, but unfortunately I can’t see any type of connection between my Macbook and the Raspberry Pi i.e.

1 - no LED lights in the LAN port
2 - no connection showing in Network Connections - Ethernet
3 - Cannot resolve hostname when trying to ping raspberrypi.local via terminal.

Any ideas? We have been using the Raspberry Pi successfully as a Kano for a few weeks now…

Thanks in advance for your help!

Thanks for the feedback, and thanks for the clear description of what’s going on.

It seems that the choke point is the ethernet connection. Since you don’t see any lights on either end of the ethernet cable, they’re not talking. This could be because the ethernet cable isn’t properly plugged in to either end. You might also try switching out your ethernet cable.

Until we can get the lights to go on, you won’t see a connection. So anything that’s involved in connecting the two should be inspected. Does this make sense?

Best,

John

Sure does! Thanks for getting back to me so quickly John.

I’ve checked the ethernet cable and it works fine connecting macbook pro to modem… So no problem with the ethernet cable or connection…

I’ve tried to connect via VNC viewer but no luck.

I’m going to plug the Raspberry Pi directly into monitor and keyboard and see what I can see…

Thanks again!

Eldon

Hmmm… problem might be a little more serious… When I plug the Pi into the monitor directly… (while attached in it’s GoPiGo form I’m getting the following start up errors… (see attached screenshot)

Ending in [ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

Any ideas? The Pi was working fine (have been using it with the Kano kit)…

I’m now following an earlier thread where it suggested that if that error is coming up then the image on the SD card is stuffed… so I’m following the instructions to download and reinstall the latest Raspbian for Robots image… will let you know how I get on. Over and out.

Okay…

I’m afraid (being a cautious soul) I need to check something before I complete this terminal command… I’m following the instructions here

And it says on this page…

“Now we have to remember the disk number (BSD Name). In our case it was “disk3”. This can change, depending on your disk number or BSD name. Be sure NOT to use disk1.”

Yet… my SD card volume that was already unmounted when I looked at it through system information was listed as “disk1” (see attached screenshots).

So should I sudo to try and install the new image into Disk1 as it was listed in my card reader? Or is there a very good reason why you have said “Be sure NOT to use disk1”…

I’ll take a look at those other links you put to elinux.org and the RaspberryPi foundation in the meantime, but your help is greatly appreciated!

Cheers,

Eldon (Melbourne, Australia)

Hey Eldon, I’m not sure why your SD card is showing up as disk1. The point of the statement though, is be sure you’re not overwriting your own hard drive (which you can actually do with the mac!). So as long as it’s not the harddrive, you should be fine. I would just triple check that it’s not!

Arrrrghh!!!

Now the SD card is showing up as disk0! (which as you can see is at odds with the earlier screenshot)

Last login: Tue Oct 27 07:19:45 on console
annas-mbp-3:~ Eldon$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *4.0 GB disk0
1: Windows_FAT_32 boot 58.7 MB disk0s1
2: Linux 3.3 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Macintosh HD 499.2 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3

OK… well so long as it’s disk0 now… lets give it a shot… oh… wait, maybe I’ll backup my mac first!

Cheers,

Eldon

Ok…

MicroSD card slot broke. Obtained new RaspberryPi.

So now…

1 - RaspberryPi is powered up through the 5V powercable.
2 - LAN lights are showing (Yay!)
3 - However, I cannot ping or ssh with the RaspberryPi over Ethernet from my Macbook Pro.

Annas-MacBook-Pro-3:~ Eldon$ ping raspberrypi.local
PING raspberrypi.local (169.254.8.51): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
etc

I can see the RaspberryPi booting correctly when plugged in directly to the TV as a monitor.

Can you suggest what to do next?

Thanks. Eldon.

OK… updated the Pi setup as desktop (directly plugged in to router).

Using LXTerminal I ran:

sudo apt-get update
sudo apt-get upgrade

then

`hostname -I
Revealed 10.1.1.5 169.254.6.235

Now I can ping both those from my Macbook.

annas-mbp-3:~ Eldon$ ping 10.1.1.15
PING 10.1.1.15 (10.1.1.15): 56 data bytes
64 bytes from 10.1.1.15: icmp_seq=0 ttl=64 time=2.842 ms
64 bytes from 10.1.1.15: icmp_seq=1 ttl=64 time=3.924 ms
64 bytes from 10.1.1.15: icmp_seq=2 ttl=64 time=28.275 ms
64 bytes from 10.1.1.15: icmp_seq=3 ttl=64 time=27.897 ms
64 bytes from 10.1.1.15: icmp_seq=4 ttl=64 time=4.192 ms
64 bytes from 10.1.1.15: icmp_seq=5 ttl=64 time=4.963 ms
Request timeout for icmp_seq 6
64 bytes from 10.1.1.15: icmp_seq=7 ttl=64 time=4.121 ms
64 bytes from 10.1.1.15: icmp_seq=8 ttl=64 time=23.899 ms
~
64 bytes from 10.1.1.15: icmp_seq=44 ttl=64 time=4.086 ms
64 bytes from 10.1.1.15: icmp_seq=45 ttl=64 time=4.315 ms
^C
— 10.1.1.15 ping statistics —
46 packets transmitted, 42 packets received, 8.7% packet loss
round-trip min/avg/max/stddev = 1.342/7.144/28.275/7.222 ms
annas-mbp-3:~ Eldon$ ping 169.254.6.235
PING 169.254.6.235 (169.254.6.235): 56 data bytes
64 bytes from 169.254.6.235: icmp_seq=0 ttl=64 time=8.201 ms
64 bytes from 169.254.6.235: icmp_seq=1 ttl=64 time=5.577 ms
~
64 bytes from 169.254.6.235: icmp_seq=12 ttl=64 time=4.642 ms
64 bytes from 169.254.6.235: icmp_seq=13 ttl=64 time=1.389 ms
64 bytes from 169.254.6.235: icmp_seq=14 ttl=64 time=4.356 ms
^C
— 169.254.6.235 ping statistics —
15 packets transmitted, 15 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.389/6.286/17.390/4.040 ms

I can ssh to the raspberrypi

annas-mbp-3:~ Eldon$ ssh pi@raspberrypi.local
The authenticity of host ‘raspberrypi.local (10.1.1.15)’ can’t be established.
RSA key fingerprint is 7f:27:c6:a2:15:9e:10:ca:3d:69:20:fe:d6:b6:d3:38.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘raspberrypi.local,10.1.1.15’ (RSA) to the list of known hosts.
pi@raspberrypi.local’s password:
Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

I can also VNCviewer in wirelessly too and bring up the raspberryPi homescreen.

But… plugging the ethernet cable directly into my Macbook, gives the same original problem or request timeout.

Last login: Tue Mar 10 02:05:41 2015 from dexter-probook.local
pi@raspberrypi ~ Write failed: Host is down annas-mbp-3:~ Eldon ping 169.254.6.235
PING 169.254.6.235 (169.254.6.235): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4

Am I stuck in some weird connectivity problem between my macbook and the raspberrypi? Can I just connect up the raspberrypi via the router and VNC into it to program it that way? Help!? I’m trying to troubleshoot it but this has me stumped…

Eesh, this is getting a little sticky. Great news about getting on via wifi though, I don’t think anything is wrong with the Raspberry Pi or image if this is working on the network.

On my MacBook Air (which should be the same thing I think), I have the ethernet adapter (Mine is a USB Ethernet), i have the option to configure IPv4 “Using DHCP”. Is yours also selected to “Using DHCP”?

Yep - sure is set to “IPv4 Using DHCP” (screenshot attached) - I checked that when I was following along to the video… Ethernet port from my Mac works fine: I was able to connect to the RaspberryPi when it was plugged in by Ethernet to the router… just not directly… mighty strange huh?

I also tried it using my partners Macbook… same problem. I’n running OS X 10.9.5, she’s running 10.8.5…

Is it getting into the too hard basket? I guess I’m just wondering if I can connect via the Router WiFi, but for that I was wondering if you could suggest a way to setup the RaspberyPi to connect to the router via WiFi - I’m sure there’s a good tutorial somewhere right? Seems a decent workaround if I can’t get my Mac to connect directly to it…

Thanks again for your help.

Eldon

I would really like to figure this one out so we can help other folks with it. I really appreciate your patience!

One more shot in the dark. On my PC laptop, I sometimes have a hard time resolving the host *.local ; I can invariably correct this though if I turn off my wifi. I assume that the PC is having a hard time managing both networks, or is searching the wifi network for the raspberrypi.local address and then giving up when it can’t find it. I wonder if there’s a way to do this on your Mac, turn off the wifi and keep the ethernet cable on.

Generally when I’m setting up the PI, I end up connecting it to the Wifi network almost immediately to get internet access. Here are the details on getting your wifi setup:

http://www.dexterindustries.com/GoPiGo/getting-started-with-your-gopigo-raspberry-pi-robot-kit-2/4-connect-to-the-gopigo/

OK… Success! Of a sort…

I just turned off the WiFi on my Macbook… and tried to connect… no dice:

Annas-MacBook-Pro-3:~ Eldon$ ping raspberrypi.local
PING raspberrypi.local (169.254.8.51): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
Request timeout for icmp_seq 10
Request timeout for icmp_seq 11
^C
— raspberrypi.local ping statistics —
13 packets transmitted, 0 packets received, 100.0% packet loss
Annas-MacBook-Pro-3:~ Eldon$ ping raspberrypi.local

Then, in a fit of pique I unplugged the WiFi dongle that we got with the kit… It connects!?

— raspberrypi.local ping statistics —
18 packets transmitted, 18 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.377/0.478/0.559/0.051 ms
Annas-MacBook-Pro-3:~ Eldon$ ping raspberrypi.local
PING raspberrypi.local (169.254.8.51): 56 data bytes
64 bytes from 169.254.8.51: icmp_seq=0 ttl=64 time=0.422 ms
64 bytes from 169.254.8.51: icmp_seq=1 ttl=64 time=0.499 ms
64 bytes from 169.254.8.51: icmp_seq=2 ttl=64 time=0.537 ms
64 bytes from 169.254.8.51: icmp_seq=3 ttl=64 time=0.598 ms
64 bytes from 169.254.8.51: icmp_seq=4 ttl=64 time=0.491 ms
64 bytes from 169.254.8.51: icmp_seq=5 ttl=64 time=0.381 ms
64 bytes from 169.254.8.51: icmp_seq=6 ttl=64 time=0.533 ms
64 bytes from 169.254.8.51: icmp_seq=7 ttl=64 time=0.476 ms
^C
— raspberrypi.local ping statistics —
8 packets transmitted, 8 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.381/0.492/0.598/0.064 ms

Eldon$ ssh pi@raspberrypi.local
Warning: Permanently added the RSA host key for IP address ‘169.254.8.51’ to the list of known hosts.
pi@raspberrypi.local’s password:
Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Oct 30 23:47:00 2015 from annas-mbp-3
pi@raspberrypi ~ $

Is that an important part of the instructions I somehow missed? When we get to setting up via WiFi again I’m going to need to plug it back in again… and I have the feeling that when I do the VNC viewer I need to have them both plugged in through Ethernet and WiFi?

Ha! No, that’s not in the instructions but it should be! That’s fantastic; I’ve seen that too but forgot about it. Basically, pulling the wifi dongle off the Pi, and then putting it back in solved the problem, is that right?

Yes! All sorted by removing the WiFi dongle to allow connection by Ethernet cable… Phew!

Now I’m though to the WiFi connection successfully too… screenshot attached (with both WiFi dongle and Ethernet cable plugged in).

Thanks so much for your help John! It’s been great…

Eldon (and Henry and Alice)

And yes… that’s right… I didn’t plug it in straight away… waited til I had connected by Ethernet… but they’re both plugged in now and working fine!

Glad we could help out!