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

Wi-Fi Direct not advertising. #314

Closed
visbs opened this issue Apr 5, 2019 · 42 comments
Closed

Wi-Fi Direct not advertising. #314

visbs opened this issue Apr 5, 2019 · 42 comments

Comments

@visbs
Copy link

visbs commented Apr 5, 2019

Hi,

I am using RTL8812AU based chipset USB Wi-Fi Adapter (Like ASUS AC56 , Linksys WUSB6300) in ubuntu (tried in different OS and Kernel version).
And I am trying to make use of WI-Fi Direct using wpa_supplicant (P2P Enabled) with user app wpa_cli.
In case of Intel Wireless Driver, whenever I do P2P_FIND or any scan command, from wpa_cli, my device is visible in any Wi-Fi Direct supported devices like Android, Windows etc.
But in case of Realtek driver (rtl8812au), my device is not visible or listed in Wi-Fi Direct device list, whereas I can get the nearby peers available in my device. As well I am able to connect to any SSID available.
So, am I missing something additional setup required for driver to make my device visible to other peer?
Any help would be very helpful?

Thank you,

@Hurricos
Copy link

Hurricos commented Apr 7, 2019

I have observed this as well - for example, from the v5.3.4 branch, Miraclecast can see other P2P-capable devices, but is not actually visible or correctly working for other WiFi-Direct capable devices, using an rtl8811au chipset (with no modifications to the modprobe.d/88XXau.conf). For comparison, an rtl8192cu based device worked fine under the same conditions.

Looks like My guess is that it's something that might not get fixed due to the focus on stuff that's more important to the aircrack team, like monitor / injection mode -- and understandably so.

So the driver advertises support for, but does not actually successfully implement

@kimocoder
Copy link
Collaborator

We want everything working! Let's get to work.. start finding the code and diff them and we'll ser. I'll look into it

@Hurricos
Copy link

Hurricos commented Apr 7, 2019

@kimocoder did you ever test Wi-Fi Direct? I could git bisect if you knew a version it worked on, but I'm yet to find one that it works on.

@kimocoder
Copy link
Collaborator

No, i never did

@visbs
Copy link
Author

visbs commented Apr 8, 2019

@kimocoder @Hurricos is there any way to solve this issue !!

@Hurricos
Copy link

Hurricos commented Apr 8, 2019

Not as far as I've seen, unfortunately.

@Hurricos
Copy link

Hurricos commented Apr 8, 2019

@visbs I have poked through pretty much every version with no luck. You could try messing with the modprobe options (check out os_dep/linux/os_intfs.c).

@visbs
Copy link
Author

visbs commented Apr 8, 2019

@Hurricos actually I am writing the user application mostly using wpa_supplicant for P2P (WiFi -direct),
so got minimal ideas in rtl8812 driver architecture. I am hoping this would be solved by some experts in this category.
Or is there any way I can connect and rise this issues directly to RTL chipset and driver manufacturer? Once I get the response, I shall post the real path of solution here.
Thank you,

@Hurricos
Copy link

Hurricos commented Apr 8, 2019

If you want better debugging tools, use this repository with a rtl8812au-based chipset, alongside horst.

The driver manufacturers are far, far behind the diffs here. If you check out v5.2.20, under documents, you will find a lot of the release docs that the manufacturers have provided which give you specific instructions for how to get the chipsets to work with their drivers ... but good luck escalating it to them.

@visbs
Copy link
Author

visbs commented Apr 8, 2019

@Hurricos Thank you, I will be trying something from my side too.
@kimocoder Hoping to get some commits with solution soon.

@visbs
Copy link
Author

visbs commented Apr 9, 2019

@Hurricos @kimocoder i found the same issue being resolved for 8723bs,
LINK: TinkerBoard/debian_kernel#16.
Can we relate something with this?
The issue is related to driver not including probe response.

@kimocoder
Copy link
Collaborator

kimocoder commented Apr 9, 2019

In the code it actuallly says.. "FIXME"

IMG_20190409_111439

@kimocoder
Copy link
Collaborator

@visbs i just implemented the workaround, could you "git pull" and building/installasjon and reload driver and test?

@kimocoder
Copy link
Collaborator

Good documentation over here

@visbs
Copy link
Author

visbs commented Apr 9, 2019

@kimocoder I tried the workaround, it is still not helping. Did it work for you?

@kimocoder
Copy link
Collaborator

Haven't tried, dont really care about P2P, but with some experience i know and have seen lots of issues om P2P and CONCURRENT mode on Realtek drivers.. dont really have time to investigate that issue right away

@Hurricos
Copy link

Hurricos commented Apr 9, 2019

@kimocoder Don't worry, this still feels like plenty of support :)

i've got some C under my belt, so I will pull down and poke around for most of tomorrow.

Oof, never mind, I'm just a jerk :(

@visbs
Copy link
Author

visbs commented Apr 9, 2019

I was debugging the code using logs, then i observed some of things going on,

Here, I am never getting OnProbeReq called.
But when I created a group using the command p2p_group_add using wpa_cli(i.e control interface of wpa_supplicant) then the send_beacon() from start_bss_network, alongside OnProbeReq is called and the device is visible across all android devices in the wifi-direct list.

May be while sending P2P_FIND command none of the functions are getting triggered that will send beacon frame. Can you please check it.

Thanks,

@Hurricos
Copy link

Hurricos commented Apr 9, 2019

@visbs If you've gotten the device visible to Android devices, fantastic - it oughta be a logic error somewhere which canbe fixed. I will be able to sit down and look in about 4 hours

@visbs
Copy link
Author

visbs commented Apr 10, 2019

@Hurricos any update ?

@visbs
Copy link
Author

visbs commented Apr 12, 2019

@Hurricos can u see rtw_p2p.c there are some todo on p2p.
thank u

@Hurricos
Copy link

Hi, sorry for the delay. Could you bring up the p2p interface with wpa_cli and show me your interaction on the CLI? I ask because I'm not well versed in p2p association and could use some leads.

@visbs
Copy link
Author

visbs commented Apr 16, 2019

http://processors.wiki.ti.com/index.php/WiFi_Direct_Configuration_Scripts
The above link has all the details regarding how wpa_cli commands can be used with respect to WiFi-direct.

@Hurricos
Copy link

Thank you, I will take a look at this when I get a chance.

@Fateofiko
Copy link

Hi everyone!
I think my issue is connected to this one.
I am trying to configure my wifi card (it uses rtl8812au chipset) with wpa_supplicant, just to connect to my home access point! I try to install the original drivers for rtl8812au chipset and i connect with no problem, but with this driver aircrack-ng/rtl8812au just can't connect, of course i tried this in manage mode!
Is somebody tried to make connection to some access point?
I just configure the /etc/wpa_supplicant/wpa_supplicant.conf file, and i know that the configuration is working, because all my wifi dongles, that do not use the rtl8812au driver, are successfully connected!

@Hurricos
Copy link

Hi everyone!
I think my issue is connected to this one.
I am trying to configure my wifi card (it uses rtl8812au chipset) with wpa_supplicant, just to connect to my home access point! I try to install the original drivers for rtl8812au chipset and i connect with no problem, but with this driver aircrack-ng/rtl8812au just can't connect, of course i tried this in manage mode!
Is somebody tried to make connection to some access point?
I just configure the /etc/wpa_supplicant/wpa_supplicant.conf file, and i know that the configuration is working, because all my wifi dongles, that do not use the rtl8812au driver, are successfully connected!

Try using wicd-curses.

If you're on a headless machine and that's not an option, please dump the logs from your network management process (journalctl -e wpa_supplicant).

Association with an access point was never a problem; this issue is for P2P, not managed, mode.

@Hurricos
Copy link

original drivers for rtl8812au

Which driver did you try?

@Fateofiko
Copy link

This is the driver that works for me:
https://github.com/gnab/rtl8812au
Amm i am not sure that it is "original" one!!!

I am not sure how to get the log from the wpa_supplicant:
pi@raspberrypi:~ $ journalctl -e wpa_supplicant
Failed to add match 'wpa_supplicant': Invalid argument

Sorry may be, i have to open another issue, not to spam this one?

@Hurricos
Copy link

This is the driver that works for me:
https://github.com/gnab/rtl8812au
Amm i am not sure that it is "original" one!!!

I am not sure how to get the log from the wpa_supplicant:
pi@raspberrypi:~ $ journalctl -e wpa_supplicant
Failed to add match 'wpa_supplicant': Invalid argument

Sorry may be, i have to open another issue, not to spam this one?

It would be better to open another issue, but it certainly seems like a end-user usage problem.

@Fateofiko
Copy link

Fateofiko commented Apr 19, 2019

_>
Try using wicd-curses.

If you're on a headless machine and that's not an option,

_

Yes i use headless raspberry pi 3 model B, may be i should try wicd-curses, and then to ask for help!
So, if association with an access point was never a problem, of course may be i am doing something wrong!
Thanks, i will try wicd-curses!!!

@visbs
Copy link
Author

visbs commented Apr 22, 2019

@Fateofiko I did try that driver which u specified, which is of no help.

@Fateofiko
Copy link

@visbs This driver works for me, but i am using it for simple connection to my home access point, but you need direct connection, and i am not sure this driver can be useful for that.
I also used this tutorial to build and install the driver:
https://layereight.de/raspberry-pi/2016/08/25/raspbian-rtl8812au.html
Hope, that this will help you :)!

@visbs
Copy link
Author

visbs commented Apr 23, 2019

@kimocoder just remove the "/" in makefile for uninstall
from

uninstall:
	rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
/sbin/depmod -a ${KVER}

to

uninstall:
	rm -f $(MODDESTDIR)$(MODULE_NAME).ko
/sbin/depmod -a ${KVER}

PS:This has nothing to deal with this issue .

@kimocoder
Copy link
Collaborator

You can do it, so you get the credits too. Thanka

@visbs
Copy link
Author

visbs commented Apr 24, 2019

@kimocoder is this issue solvable !?

@visbs
Copy link
Author

visbs commented May 13, 2019

Any progress on this?

@kimocoder
Copy link
Collaborator

@visbs Yes, you should use the newest branch, v5.6.4.
Everything you will need is supplied in the package 🥇

Check it out and report back! Thanks

@kimocoder
Copy link
Collaborator

@visbs

Hello there people.. in the new branch v5.6.4.1 the WiFi direct is working 🥇
That did take some time, but well well..

IMG_20190817_200121

@kimocoder
Copy link
Collaborator

Issue resolved 🥇

@visbs
Copy link
Author

visbs commented Aug 21, 2019

5.6.4.1 I'm not able to build says error: implicit declaration of function ‘rtw_get_wait_hiq_empty_ms’; did you mean ‘rtw_get_time_interval_ms’? [-Werror=implicit-function-declaration]!!

@visbs
Copy link
Author

visbs commented Aug 23, 2019

Okay the driver is now compiling, but pls do look into the concurrent_mode which is not compiling.
Thanks

@Azq2
Copy link

Azq2 commented Nov 27, 2022

Possible fix for similar driver: jwrdegoede/rtl8189ES_linux#87

But you need backport this changes to this driver

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