[SOLVED] wifi p2p connection with wpa_supplicant: how to read/set password
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
wifi p2p connection with wpa_supplicant: how to read/set password
Hello,
I created a p2p wifi connection between a pc with Ubuntu 20.04 and a pc with Win X without any internet connection using wpa_supplicant. The problem I have is that doing a new connection the password, generated by the command
Code:
wpa_cli -iwlan0 p2p_group_add
,changes and I'm not able to see it or export it.
The alternative could be to be able to set the password that will be used by the above command.
The standard way to set ssid and password for the network is not accepted as valid.
Is there someone that could suggest a way to do this?
Thanks
Claudio
As far as I know Windows does not have peer to peer wireless ad-hoc capability. Configure it for internet connection sharing and then on Ubuntu use the network manager applet to configure a wireless network with the ssid and password from the Windows 10 computer.
You are right if you want to create the hotspot with windows, but in my case the hotspot is created in the Linux pc. Windows is able to detect the ad-hoc wifi connections if you set the correct ip address of the connection.
I agree with you, NM should use wpa_supplicant in background without the need to specify any configuration for it, but what I'm seeing now is telling me something different.
Ad hoc connection made using network Manager between linux devices works fine.
But it seems that the ad-hoc connection created with Network Manager has not the requirements of a DIRECT-WIFi connection that windows is expecting.
I know that wpa_supplicant requires a specific command to setup a DIRECT-WIFI connection. Probaly this command is not used by NM
I found the solution.
Googling a lot I finally found a document from the developer showing all the available p2p commands for wpa_supplicant.
One of them
Code:
p2p_get_passphrase
provides the password created for a p2p GO connection
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.