Ubuntu 24.04 upgrade. tp-link wifi did not work

I upgraded from 22.04 to 24.04 and my plug-in Wi-Fi tp-link device did not work.

What device do I have ?

The command

lsusb

gave me

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 17ef:4515 Lenovo Lenovo Portable HDD
Bus 001 Device 003: ID 2357:0109 TP-Link TL-WN823N v2/v3 [Realtek RTL8192EU]

but the command

sudo lshw -c network

did not show me any wireless definitions.

Fixing the problem

I followed the instructions in https://github.com/Mange/rtl8192eu-linux-driver.

The files you need may already be on your machine for earlier versions of Ubuntu, you may not need to download anything.

Because my server had no Wi-Fi connection, I used git to download the latest code to my laptop onto a USB device, and then used the USB device on the server machine. You may not need to do this.

I used the instructions to

  • sudo dkms uninstall rtl8192eu/1.0 to uninstall the driver and
  • sudo dkms remove rtl8192eu/1.0 –all to delete the drive
  • reboot
  • then followed the instructions.

Without the uninstall and remove the install did not activate the drivers.

Changing Wi-Fi frequency on Ubuntu

The Wi-Fi on two computers was giving different performance. I wondered if this was because it was using a different frequency Wi-Fi . I found this article useful on Wi-Fi. It says the higher the frequency used, the better the performance.

Display information about what the Wi-Fi is currently using.

The iwconfig command gave

wlp4s0    IEEE 802.11  ESSID:"BTHub6-78RQ"  
          Mode:Managed  Frequency:5.24 GHz  Access Point: 94:6A:B0:85:54:AA   
          Bit Rate=585.1 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=41/70  Signal level=-69 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:32   Missed beacon:0

Which shows the frequency (5.24 GHz) and bit rate (585.1 Mega bits /second (not bytes).

On the slower computer on the same Wi-Fi network it had 2.412 GHz.

Display information about the wireless interface

The iwlist command displays information about the wireless interface and its capabilities

iwlist wlp4s0 frequency gave

wlp4s0    32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
...       
          Channel 48 : 5.24 GHz
...
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Current Frequency:5.24 GHz (Channel 48)

On my other machine it only listed 2.412 to 2,484 GHz.

What frequency is available?

Displaying my BT hub (http://192.168.1.254/basic) it displayed 2.4 and 5 GHz and channels 1 and 48. Thus I can use frequencies 2.412 and 5.24 GHz

Change the frequency being used

sudo iwconfig wlp4s0 freq 2.412G

Turn Wi-Fi off and on – and it picks up the changed value.