5G not connecting in Ubuntu

5G is fast becoming a standard for hassle free at home Internet, with companies like Huawei partnering with Vodafone/Three/EE to offer this service.

Most phones, tablets and laptops can automatically connect to a 5GHz network without any issues.

On Ubuntu, especially with older hardware, the network can appear to be connected but a simple ping reveals otherwise. This is often due to a hardware limitation issue which can be analysed by running lspci | grep -i net and iwlist wlan0 freq to get the network controller details and associated channel frequencies respectively. The image below shows that the hardware is a Qualcomm Atheros QCA9565 wireless network adapter with all channels in the 2.4GHz range. In other words, 5G is simply not supported by this specific hardware and a dual-band wifi card is required.

In general, a 5GHz router will also support 2.4GHz frequencies. By default the router will be set to prefer 5GHz since this offers faster speeds. This however causes in issue if the hardware support is limited. To fix this, log into the Huawei router and disable 5GHz preferred which will automatically assign two different SSIDs for each frequency as shown below.

The Ubuntu machine can now explicity connect to the 2.4GHz network which is supported by the hardware. Changing the 2.4GHz bandwidth and channel from ‘auto’ to ’20MHz’ and ‘channel 11’ respectively, also improves connectivity.

The screenshot below shows the outcome of this setup where two computers and a mobile phone are connected to the network: one machine (the Ubuntu laptop) is restricted to the 2.4GHz network.

Troubleshooting

If the network is disconnecting randomly, try running echo "options ath9k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath9k.conf then removing and reinserting the wifi drivers in the kernel:

sudo rmmod ath9k
sudo modprobe ath9k
sudo service network-manager restart

Do also test the network on several devices to make sure that the problem is not with the ISP – which unfortunately seems all too common when it comes to 5G contracts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s