Results 1 to 9 of 9
Hi i'm using dlink g510 pci wireless card. I've downloaded the latest Madwifi-ng snapshot and also installed wpa_supplicant.
When i set both my laptop and desktop to adhoc mode without ...
- 05-17-2006 #1Just Joined!
- Join Date
- May 2006
- Location
- Australia / Brisbane
- Posts
- 6
Problem setting up WEP / WPA in adhoc mode.(SOLVED)
Hi i'm using dlink g510 pci wireless card. I've downloaded the latest Madwifi-ng snapshot and also installed wpa_supplicant.
When i set both my laptop and desktop to adhoc mode without security, it works fine and is able to ping. But the problem arise when i start to enable WEP, it seems that it is not able to connect at all.
ps: I've set static IP for both the interface cards.
Also is it possible for wpa_supplicant WPA/WPA2 to work in ad hoc mode? Cause i've googled around and read post which claims that WPA /WPA2 is not possible to work in the ad hoc mode.
Thanks in advance.
- 05-17-2006 #2
According to this:
http://madwifi.org/wiki/UserDocs/AdHocInterface
and this:
http://madwifi.org/wiki/UserDocs/AdHoc
it should work.
You could try to ask on the #madwifi channel on irc.freenode.net"To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."
-Bruce Lee
- 05-17-2006 #3Just Joined!
- Join Date
- May 2006
- Location
- Australia / Brisbane
- Posts
- 6
Yep i've tried those methods before but it doesn't work for me

Thanks for the quick reply thou.
Cheers
- 05-27-2006 #4Just Joined!
- Join Date
- May 2006
- Location
- Australia / Brisbane
- Posts
- 6
Managed to solve this by doing this
# echo "options ath_pci autocreate=adhoc" > /etc/modprobe.d/madwifi
# echo "ath_pci autocreate=adhoc" >> /etc/modules
add the following in /etc/network/interface
iface ath0 inet static
address 10.1.1.200
network 10.1.1.0
netmask 255.255.255.0
broadcast 10.1.1.255
pre-up /sbin/iwconfig ath0 essid testwep rate 54M key s:testb restricted
auto ath0
Finally do a reboot and everything works fine.
- 05-27-2006 #5Just Joined!
- Join Date
- May 2006
- Location
- Australia / Brisbane
- Posts
- 6
WEP in adhoc mode works for me but another problem arise. WPA in adhoc mode refuses to work.
I've downloaded the latest wpa_supplicant0.4.9
edit the .config with this
CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/usr/src/madwifi-ng
CONFIG_CTRL_IFACE=y
/etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="testwpa"
#psk="superduperwpa"
psk=edda86468aa67c3f71c0bbaf7828aedccd320f9011d63e 699f5381a5b77e0c2a
}
and ran wpa_supplicant
wpa_supplicant -Bw -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf
But it can't seems to be able to connect with the pc which i set to adhoc mode.
Any one of you knows how to solve this problem?
Thanks.
- 05-27-2006 #6Just Joined!
- Join Date
- May 2006
- Location
- Australia / Brisbane
- Posts
- 6
Wheee managed to get it working under WPA adhoc mode
steps:
1. edit the .config with this
CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/usr/src/madwifi-ng
CONFIG_CTRL_IFACE=y
2.ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
fast_reauth=1
# IBSS/ad-hoc network with WPA-None/TKIP.
network={
ssid="testwpa"
mode=1
proto=WPA
key_mgmt=WPA-NONE
pairwise=NONE
group=TKIP
psk="superduperwpa"
}
and finally run wpa_supplicant -Bw -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf
Initially i could not ping either machines, but after i ifconfig ath0 down and ifconfig ath0 up on both machines, it worked like a breeze.
Great ! now to start trying adhoc with wpa2
- 05-27-2006 #7Just Joined!
- Join Date
- May 2006
- Location
- Australia / Brisbane
- Posts
- 6
It seems i've encountered a problem.
i edit /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
fast_reauth=1
# IBSS/ad-hoc network with WPA-None/TKIP.
network={
ssid="testwpa"
mode=1
proto=WPA
key_mgmt=WPA-NONE
pairwise=NONE
group=CCMP
psk="superduperwpa"
}
when i ran wpa_supplicant -Bw -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf -d
It gave me this error
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ap_scan=2
fast_reauth=1
Line 21: removed CCMP from group cipher list since it was not allowed for pairwise cipher
Priority group 0
id=0 ssid='testwpa'
Initializing interface (2) 'ath0'
ioctl[SIOCSIWMODE]: Invalid argument
Could not configure driver to use managed mode
SIOCGIWRANGE: too old (short) data - assuming WPA is not supported
Own MAC address: 00:13:46:93:8a:e5
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Added interface ath0
Ignore event for foreign ifindex 3
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'testwpa'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 0 pairwise 1 key_mgmt 16
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: Failed to select group cipher.
WPA: Failed to set WPA key management and encryption suites (no scan results)
Wireless event: cmd=0x8b19 len=12
Received 206 bytes of scan results (1 BSSes)
Scan results: 1
RX ctrl_iface - hexdump_ascii(len=6):
41 54 54 41 43 48 ATTACH
CTRL_IFACE monitor attached - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 39 31 30 31 2d 30 00
RX ctrl_iface - hexdump_ascii(len=4):
50 49 4e 47 PING
RX ctrl_iface - hexdump_ascii(len=6):
53 54 41 54 55 53 STATUS
RX ctrl_iface - hexdump_ascii(len=4):
50 49 4e 47 PING
RX ctrl_iface - hexdump_ascii(len=4):
Could anyone help me with this? Why is CCMP not allowed for pairwise cipher?
Thanks.
- 02-21-2007 #8Just Joined!
- Join Date
- Sep 2006
- Posts
- 1
After spending 8 hours trying to get WPA adhoc on Gentoo Linux (NAT box) working, I'll have to take a break.
WEP was successful, but what I really want is a WPA connection from a MacOSX machine.
After starting the interface up with the above configurations (group=TKIP), I still get a warning:
In the /etc/conf.d/net file I have the following line that should have avoided this:Code:ioctl[SIOCSIWMODE]: Invalid argument Could not configure driver to use managed mode
as indicated in the Gentoo docs. It appears to ignore ad-hoc mode and try to configure managed mode Using "iwconfig ath0", Ad-Hoc appears to be active.Code:iwconfig_ath0="mode ad-hoc"
On the MacOSX side I can detect the network, and a "WPA Enterprise" authentication dialogue appears with User Name and Password input. I can't login either with a blank user and configured passphrase, or with my unix user account.
Is this what was supposed to appear? If so, what user name are we talking about?
Thanks.
- 05-07-2008 #9Just Joined!
- Join Date
- May 2008
- Posts
- 1
Has anyone successfully been able to configure 3 linux PC's in adhoc mode with WPA/CCMP ?
I have similar problem. I have 3 linux PC's in adhoc mode, all using ratheros based cards that support WPA/WPA2 and TKIP/CCMP. wpa_supplicant.conf is configured very similar to 2 post below, however only two PC's can talk to each other. Third PC seems to join the cell correctly but cannot ping the other 2 PC's.
thnks


Reply With Quote
