Difference between revisions of "Talk:WPA supplicant"

From ArchWiki
Jump to: navigation, search
m (Error while trying to associate with network: closing)
Line 1: Line 1:
  
== Error while trying to associate with network ==
+
== <s>Error while trying to associate with network</s> ==
  
 
I am trying to associate wpa_supplicant using following command:
 
I am trying to associate wpa_supplicant using following command:
Line 38: Line 38:
 
:::By any chance, have you used [[sudo]] for elevating privileges? For testing, {{ic|cat <(wpa_passphrase MYSSID passphrase)}} prints the expected output, whereas {{ic|sudo cat <(wpa_passphrase MYSSID passphrase)}} results in the error you described. See the note in [[Help:Reading#Regular_user_or_root]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:03, 28 September 2014 (UTC)
 
:::By any chance, have you used [[sudo]] for elevating privileges? For testing, {{ic|cat <(wpa_passphrase MYSSID passphrase)}} prints the expected output, whereas {{ic|sudo cat <(wpa_passphrase MYSSID passphrase)}} results in the error you described. See the note in [[Help:Reading#Regular_user_or_root]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:03, 28 September 2014 (UTC)
 
::::Thanks! My mistake. I was running the command with sudo instead of root shell (which is apparently important in case of redirections). Now everything is working.--[[User:Rimas|Rimas]] ([[User talk:Rimas|talk]]) 20:46, 29 September 2014 (UTC)
 
::::Thanks! My mistake. I was running the command with sudo instead of root shell (which is apparently important in case of redirections). Now everything is working.--[[User:Rimas|Rimas]] ([[User talk:Rimas|talk]]) 20:46, 29 September 2014 (UTC)
 
[SOLVED] :)
 

Revision as of 05:36, 30 September 2014

Error while trying to associate with network

I am trying to associate wpa_supplicant using following command:

# wpa_supplicant -B -i interface -c <(wpa_passphrase MYSSID passphrase)

but it produces error. It seems like configuration info fails to generate properly. For example,

$ echo <(wpa_passphrase MYSSID passphrase)

generates following output: /dev/fd/63

However,

$ (wpa_passphrase MYSSID passphrase)

gives

network={

ssid="MYSSID"

#psk="passphrase"

psk=59e0d07fa4c7741797a4e394f38a5c321e3bed51d54ad5fcbd3f84bc7415d73d

}

which is expected output.

So, how is it possiblee to feed wpa_passphrase output to wpa_supplicant correctly? --Rimas (talk) 09:28, 27 September 2014 (UTC)

You're not telling us the most important thing, i.e. what error wpa_supplicant -B -i interface -c <(wpa_passphrase MYSSID passphrase) produces... Is wpa_passphrase MYSSID passphrase alone printing a correct configuration with your ssid and passphrase? Are you using the correct interface name? If you save the output of wpa_passphrase to a file, and then use that file name for the -c flag of wpa_supplicant, does it work? The <() syntax is process substitution and in theory it should work like that, it's normal that echoing it returns a file name. -- Kynikos (talk) 10:36, 27 September 2014 (UTC)
wpa_passphrase prints correct information with my ssid and passwd, so I was able to associate wpa_supplicant by creating a configuration file (thanks for this hint!). However, when I try to use process substitution syntax (exactly as it is written in article), I'm getting following output:

Successfuly initialized wpa_supplicant

Failed to open config file '/dev/fd/63', error: No such file or directory

Failed to read or parse configuration '/dev/fd/63'
--Rimas (talk) 15:45, 28 September 2014 (UTC)
By any chance, have you used sudo for elevating privileges? For testing, cat <(wpa_passphrase MYSSID passphrase) prints the expected output, whereas sudo cat <(wpa_passphrase MYSSID passphrase) results in the error you described. See the note in Help:Reading#Regular_user_or_root. -- Lahwaacz (talk) 16:03, 28 September 2014 (UTC)
Thanks! My mistake. I was running the command with sudo instead of root shell (which is apparently important in case of redirections). Now everything is working.--Rimas (talk) 20:46, 29 September 2014 (UTC)