0

I have an Ubuntu 18.04.02 LTS (headless) server that has been communicating with Ethernet. Circumstances demand that I now switch to Wifi using a USB Wifi dongle. I have used this Wifi dongle in the past for Raspberry Pi and Beaglebone devices running Debian and so though it would be fairly simple. (Insane laughing?)

Due to incomplete and conflicting documentation I now find myself completely lost.

I have added a configuration to my /etc/netplan/50-cloud-init.yaml file as follow

network:
    version: 2
    renderer: networkd
    ethernets:
        enp2s0:
            addresses:
            - 192.168.1.200/24
            gateway4: 192.168.1.254
            nameservers:
                addresses:
                - 192.168.1.254

   wifis:
       wlx0013efc2047b:
           access-points:
               "MyWiFiAccessPoint":
                password: "hexpassword"
        addresses:
        - 192.168.1.250/24
        gateway4: 192.168.1.254
        nameservers:
            addresses:
            - 192.168.1.254

Obviously my configuration file has the real access point details. Network manager seems happy with this configuration.

ifconfig lists the device as present but not connected. The results are:

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.200  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::230:1bff:fe46:b77f  prefixlen 64  scopeid 0x20<link>
    ether 00:30:1b:46:b7:7f  txqueuelen 1000  (Ethernet)
    RX packets 26035  bytes 7333457 (7.3 MB)
    RX errors 0  dropped 4735  overruns 0  frame 0
    TX packets 18222  bytes 2680521 (2.6 MB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 17

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 252  bytes 20431 (20.4 KB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 252  bytes 20431 (20.4 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx0013efc2047b: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    ether 00:13:ef:c2:04:7b  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The results of ip link show are:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:30:1b:46:b7:7f brd ff:ff:ff:ff:ff:ff

3: wlx0013efc2047b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 00:13:ef:c2:04:7b brd ff:ff:ff:ff:ff:ff

It seems that the device is available, but my server is not joining my wifi network.

lusb gives the following:

Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Can anyone please help?

  • Hello and welcome to AskUbuntu! Can you please edit your post and paste the output of ifconfig -a (or ip addr show) and ip link show? – Mr Shunz May 3 at 12:14
  • Done that. Thank you. – JaffaMicrobrain May 3 at 14:22
  • I see two problems, but not enough info for an answer. 1. you still have a gateway on the ethernet, you should remove it if you want to connect through the WiFi. 2. your WiFi interface wlx0013efc2074b looks like it's not connected (from the ip link output -> state DOWN). Please comment out the ethernet part (if you have physical access to the machine!!!) and double check your WiFi data. Then, if you did not already, try a reboot. Also, can you post the output of lsusb (maybe with -vv)? – Mr Shunz May 3 at 16:31
  • Is your pasted config accurate with respect to indentation? Because the 'wifis' key needs to be at the same level of indentation as 'ethernets', which is not what your paste shows. – slangasek May 3 at 18:45
  • Thank you. The YAML config does not correctly show the indentations. Trouble with the editor. ifconfig presents three devices, 1 - enp2s0 (My configured Ethernet interface), 2 - lo (The loopback connector) and 3 - wlx0013efc2047b. The results of which are: wlx0013efc2047b: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 <newline> ether 00:13:ef:c2:04:7b txqueuelen 1000 (Ethernet). The tests suggested by slangasek result in Failed to request link: No such device. Let me say again that this is a headless server. I cannot kill the Ethernet until wifi is working. – JaffaMicrobrain May 3 at 23:25
0

Things to check:

  • networkctl status wlx0013efc2074b to verify that networkd sees that it is supposed to manage the device
  • iwconfig wlx0013efc2074b to verify whether the device has managed to associate with the AP

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.