Jump to content

OPi Zero with USB WiFi problem


Zaphod69

Recommended Posts

Hi all,

 

Semi-noob here so please be patient :)

 

With the OPi Zero having rubbish WiFi I added a USB WiFi adaptor. I know it works as I've been using it on my OPi One running Retrorangepi. The Zero will be running OctoPrint in a room too far away from the router to run Ethernet cables.

 

To initially set it up I connected the Zero to my router, logged in and disabled the onboard wireless adaptor, plugged in the USB and rebooted. Ran armbian-config and set up a static IP (192.168.1.30).

 

Then I shutdown the Zero and unplugged the Ethernet cable and powered up the Zero again. Lan scan shows the IP address as up but ping shows 100% packet loss. Can't log in via ssh or web based webmin.

At this point I'm stumped. Here are some diagnostic outputs:

 

root@OctoPi:~# sudo lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapte
r
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@OctoPi:~#

root@OctoPi:~# cat /etc/network/interfaces
# armbian-config created
source /etc/network/interfaces.d/*
 
# Local loopback
auto lo
iface lo inet loopback
 
# Interface eth0
allow-hotplug eth0
#no-auto-down eth0
iface eth0 inet static
        address 192.168.1.45
        netmask 24
        gateway 192.168.1.1
        dns-nameservers 1.1.1.1
root@OctoPi:~#
 
 
 root@OctoPi:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.45  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::42:b9ff:fee6:69b  prefixlen 64  scopeid 0x20<link>
        ether 02:42:b9:e6:06:9b  txqueuelen 1000  (Ethernet)
        RX packets 2753  bytes 214464 (209.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4896  bytes 1050921 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 37
 
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 120  bytes 9600 (9.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 120  bytes 9600 (9.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
wlx000d81aef933: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.30  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::3f47:9f4a:215c:f2d  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:81:ae:f9:33  txqueuelen 1000  (Ethernet)
        RX packets 14860  bytes 2974356 (2.8 MiB)
        RX errors 0  dropped 131  overruns 0  frame 0
        TX packets 121  bytes 10566 (10.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
root@OctoPi:~#

root@OctoPi:~# iwconfig
lo        no wireless extensions.
 
eth0      no wireless extensions.
 
wlx000d81aef933  IEEE 802.11bgn  ESSID:"NetComm 3399"  Nickname:"rtl_wifi"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 18:F1:45:90:77:6D
          Bit Rate:150 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=100/100  Signal level=86/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
 
root@OctoPi:~#

I'm stumped at this point. Plug Ethernet back in and I can ping the wireless and access it via ssh.

 

What have I missed?

 

Thanks in advance :)

 

Link to comment
Share on other sites

Try to setup the Wifi via nmtui (or via /etc/network/interfaces) with a Gateway and DNS.

It looks like the eth0 is used as the "main" network port and you did reah the .30 via the .45 when the network cable is connected.

 

I only got success in this case when I did disable eth0 and only to use wifi - I had configured this via the serial port.

Link to comment
Share on other sites

Thanks very much!

 

I had initially set it up via nmtui but didn't disable eth0. I figured eth0 would simply become inactive once unplugged.

 

Tomorrow morning I'll plug it into the Anet A8 and hopefully the Logitech webcam and be all set to go.

 

Thanks again :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines