You are not logged in.
Pages: 1
Topic closed
I'm in the process of installing arch linux anew, and what follows is executed in the shell provided when booting the device from an USB installation medium.
I can connect using the manual method to an unprotected network without many problems, however something goes wrong when trying to use `wpa_supplicant` to connect to a protected network.
I'm in particular following the wiki section on using `wpa_cli`. The interface is up as shown by `ip link`, and I can scan the available networks via `iw dev wlp6s0 scan` without problems.
I therefore created the wpa_supplicant configuration file as instructed in the wiki and started wpa_supplicant. This process was seemingly successful and I can verify that `wpa_supplicant` is running in the background with `ps aux | grep wpa`.
I now run `wpa_cli`, which starts with no error. The problem is that if now I run `scan` as instructed in the wiki, nothing happens. The only answer I receive is `OK`, and then nothing. Issuing `scan_results` consistently gives an empty list of results.
I'm quite sure that the first time I tried this, the scan actually worked, and I then proceeded with `add_network` and `set_network` as per the wiki. However other things went wrong so that I ended up rebooting and start anew from the USB, and now the scan doesn't give anything.
What can be causing of this?
Last edited by gzyy132 (2018-02-26 16:59:58)
Offline
Ok, I've figured it out. I'll leave the post in case it may help some googler having a similar problem in the future.
I noticed that when I started wpa_cli it said: Selected interface 'p2p-dev-wlp6s0', which didn't look correct, given that my actual interface was wlp6s0.
I googled it and found this github issue, where someone was having a similar problem.
The solution that worked for him, and for me, was to manually specify the correct interface with wpa_cli -i wlp6s0. With this, wpa_cli starts with the correct interface, scanning gives the expected result, and I could continue with the steps outlined in the relevant wiki page.
Problem solved. However, I wonder if it would be helpful to specify this point in the wiki? I realize it already says that one can use the -i switch to specify the interface, but I believe stating directly that the command to use is wpa_cli -i interface, with the -i being optional, would overall save time to many stumbling into this.
Last edited by gzyy132 (2018-02-26 17:18:01)
Offline
The solution that worked for him, and for me, was to manually specify the correct interface with wpa_cli -i wlp6s0
I was having the same issue and this worked for me too. Thanks for sharing!
Offline
That shouldn't be needed if the interface was properly specified as a parameter when wpa_supplicant was started.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
As per man page, wpa_cli choose first interface found with the control socket in socket path.
-i ifname
Specify the interface that is being configured. By default, choose the first interface found with a control socket in
the socket path.
So it chooses first socket from /run/wpa_supplicant (as most users use that it in ctrl_interface in wpa_supplicant.conf)
In my case I start wpa_supplicant with -i wlan0, but still I have to specify interface for wpa_cli, otherwise it chooses p2p-dev-wlan0
Arch is home!
https://github.com/Docbroke
Offline
That shouldn't be needed if the interface was properly specified as a parameter when wpa_supplicant was started.
I specified the correct interface when I started wpa_supplicant, however, when I started wpa_cli it used the wrong interface starting with 'p2p-dev'.
The image (URL) confirms this and came from my real recent installation.
Offline
@gzyy132 you saved my time. Thank you. To properly run wpa_cli it should be started with -i option. I'll try to amend the wiki.
UPDATE: there is a tip in the page with regards to this issue ("It is possible to specify the interface to be configured with the -i option; otherwise, the first found wireless interface managed by wpa_supplicant will be used."), so I am not going to modify the wiki. It is correct already. I was inattentive.
Last edited by sergei_mipt (2019-11-09 19:07:29)
Offline
Please don't necrobump, sergei_mipt.
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed