'SET_NETWORK 0 psk "1234567890"' command timed out
Pujeri, Prabhakar
c_ppujer
Tue Dec 29 10:06:08 PST 2009
Not necessary to write wpa_supplicant configuration file you can send commands through control interface
Run supplicant like wpa_supplicant -iwlan0 -c /etc/config_file.conf -B
Where config file contains only two lines
Control_interface=/var/run/wpa_supplicant
Update_config=1
After this you can use wpa_cli commands to config your network and if you want to save that config in /etc/config_file.conf then use wpa_cli save_config
OPEN MODE
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 proto WPA
wpa_cli -iwlan0 set_network 0 key_mgmt NONE
wpa_cli -iwlan0 set_network 0 ssid '"linksys"'
wpa_cli -iwlan0 enable_network 0
----------------------------------------------------------------------------------------------------
WPA TKIP
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid '"linksys"'
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 psk '"1234567890"'
wpa_cli -iwlan0 set_network 0 pairwise TKIP
wpa_cli -iwlan0 set_network 0 group TKIP
wpa_cli -iwlan0 set_network 0 proto WPA
wpa_cli -iwlan0 enable_network 0
----------------------------------------------------------------------------------------------------
WPA AES
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid '"linksys"'
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 psk '"1234567890"'
wpa_cli -iwlan0 set_network 0 pairwise CCMP
wpa_cli -iwlan0 set_network 0 group CCMP
wpa_cli -iwlan0 set_network 0 proto WPA
wpa_cli -iwlan0 enable_network 0
----------------------------------------------------------------------------------------------------
WPA2 TKIP
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid '"linksys"'
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 psk '"1234567890"'
wpa_cli -iwlan0 set_network 0 pairwise TKIP
wpa_cli -iwlan0 set_network 0 group TKIP
wpa_cli -iwlan0 set_network 0 proto RSN
wpa_cli -iwlan0 enable_network 0
----------------------------------------------------------------------------------------------------
WPA2 AES
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid '"linksys"'
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 psk '"1234567890"'
wpa_cli -iwlan0 set_network 0 pairwise CCMP
wpa_cli -iwlan0 set_network 0 group CCMP
wpa_cli -iwlan0 set_network 0 proto RSN
wpa_cli -iwlan0 enable_network 0
----------------------------------------------------------------------------------------------------
WPA/WPA2 TKIP/AES
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid '"linksys"'
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 psk '"1234567890"'
wpa_cli -iwlan0 set_network 0 pairwise CCMP TKIP
wpa_cli -iwlan0 set_network 0 group CCMP TKIP
wpa_cli -iwlan0 set_network 0 proto WPA RSN
wpa_cli -iwlan0 enable_network 0
----------------------------------------------------------------------------------------------------
WEP
----------------------------------------------------------------------------------------------------
wpa_cli -iwlan0 remove_network 0
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid '"netgear_win"'
wpa_cli -iwlan0 set_network 0 key_mgmt NONE
wpa_cli -iwlan0 set_network 0 wep_key0 1234567890
wpa_cli -iwlan0 set_network 0 wep_tx_keyidx 0
wpa_cli -iwlan0 enable_network 0
-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of root
Sent: Monday, December 28, 2009 8:13 PM
To: hostap at lists.shmoo.com
Subject: 'SET_NETWORK 0 psk "1234567890"' command timed out
dear all:
last time i asked a question "what makes the such format of network
block of wpa_suppliant.conf"
and Jouni Malinen wrote:
> It looks like you have configured wpa_supplicant to update its
>configuration file (update_config=1) based on dynamic changes. If you
>select a particular network (e.g., with wpa_cli select_network command
>or wpa_gui), all the other networks will be disabled to force the
>specified network to be used. This will also affect the configuration
>file when update_config=1 is used.
i indeed used the update_config=1 in the configuration file, i need
the wpa_suppliant processes the configuration file by itself, and when
i got the reply form Jouni Malinen, i couldn't understand the means of
"select a particular network (e.g., with wpa_cli select_network command
>or wpa_gui)"until i found the reason(i thought:)) is:
when the wpa_gui to write the command
'SET_NETWORK 0 group TKIP CCMP WEP104 WEP40' command timed out.
'SET_NETWORK 0 psk "1234567890"' command timed out
and then when do the selection, the configuration file is wrong(write
the network block only have disabled=1)
i read the code of wpa_suppliant,i found the function
wpa_ctrl_request sent a command,and then to wait the reply, in my
thoughts,the SET_NETWORK commands is only to tell the wpa_suppliant to
write the configuration file, but why it can make time out? is it
associated with the driver? is it the timeout is made by the driver?
i want to know the association among the SET_NETWORK commands
and the wpa_suppliant and the driver? thank you?
or i must to write the wpa_suppliant configuration file by myself
to avoid the network block with only content of disabled =1?
thanks again
_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap
More information about the Hostap
mailing list