-1

I have my Zero on two connections:

  1. Ethernet, via USB cable (with internet sharing from my laptop)
  2. USB wifi dongle, connected to a mobile hotspot

I believe I have successfully configured both connections.

`pi@raspberrypi:~ $ ifconfig

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:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1368 (1.3 KiB)  TX bytes:1368 (1.3 KiB)
usb0      Link encap:Ethernet  HWaddr f2:e8:7e:a4:ac:49  
          inet addr:192.168.2.31  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::f0e8:7eff:fea4:ac49/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1595 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1062 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:158977 (155.2 KiB)  TX bytes:192668 (188.1 KiB)
wlan0     Link encap:Ethernet  HWaddr 18:fe:34:02:78:e5  
          inet addr:192.168.43.253  Bcast:192.168.43.255  Mask:255.255.255.0
          inet6 addr: fe80::5dc5:b2a1:d7a:5f3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:131 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:11715 (11.4 KiB)  TX bytes:17823 (17.4 KiB)`

`pi@raspberrypi:~ $ route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.43.1    0.0.0.0         UG    0      0        0 wlan0
0.0.0.0         192.168.2.1     0.0.0.0         UG    202    0        0 usb0
0.0.0.0         192.168.43.1    0.0.0.0         UG    304    0        0 wlan0
192.168.2.0     0.0.0.0         255.255.255.0   U     202    0        0 usb0
192.168.43.0    0.0.0.0         255.255.255.0   U     304    0        0 wlan0`

I can SSH into my Pi via the ethernet connection, but not the wifi connection.

When I attempt 'ssh pi@192.168.43.253', the system just hangs.

If I ping 192.168.43.253, the ping is successful.

Here is my /etc/network/interfaces file. I suspect something is wrong with it. Perhaps my ethernet is interfering with the wifi scanning. Does anyone know what is wrong?

`auto lo usb0
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid AndroidAP
    wpa-psk raspberry
allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug usb0
iface usb0 inet manual`
Milliways
  • 62,573
  • 32
  • 113
  • 225

2 Answers2

0

"Does anyone know what is wrong" Yes you fiddled with the settings.

Put it back the way it came! How do I set up networking/WiFi/Static IP

Exactly what you are trying to achieve is unclear; you seem to have connections to 2 networks. Realistically you need to do one or the other.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

Have you setup the wpa_supplicant.conf for Wifi ssid and password? You need to add the following lines to the file:

network={
    ssid="yourSSID"
    psk="yourWifiPassword"
    key_mgmt=WPA-PSK
}

Please disconnect your ethernet connection as others suggested if you want to use your Wifi connection.

hcheung
  • 865
  • 8
  • 15