Ad-Hoc Mode with WEP enryption ?

Manuel Sahm Manuel.Sahm at
Mon Aug 10 08:39:52 EDT 2009

Hello I tried the following code to get an encrypted Ad-Hoc Connection to my PC.
Without WEP Enryption all works fine, but if I swtich encryption on, no encryption is mentioned on my host PC (Windows XP)
This is what I do: - Any idea what could be wrong ?
Thanks very very much
//Delete/Remove network interface
wpa_cli -g /var/run/wpa_supplicant-global interface_remove wlan0
// (Re)Add a new interface (wlan0, no configuration file, driver=wext, and enable control interface)
wpa_cli -iwlan -g /var/run/wpa_supplicant-global interface_add wlan0 "" wext /var/run/wpa_supplicant
// Ad-Hoc Mode
wpa_cli ap_scan 2
//Configure a network...
wpa_cli -iwlan0 add_network
// 64-bit WEP-Key
wpa_cli -iwlan0 set_network 0 wep_key0 ABCDEFABCDEFABCD
wpa_cli -iwlan0 set_network 0 wep_tx_keyidx 0
wpa_cli -iwlan0 set_network 0 key_mgmt NONE
// Set SSID
wpa_cli -iwlan0 set_network 0 ssid '"linksys"' 
// set the Ad-Hoc network mode
wpa_cli -iwlan0 set_network 0 mode 1
// set the channel
wpa_cli -iwlan0 set_network 0 frequency 2412
//Enable Configured WLAN Network
"wpa_cli -iwlan0 enable_network 0

More information about the HostAP mailing list