Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iw commands cannot "see" my rtl8192du device #17

Open
ratcheer opened this issue Apr 17, 2014 · 49 comments
Open

iw commands cannot "see" my rtl8192du device #17

ratcheer opened this issue Apr 17, 2014 · 49 comments

Comments

@ratcheer
Copy link

I installed the driver and firmware, last night. For the first time, I got a working 802.11n connection, although my speeds are still no better than the "g" connection I had with another device. So, thank you very much for these modules.

The problem is that, even though the connection is working very well, the iw management commands do not see it, at all. "iw dev" returns nothing. "iw dev wlan1 link" returns "Not connected." "iw wlan1 connect " returns "command failed: No such device (-19)".

The ip commands work as intended, e.g., "ip addr show" returns "3: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000", etc. Also, when I was using a Ralink onboard PCI wireless adapter, the iw commands worked perfectly well.

My OS is Siduction Linux, my kernel is 3.14.1, and my wireless adapter is a Belkin F9L1108-TG.

@lwfinger
Copy link
Owner

Did you generate the driver with CFG80211 specified?

I have not yet gotten to the point of debugging the CFG80211 interface, and the commands may very well be failing. I will gladly review any patches you generate.

@ratcheer
Copy link
Author

Thank you for your response. I am afraid I do not understand how to specify CFG80211. I ran make, then make install. I have tried to find documentation on how I would specify CFG80211 to the process, but without success. Would you tell me?

At times, but not always, I have seen cfg80211 messages in dmesg since installing this driver. They had to do with the regulatory domain and frequencies of operation. So, possibly the CFG80211 is included in my generated driver, but I am unsure.

Thank you.

@lwfinger
Copy link
Owner

Check the define statements in include/autoconf.h to see what is enabled.

@ratcheer
Copy link
Author

They are commented out. I will uncomment them and rebuild. Thank you very much. Sorry I am such a newbie. :)

@ratcheer
Copy link
Author

Ouch. Now, make ends with errors. I must have done the wrong thing.

/home/tim/Realtek/rtl8192du/rtl8192du/include/autoconf.h:26:1: error: unknown type name ‘ifdef’
ifdef CONFIG_IOCTL_CFG80211
^
/home/tim/Realtek/rtl8192du/rtl8192du/include/autoconf.h:27:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘define’
define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
^
/home/tim/Realtek/rtl8192du/rtl8192du/include/autoconf.h:27:2: error: unknown type name ‘define’
In file included from /home/tim/Realtek/rtl8192du/rtl8192du/include/basic_types.h:25:0,
from /home/tim/Realtek/rtl8192du/rtl8192du/include/osdep_service.h:20,
from /home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_cmd.c:19:
include/linux/types.h:98:1: error: unknown type name ‘__s8’
typedef __s8 int8_t;
^

@lwfinger
Copy link
Owner

Yes, that "define" needs to have "#" in front of it; however, even if you make that change it still will not build. I'm busy today and will not have a chance to find out what is wrong. Unless you want to debug the problems, you should not use iw.

@ratcheer
Copy link
Author

Ok. I am not asking you to look at this, now, just showing you my current results.

I believe I have uncommented the proper line: #define CONFIG_IOCTL_CFG80211 1

Now, make fails. Several modules are compiled successfully, then:

/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c: In function ‘rtw_p2p_check_frames’:
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:3424:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
void rtw_init_cfg80211_wifidirect_info(struct rtw_adapter padapter)
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:3680:13: error: invalid storage class for function ‘reset_ch_sitesurvey_timer_process’
static void reset_ch_sitesurvey_timer_process(void *FunctionContext)
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:3694:13: error: invalid storage class for function ‘reset_ch_sitesurvey_timer_process2’
static void reset_ch_sitesurvey_timer_process2(void *FunctionContext)
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:3708:13: error: invalid storage class for function ‘restore_p2p_state_timer_process’
static void restore_p2p_state_timer_process(void *FunctionContext)
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:3719:13: error: invalid storage class for function ‘pre_tx_scan_timer_process’
static void pre_tx_scan_timer_process(void *FunctionContext)
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:3757:13: error: invalid storage class for function ‘find_phase_timer_process’
static void find_phase_timer_process(void *FunctionContext)
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:4124:1: error: expected declaration or statement at end of input
}
^
/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.c:4124:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[2]: *
* [/home/tim/Realtek/rtl8192du/rtl8192du/core/rtw_p2p.o] Error 1
make[1]: *** [module/home/tim/Realtek/rtl8192du/rtl8192du] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.14-1.towo-siduction-amd64'
make: *** [modules] Error 2

@ratcheer
Copy link
Author

Ok, I made big progress since my last post. I saw that there are multiple branches of the repository and downloaded the one labeled kernel, which has the most recent changes. The good news is that it compiled everything successfully and, after a reboot, the r8192du module was associated with cfg80211. I could run the iw commands, successfully.

However, I could no longer connect to my router. When I scanned for it, it only replied that the network is down. I tried several methods of connecting, but nothing could scan and find the SSID of the router. To connect, I had to reinstall the Master branch that does not work with cfg80211. I am back on the network, but still without iw capabilities.

Thank you for any help you can give me, when you get time to look at it.

@Yagoth
Copy link

Yagoth commented Aug 12, 2014

I have the same issue as ratcheer. I look forward to any ideas.

@ratcheer
Can you tell me exactly how to replicate your steps?

What does "modprobe 8192du" give you now?

Have you tried the realtech drivers located below?
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=53&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#3102

@thongxuan
Copy link

Someone is trying to uncomment the "C directive". Unbelievable! :rolf:

@sansar12
Copy link

sansar12 commented Aug 4, 2018

i am having same problem i donot know what is firmware i cannect to wifi but my wifi adapter is not shown in iw list and iw dev return nothing. I have realtek rtl8191s. PLEASe HELP

@lwfinger
Copy link
Owner

lwfinger commented Aug 4, 2018

Does that driver support nl80211/cfg80211? If not, you must use iwconfig.

Saying you have rtl8192s is not sufficient. Is it an rtl8192su or rtl8192se?

@sansar12
Copy link

sansar12 commented Aug 8, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 8, 2018 via email

@lwfinger
Copy link
Owner

lwfinger commented Aug 8, 2018

This type of low-level tutoring is best done by the forum for your Linux distribution. To clone this source repository,

git clone git://github.com/lwfinger/rtl8192du.git

To build the driver,

cd rtl8192du
make
sudo make install

For the "make step" to work, you must have the kernel headers installed and configured. If you do not know what that means, google "Linux build external drivers".

Unlike Windows, every driver must be built for a given kernel and version of gcc. There is no way I could provide a pre-compiled version that would load and run on your computer.

You obviously need to do some additional research.

@sansar12
Copy link

sansar12 commented Aug 10, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 10, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 11, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 11, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 11, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 11, 2018 via email

@lwfinger
Copy link
Owner

Note that the headers must match EXACTLY the kernel you are running. I would first do an update to make sure you have the latest kernel version, and then reboot. Once the system comes back, then sudo apt-get install headers-$(uname -r)
That should do what you want, but be aware that I do not use Kali. That command seems reasonable to me, but you may need additional steps. You will know that it is correct when the command
ls /lib/modules/$(uname -r)/build/include
gives you a list of directories.

@sansar12
Copy link

sansar12 commented Aug 13, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 13, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 13, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 13, 2018 via email

@lwfinger
Copy link
Owner

The "ls" command does not work because your kernel headers are not set up correctly. Until you fix that problem, the builds will fail exactly as you first reported.

The missing regulatory.db indicates a different problem. The only thing in common is that it is a further indication that your system is incomplete.

Either switch to a distro that works, or consult your distro's forums to find out how to build out-of-kernel modules. I cannot help you.

@sansar12
Copy link

sansar12 commented Aug 14, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 14, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 14, 2018 via email

@lwfinger
Copy link
Owner

If you use my distro, I would not have to give you pre-compiled headers. You only need to install one additional package beyond the usual compiler and make packages.

Go to https://software.opensuse.org/ and choose the Leap option. For installation only, you can either choose the DVD image (3.6 GB), or the Network image (120 MB). Using dd, burn the downloaded .iso to a USB stick, and boot it. The network image downloads the packages when they are installed.

If you want to try openSUSE before installing, select the Live image. To be most like Kali, choose the Gnome desktop. Again that .iso should be burned to a USB stick. From the running live system, you can install.

Once the OS is installed, you can get the necessary packages to build with the commands

sudo zypper install git gcc kernel-devel

Note: zypper is like "apt", and kernel-devel contains the kernel headers. At this point, you need to do a "git clone" the way you did before, change to the directory with the source, "make" and sudo "make install".

@sansar12
Copy link

sansar12 commented Aug 15, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 15, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 15, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 15, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 15, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 15, 2018 via email

@lwfinger
Copy link
Owner

You need to "cd" to the actual directory where the rtl8192du source is downloaded. Just as with any other distro, you need to "git clone" the actual source. It is not part of any distro!!!!

If you want to do anything other than connect to an AP, you are going to need to learn a lot.

@sansar12
Copy link

sansar12 commented Aug 16, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 16, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 16, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 16, 2018 via email

@lwfinger
Copy link
Owner

lwfinger commented Aug 16, 2018

I think you also need kernel-default-devel. Of courser you need to "sudo zypper inslall" that package.

@sansar12
Copy link

sansar12 commented Aug 17, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 17, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 17, 2018 via email

@sansar12
Copy link

sansar12 commented Aug 17, 2018 via email

@lwfinger
Copy link
Owner

I have no idea what you are doing, or not doing.

I used the openSUSE Leap 15 DVD to create a new virtual machine instance. After the initial reboot, I used the commands:
sudo zypper update
sudo reboot

After it rebooted, I did
sudo zypper install gcc make git kernel-devel kernel-default-devel
git clone git://github.com/lwfinger/rtl8192du.git
cd rtl8192du
make

The driver compiled with no errors.

@sansar12
Copy link

sansar12 commented Aug 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants