1

I've got a imx7dsabresd board, I'm trying to write a script that will download an image every 30s from my server (wget).

The output from wget is wget: error getting response: Connection reset by peer.

If I try to ping an address e.g. ping www.google.com I won't receive any packets:

PING www.google.com (216.58.204.68): 56 data bytes
--- www.google.com ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss

But it has resolved the domain name to an IP address.

Thinks I've tried: - I tried this from another post but it didn't make a difference for me.

Edit:

Adding Traceroute

traceroute to google.com (172.217.23.14), 30 hops max, 38 byte packets
 1  192.168.7.2 (192.168.7.2)  2999.477 ms !H  2995.963 ms !H  3000.029 ms !H

ifconfig

    eth0      Link encap:Ethernet  HWaddr 1A:E9:81:4E:A3:F6
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1228 (1.1 KiB)  TX bytes:1228 (1.1 KiB)

usb0      Link encap:Ethernet  HWaddr BA:ED:BE:95:F7:54
          inet addr:192.168.7.2  Bcast:192.168.7.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr E0:76:D0:C3:5D:0D
          inet addr:192.168.59.87  Bcast:192.168.59.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3965 errors:0 dropped:583 overruns:0 frame:0
          TX packets:554 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:576828 (563.3 KiB)  TX bytes:104215 (101.7 KiB)

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.7.1     0.0.0.0         UG    0      0        0 usb0
0.0.0.0         192.168.59.1    0.0.0.0         UG    10     0        0 wlan0
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 usb0
192.168.59.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan0

ip route -sh

default via 192.168.7.1 dev usb0
default via 192.168.59.1 dev wlan0  metric 10
192.168.7.0/24 dev usb0  proto kernel  scope link  src 192.168.7.2
192.168.59.0/24 dev wlan0  proto kernel  scope link  src 192.168.59.87
  • Maybe the remote server is blocking ping requests? – Raman Sailopal Jan 19 '18 at 10:27
  • But if I'm trying to ping Google, does that mean Google would have to be blocking ping requests? – James Johnson Jan 19 '18 at 10:28
  • Fair point. Use traceroute to see where your traffic is getting held up. – Raman Sailopal Jan 19 '18 at 10:34
  • Traceroute output added above – James Johnson Jan 19 '18 at 10:42
  • 192.168.7.2. is the next port of investigation then. Maybe there is an issue with your gateway/router. – Raman Sailopal Jan 19 '18 at 10:47
2

It looks like a conflict in routing with the two devices. Maybe wlan0 is used for resolving but not as gateway.

  1. Take down either device usb0 or wlan0 with ifdown and check if it works better: sudo ifdown usb0
  2. Post the contents of /etc/resolv.conf.

In case you need to access to the system also through the usb0 interface skip the above part and just remove one default gateway with:

route del default gw 192.168.7.1
0

Ping use ICMP which might be blocked on your machine or your router. If it's blocked you won't get any response. Do a traceroute or MTR to google.com and check what's going on.

0

enter image description here

where is your inet gateway? where are hosts without problem?

  • there's no physical connection, it's over wifi. Everything else on the network can connect okay and my machine and SSH into the box – James Johnson Jan 19 '18 at 11:31
  • Your default route is 192.168.7.1 Can you ping it? If you want to change default route to 192.168.59.1 you must change metric. – dash1121 Jan 19 '18 at 12:36
  • unable to ping 192.168.7.1. What do you mean by change metric? – James Johnson Jan 19 '18 at 12:54
  • your device try to find inet after 192.168.7.1 because of Metric 0 – dash1121 Jan 19 '18 at 12:57
  • where is your dns server? – dash1121 Jan 19 '18 at 12:58

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.