LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-15-2017, 04:34 AM   #1
bakura_666
LQ Newbie
 
Registered: May 2017
Distribution: Slackware64 14.2
Posts: 13

Rep: Reputation: Disabled
Problem trying to put wireless card on monitor mode rtl8821ae - slackware64-current


Hello

I cannot put my wireless card into monitor mode. I am running Slackware64 with 4.9.27 kernel (build by hand) and the rtl8821ae module is loaded and running (I have Internet connection) but, either airmon-ng or iwconfig do not put the card into monitor mode. In other Linux systems I do not have this problem (arch-linux, crux).

I put here some info:


uname -a
Code:
Linux dnnt 4.9.27 #3 SMP Sat May 13 23:26:52 CEST 2017 x86_64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz GenuineIntel GNU/Linux

lsmod
Code:
Module                  Size  Used by
x86_pkg_temp_thermal     4997  0
kvm_intel             171677  0
kvm                   477529  1 kvm_intel
irqbypass               2808  1 kvm
aesni_intel           157669  0
aes_x86_64              7503  1 aesni_intel
glue_helper             3829  1 aesni_intel
lrw                     3541  1 aesni_intel
ablk_helper             2076  1 aesni_intel
cryptd                  8511  2 ablk_helper,aesni_intel
rtl8821ae             250704  0
btcoexist              42320  1 rtl8821ae
rtsx_pci_sdmmc         10232  0
mmc_core               99026  1 rtsx_pci_sdmmc
rtl_pci                23824  1 rtl8821ae
rtlwifi                67685  3 rtl_pci,btcoexist,rtl8821ae

modinfo rtl8821ae
Code:
filename:       /lib/modules/4.9.27/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/rtl8821ae.ko
firmware:       rtlwifi/rtl8821aefw.bin
description:    Realtek 8821ae 802.11ac PCI wireless
license:        GPL
author:         Realtek WlanFAE	<wlanfae@realtek.com>
alias:          pci:v000010ECd00008821sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008812sv*sd*bc*sc*i*
depends:        rtlwifi,rtl_pci,btcoexist
intree:         Y
vermagic:       4.9.27 SMP mod_unload 
parm:           swenc:Set to 1 for software crypto (default 0)
 (bool)
parm:           ips:Set to 0 to not use link power save (default 1)
 (bool)
parm:           swlps:Set to 1 to use SW control power save (default 0)
 (bool)
parm:           fwlps:Set to 1 to use FW control power save (default 1)
 (bool)
parm:           msi:Set to 1 to use MSI interrupts mode (default 1)
 (bool)
parm:           debug:Set debug level (0-5) (default 0) (int)
parm:           disable_watchdog:Set to 1 to disable the watchdog (default 0)
 (bool)
parm:           int_clear:Set to 0 to disable interrupt clear before set (default 1)
 (bool)

iwconfig wlan0 mode monitor
Code:
Error for wireless request "Set Mode" (8B06):
SET failed on device wlan0 ; Invalid argument

I do not know why this is happen. Any ideas? If you need more info, please,let me know.

Thanks you all!
 
Old 05-15-2017, 03:00 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Are you setting your wireless NIC to monitor mode for use with Aircrack-ng? Are you certain you are setting the right NIC to monitor mode??

If so, what is the output (as root) of:
Code:
# airmon-ng check
# iwconfig
Also, post the output of:
Code:
# airmon-ng start wlan0
 
Old 05-15-2017, 03:24 PM   #3
bakura_666
LQ Newbie
 
Registered: May 2017
Distribution: Slackware64 14.2
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hello, thanks for your reply.

Yes, this is my NIC info:


Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.34  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::553:e3b8:2548:8ab5  prefixlen 64  scopeid 0x20<link>
        ether 70:8b:cd:12:cc:bd  txqueuelen 1000  (Ethernet)
        RX packets 1756  bytes 2066867 (1.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1089  bytes 291285 (284.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 1  (Local Loopback)
        RX packets 2107  bytes 1186961 (1.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2107  bytes 1186961 (1.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        unspec 00-00-00-00-35-33-00-65-00-00-00-00-00-00-00-00  txqueuelen 1  (UNSPEC)
        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

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether b0:c0:90:ac:8c:a1  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 card is wlan0.


Code:
# airmon-ng check
(shows nothing)


Code:
# iwconfig
lo              no wireless extensions

sit0            no wireless extensions

wlan0           no wireless extensions

eth0            no wireless extensions

Code:
# airmon-ng start wlan0



Interface       Chipset         Driver
 
Old 05-15-2017, 06:48 PM   #4
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
I have used rtl8821ae and to my experience it has terrible linux support.
I had problems with it dropping connection all the time, does it keep dropping the connection for you as well?
I'm not even sure that it supports monitor mode, but you obviously got it to work in other linux distributions.
A better option is to buy an USB wireless adapter for one or two dollars with better linux support.
 
Old 05-16-2017, 02:43 AM   #5
bakura_666
LQ Newbie
 
Registered: May 2017
Distribution: Slackware64 14.2
Posts: 13

Original Poster
Rep: Reputation: Disabled
At the moment, I am posting this with wireless card, and I do not remember problems or issues with the driver, but most of the time I run my notebook with wired connection although.

Yeah, I got to work monitor mode and package injection in archlinux and crux with the same driver, and because of this, I though was some slackware-related problem. I test my USB adapter and monitor mode does not work (the same errors as PCI NIC, and it is a rtl8192cu).

Well, I am looking at github devel of rtlwifi_new, and a lot of people have problems with this driver (one guy says he has issues since 4.9 kernel). I will open a ticket there and trying the 4.10 kernel series.

Thanks you.

New: I am running now 4.10.16 (stable) kernel and still monitor mode does not work. I try another different Linux to test it. Thanks you.

Last edited by bakura_666; 05-16-2017 at 03:59 AM. Reason: New failed test on 4.10.16 kernel
 
1 members found this post helpful.
Old 05-16-2017, 07:59 PM   #6
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Problem trying to put wireless card on monitor mode rtl8821ae - slackware64-current

You may need to rebuild the kernel-firmware package using a more recent git release. I might be wrong about that.

You could also upgrade to Slackware-current.

Those 5Ghz WLAN NIC's have less support in aircrack-ng as well. I use the USB wifi dongle with the antenna from Adafruit industries (for the raspberry pi with a/b/g/n support) and it seems to do the job with aircrack-ng and kismet.
 
Old 05-16-2017, 10:14 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If it is the kernel firmware that needs to be upgraded, you can just grab the latest package from -current and use upgradepkg on it. It won't conflict with anything.
 
Old 05-17-2017, 07:31 AM   #8
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
bassmadrigal / or other experts

Interesting idea !

But does it matter that Slackware Current Packages were built with gcc version 7.1.0 where OTOH, the Kernel and glib and what-not on Slackware 14.2 were built with gcc version 5.3.0 ?

Thanks !

-- kjh
 
Old 05-17-2017, 07:57 AM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by kjhambrick View Post
But does it matter that Slackware Current Packages were built with gcc version 7.1.0 where OTOH, the Kernel and glib and what-not on Slackware 14.2 were built with gcc version 5.3.0 ?
My suggestion was to use just the kernel-firmware package, which isn't compiled, just repackaged from kernel.org's git. And it is not tied to any kernel (although, newer kernels might require newer firmware files that may not exist in older versions).

But, in relation to the GCC used, I don't *think* it matters. I've pulled kernels from newer versions of Slackware and used them in older versions with no noticeable issues. I'm actually running the 4.9 kernel from -current in my 14.1 (yes, not 14.2) install, and I haven't noticed any issues with it.

I don't think GCC matters when executing a binary, because it is just creating an executable. The GCC version should only have an effect during the compiling process, not while running (unless any bugs from GCC cause an issue with the binary). But since you don't need GCC installed to run programs compiled by GCC, I *think* it ultimately doesn't matter how it was compiled.
 
1 members found this post helpful.
Old 05-17-2017, 08:53 AM   #10
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Nice !

I'll try it on Virtual Slackware64 14.2 Box later this week !

-- kjh
 
Old 05-17-2017, 01:11 PM   #11
bilbod
Member
 
Registered: Mar 2003
Posts: 134

Rep: Reputation: 33
Quote:
Originally Posted by bakura_666 View Post
I cannot put my wireless card into monitor mode. I am running Slackware64 with 4.9.27 kernel (build by hand) and the rtl8821ae module is loaded and running (I have Internet connection) but, either airmon-ng or iwconfig do not put the card into monitor mode. In other Linux systems I do not have this problem (arch-linux, crux).
I have had trouble putting some NIC's in Monitor mode. If the NIC supports Monitor mode, I have found the following code always seems to work. It's worth a try.

Code:
ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up
If you prefer the more modern ip command

Code:
ip link set dev wlan0 down
iwconfig wlan0 mode monitor
ip link set dev wlan0 up
 
Old 05-17-2017, 01:28 PM   #12
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
When upgrading firmware i find it easiest to use the kernel-firmware.SlackBuild which builds the kernel-firmware from present time.
Code:
lftp -c mirror  http://slackware.osuosl.org/slackware64-current/source/a/kernel-firmware/
cd kernel-firmware/
su -c "sh kernel-firmware.SlackBuild"
Then install the package.
/tmp/kernel-firmware-*git-noarch-1.txz
 
1 members found this post helpful.
Old 05-20-2017, 10:54 AM   #13
bakura_666
LQ Newbie
 
Registered: May 2017
Distribution: Slackware64 14.2
Posts: 13

Original Poster
Rep: Reputation: Disabled
First to all, sorry for no reply sooner, I had a busy week .

Second, all the things I tried to get to work the wireless was a failure. So, today, I re-installed everything (Slackware 14.2) and, before upgrade packages to current, I read carefully the upgrade.txt file at mirrors.slackware.com site and I did the upgrade step-by-step. After that, I was able to put the card in monitor mode and run tcpdump and airodump-ng in quick test without errors (well, the only thing I was missing since this rush-upgrade, it was the monitor interface: the whole system works without any errors, and I did not notice nothing wrong)

The failure when I open this thread was, I upgrade my os to current running upgradepkg on all packages directory; and the only thing I missed was the monitor mode in wireless card (the whole system works solid).

I do not know if my solution can help anyone here with complains about the driver, but maybe, it could work.

Thanks you all!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to put wireless card in monitor mode ubuntuv Linux - Wireless Networking 2 07-15-2010 11:26 AM
How to put wireless card in monitor mode? rkski Linux - Wireless Networking 3 12-02-2009 05:27 PM
Can't put my atheros based wireless card into monitor mode Cassanova Linux - Hardware 8 05-02-2009 01:51 PM
how to put a network card into monitor mode? rabbit2345 Linux - Wireless Networking 3 05-11-2008 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration