0

I purchased a TP-LINK TL-WN823N to use Aircrack-ng for research:

https://www.aircrack-ng.org/

However, when using airmon-ng I just see:

Interface   Chipset     Driver

wlo1        Intel 1030  iwlwifi - [phy0]

So I've used previous answers such as:

Problem with TP-Link TL-WN823N

DLink DWA 131 wireless adapter not working on ubuntu 15.10

Problem with TP-Link TL-WN823N

And I realised there was an issue with drivers, so I followed these answers.

I've tried to install from these repositories as explained in the answers (and also ppa:hanipouspilot/rtlwifi): github.com/pvaret/rtl8192cu-fixes github.com/Mange/rtl8192eu-linux-driver

So I removed others and I'm currently using Mange's rtle8192eu driver, the recommended driver for kernel 4.8.0-58-generic (recommended by Pilot6), which hasn't changed anything and also giving me this warning - as I've probably incorrectly removed others?:

> dkms status
rtl8192eu, 1.0, 4.8.0-58-generic, x86_64: installed (WARNING! Diff between built and installed module!)

So I'm a bit lost at the moment on what to do, upon using iwconfig, this is currently displayed:

> iwconfig
lo        no wireless extensions.

wlx8416f91d8fbc  unassociated  Nickname:"<WIFI@REALTEK>"
      Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
      Sensitivity:0/0  
      Retry:off   RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality:0  Signal level:0  Noise level:0
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlo1      IEEE 802.11  ESSID:"HSP"  
      Mode:Managed  Frequency:2.462 GHz  Access Point: F4:0F:24:36:DE:0B   
      Bit Rate=65 Mb/s   Tx-Power=15 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Power Management:on
      Link Quality=62/70  Signal level=-48 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:159   Missed beacon:0

eno1      no wireless extensions.

Seems it is read as wlx8416f91d8fbc but still not found under airmon-ng interfaces.

Contents of /etc/modprobe.d:

alsa-base.conf               dkms.conf
blacklist-ath_pci.conf       fbdev-blacklist.conf
blacklist.conf               hackrf-blacklist.conf
blacklist-firewire.conf      intel-microcode-blacklist.conf
blacklist-framebuffer.conf   iwlwifi.conf
blacklist-modem.conf         mlx4.conf
blacklist-oss.conf           rtl-sdr-blacklist.conf
blacklist-rare-network.conf  vmwgfx-fbdev.conf
blacklist-watchdog.conf

lsusb currently shows:

Bus 002 Device 004: ID 8086:0189 Intel Corp. 
Bus 002 Device 006: ID 2357:0109  
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 03eb:210a Atmel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04f2:b252 Chicony Electronics Co., Ltd 
Bus 001 Device 003: ID 138a:0018 Validity Sensors, Inc. Fingerprint scanner
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

My TL-WN823N currently has no green light flashing like you would usually expect and regardless of what I've tried, I cannot get it to work with Aircrack-ng. If someone could guide me through fixing this issue, I would much appreciate the help - I'm not an expert in Linux by any means but I've tried some existing solutions to no avail.


Update #1: Upon re-install of Mange's driver, I get this output:
sudo dkms install rtl8192eu/1.0

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
'make' all KVER=4.8.0-58-generic....................
cleaning build area....

DKMS: build completed.

8192eu.ko:
Running module version sanity check.

Good news! Module version v4.4.1_17696.20160509_BTCOEX20160412-0042 for 8192eu.ko exactly matches what is already found in kernel 4.8.0-58-generic.
DKMS will not replace this module.
You may override by specifying --force.

depmod....

Backing up initrd.img-4.8.0-58-generic to /boot/initrd.img-4.8.0-58-generic.old-dkms
Making new initrd.img-4.8.0-58-generic
(If next boot fails, revert to initrd.img-4.8.0-58-generic.old-dkms image)
update-initramfs........

DKMS: install completed.

Update #2: I was able to fix the issue by firstly uninstalling the driver, then going into /lib/modules/4.8.0-58-generic/kernel/drivers/net/wireless and getting rid of 8192eu.ko (I just renamed it). This prevented the duplicate found in the log above. Then I reinstalled and the installation was normal. However, USB stick is still not working, but I am getting the following dkms status output (as opposed to before - see above):

rtl8192eu, 1.0, 4.8.0-58-generic, x86_64: installed
sgript
  • 101
  • My PPA was not supposed to be used with the 4.8 kernel. – Pilot6 Jul 15 '17 at 18:07
  • Which answers did you follow regarding the driver issue? – userDepth Jul 15 '17 at 18:10
  • @Pilot6 I realised once I came to your answer on the post I've linked. Other guides seemed to have recommended it without providing much detail and so I ended up installing it. I uninstalled unnecessary ones then through dkms status and dkms remove and removed any blacklist files in /etc/modprobe.d. But Mange's version did not work either, so I'm not quite sure where to go from here. Perhaps I've done something wrong. – sgript Jul 15 '17 at 18:12
  • the built and installed modules don't match .... I'd recommend removing everything ( to clear leftovers) then try Mange again .... Note: some USB wifi don't identify themselves as being rtl. there was a link for adding the dongles identifier to the module but I don't remember it right now – ravery Jul 15 '17 at 18:13
  • @userDepth I've tried both, but neither worked for me. Although I cannot say with certainty I have done it correctly. As I firstly installed the driver that was not supported by my kernel. Also now I'm getting warnings (see output of dkms status above). – sgript Jul 15 '17 at 18:14
  • Run sudo dkms remove rtl8192eu/1.0 --all. That will remove it. – Pilot6 Jul 15 '17 at 18:15
  • Uninstalled. Output: Status: This module version was INACTIVE for this kernel. – sgript Jul 15 '17 at 18:16
  • Is that expected? And also should I be trying to re-install Mange again? – sgript Jul 15 '17 at 18:17
  • This is OK. I don't know if the driver from Mange can be built on 4.8. Probably it can. – Pilot6 Jul 15 '17 at 18:31
  • can you post the result from `lsusb' with it plugged in? I found where to put the ID.... it is /sys/module/(modulename)/drivers/(devicelocation). there is a file named new_id. – ravery Jul 15 '17 at 18:33
  • @Pilot6 I could try asking Mange I suppose, or just try reinstall. @ravery Yep! I've added the output of lsusb towards the bottom of my question. – sgript Jul 15 '17 at 18:37
  • 2357:0109 is the id, and it is not being identified as a realtek wifi. add the ID to the module identifiers – ravery Jul 15 '17 at 18:39
  • @ravery How can I add the ID to the module identifiers? – sgript Jul 15 '17 at 18:40
  • check this path /sys/module/(modulename)/drivers/(devicelocation). there is a file named new_id – ravery Jul 15 '17 at 18:42
  • @ravery It really is rtl8192eu. There is no doubt. – Pilot6 Jul 15 '17 at 19:15
  • @Pilot6 -- yes that is the chip. but the dongle isn't using a realteck product code, so the kernel doesn't know it is a rtl8192eu. so we need to add the product identifier to the list for the module so it recognizes it as a rtl8192eu device – ravery Jul 15 '17 at 19:30
  • This is true, but the problem is deeper. I am not sure that the kernel module supports it well enough. But adding the id may work. – Pilot6 Jul 15 '17 at 19:35
  • maybe, maybe not but can't do anything until it can be identified. I'd reinstall Mange's drivers then see if it is identified. if not get it identified then test. you might know where to add the identifier in the source – ravery Jul 15 '17 at 19:39
  • @ravery I have tried to reinstall Mange's drivers, got the following output (see last edit in OP), not sure how to proceed. Perhaps this is why the driver is not correctly working? – sgript Jul 15 '17 at 20:15
  • I've added some updates to my original post on progression with the problem. The USB stick is still not working but my dkms status is a bit more promising now. I was going to now try to add the identifiers. – sgript Jul 15 '17 at 20:58
  • @ravery I have also found the new_id file in order to add the identifier, can you advise how this must be added - the format? As it is not accepting it as: 2357:0109, 2357 0109 has written. I've tried to replug the USB but no change. – sgript Jul 15 '17 at 21:04
  • I'll look deeper, but it appears to be 2357 0109 then reboot – ravery Jul 15 '17 at 21:27
  • Tried just now. No success. :( I'm a bit lost for what to do now really. I was thinking perhaps try other drivers. – sgript Jul 16 '17 at 01:24

1 Answers1

0

I just wanted to come back and answer my own question, just in case anyone else has this problem in future and finds this thread useful. I had a series of issues on Ubuntu 16.04 (as the host OS), Virtual Machines (Kali as Guest OS) using VirtualBox and MacOS Sierra.

Note: I had these issues using the TP-LINK TL-WN823N.

Drivers used

With the TP-LINK TL-WN823N the solution that worked simply, was installing Mange's driver which is recommended for Kernels 4.8+. Use uname -r to see which you are on. If you are below 4.8, you may benefit from installing Pilot6's driver (see next) or if you're 4.8+, Mange's driver seems to be the way to go.

See Pilot6's answer ("Problem with TP-LINK TL-WN823N" - included in my question) for help on installation for Mange's driver (he also has his own driver, which is recommended unless you're on a Kernel that is 4.8+ ). This specific question became quite over-bloated as I had incorrectly installed drivers and then had to remove them as well as any other files (see edits on question) that it had created. However, if you simply ensure you install Mange's driver there should be no issues.

Be wary of installing multiple drivers, this will not work. Uninstall the ones that are not required (see comments above to my question) and install the correct driver depending on your Kernel version.

MacOS installations

Furthermore, I wanted to share my advice on he TP-LINK TL-WN823N solution for MacOS users. I had issues finding any drivers at all for MacOS (I'm running Sierra), as it seems TP-LINK have removed all their drivers for this specific stick on their website. There's a simple solution for this, install the V2 driver designed for the TP-LINK TL-WN725N instead and this should work flawlessly after you have completed the installer. A restart may be necessary.

Virtual Machines

As for any installations on Virtual Machines, at least using VirtualBox. I found there to be issues in general with any USB devices being detected at all, which was a more general issue. To fix this, follow these steps:

  1. sudo apt-get install dkms

  2. sudo apt-get install gnome-system-tools

  3. sudo usermod -G vboxusers -a $USER

Where $USER is to be replaced by your username (found using whoami or echo $USER).

Once you've done this, restart your host OS and re-launch VirtualBox and it should be picking up. This is a separate issue to this question, but I originally thought it was also part of the same problem I had regarding this USB stick (software drivers) - but it isn't, to avoid confusion for future users with this issue.

(Credit: https://askubuntu.com/a/372843/712886 / https://askubuntu.com/a/375437/712886)


Special thanks to Pilot6 and ravery for their help. They saved me tons of time undoing the mess that I had created due to my confusion due to installing incorrect drivers. If only TP-LINK had better support for their hardware to begin with.

I hope this helps.

sgript
  • 101