Ad-Hoc/IBSS + WPA??

Roland Koebler rk-list
Mon Aug 15 08:03:23 PDT 2011


Hi,

I would like to set up an encrypted WLAN Ad-hoc network. Unfortunately,
it did not work as described in the wpa_supplicant documentation, and
even reading lots of webpages did not help. :(
Until now, I was only able to set up a working unencrypted Ad-hoc network,
and a non-working WEP-encrypted one.

So:
- Has anyone here successfully set up an encrypted WLAN Ad-hoc network?
  If yes: Can you tell me how?
- Which encryption can be used? WEP, WPA or even WPA2?

Can you give me any hints?


Details:
I'm using Debian Squeeze, with kernel 2.6.32 and wpa_supplicant 0.6.10,
and 2 computers with RaLink or Intel WLAN-chipset and the same configuration
(except that they have different IP-adresses ;)).

What I've done so far:

1. unencrypted Ad-hoc network between 2 computers: works.
   $ iwconfig wlan0 mode ad-hoc
   $ iwconfig wlan0 essid TEST0
   $ iwconfig wlan0 channel 1
   $ ifconfig wlan0 192.168.2.50 up

   After doing the same on the other computer with a different IP,
   ping works between these computers. Everything ok here.

2. WEP encryption: starts, but no ping.

   wpa_supplicant.conf:
        ap_scan=2
        network={
            ssid="test01"
            mode=1
            frequency=2412
            key_mgmt=NONE
            wep_key0="abcdexy"
            wep_tx_keyidx=0
        }

    $ wpa_supplicant -c wpa_supplicant.conf -i wlan0
    ioctl[SIOCSIWPMKSA]: Invalid argument
    Trying to associate with SSID 'test01'
    ioctl[SIOCSIWENCODEEXT]: Invalid argument
    ioctl[SIOCSIWGENIE]: Operation not supported
    Association request to the driver failed
    l2_packet_receive - recvfrom: Network is down
    Associated with 2a:e0:e7:e6:ab:d7
    CTRL-EVENT-CONNECTED - Connection to 2a:e0:e7:e6:ab:d7 completed (auth) [id=0 id_str=]

    $ iwconfig
    wlan0     IEEE 802.11bgn  ESSID:"test01"
              Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 2A:E0:E7:E6:AB:D7
              Tx-Power=15 dBm
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:off
    $ iwlist scan
    wlan0     Scan completed :
              Cell 01 - Address: 2A:E0:E7:E6:AB:D7
                        Channel:1
                        Frequency:2.412 GHz (Channel 1)
                        Quality=67/70  Signal level=-43 dBm  
                        Encryption key:on
                        ESSID:"test01"
                        Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                                  9 Mb/s; 12 Mb/s; 18 Mb/s
                        Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                        Mode:Ad-Hoc
			Extra:tsf=00000000025fd339
			Extra: Last beacon: 27568ms ago
			IE: Unknown: 0006746573743031
			IE: Unknown: 010882840B160C121824
			IE: Unknown: 030101
			IE: Unknown: 06020000
			IE: Unknown: 32043048606C
    $ ping 192.168.2.52
    PING 192.168.2.52 (192.168.2.52) 56(84) bytes of data.
    From 192.168.2.51 icmp_seq=1 Destination Host Unreachable
    ...

    Questions:
    - Where can I find where the SIOCSIWPMKSA, SIOCSIWENCODEEXT,
      SIOCSIWGENIE errors come from?
    - Why does iwconfig report "Encryption key:off" but iwlist scan
      say "Encryption key:on"??
    - Both computers are associated with the same cell -- but ping
      reports "Destination Host Unreachable". Why?

3. WPA: starts, but with WEP (?!) and no ping
   wpa_supplicant.conf: (from the wpa_supplicant examples)
        ap_scan=2
        network={
            ssid="test_adhoc"
            mode=1
            frequency=2412
            proto=WPA
            key_mgmt=WPA-NONE
            pairwise=NONE
            group=TKIP
            psk="secret_passphrase"
        }

    $ wpa_supplicant -c wpa_supplicant.conf -i wlan0
    ioctl[SIOCSIWPMKSA]: Invalid argument
    Trying to associate with SSID 'test_adhoc'
    ioctl[SIOCSIWGENIE]: Operation not supported
    Association request to the driver failed
    CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (auth) [id=-1 id_str=]
    l2_packet_receive - recvfrom: Network is down
    Associated with a2:c9:33:96:6f:c2
    CTRL-EVENT-CONNECTED - Connection to a2:c9:33:96:6f:c2 completed (reauth) [id=0 id_str=]

    $ iwconfig
    wlan0     IEEE 802.11bgn  ESSID:"test_adhoc"  
              Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: A2:C9:33:96:6F:C2   
              Tx-Power=20 dBm   
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Encryption key:410C-2C46-BB22-552B-9BEA-C15F-2917-22A2-9CA7-5B9E-9BD5-2CF3-9CA7-5B9E-9BD5-2CF3
              Power Management:on
    $ iwlist scan
    wlan0     Scan completed :
              Cell 01 - Address: A2:C9:33:96:6F:C2
                        Channel:1
                        Frequency:2.412 GHz (Channel 1)
                        Quality=67/70  Signal level=-43 dBm  
                        Encryption key:on
                        ESSID:"test_adhoc"
                        Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                                  9 Mb/s; 12 Mb/s; 18 Mb/s
                        Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                        Mode:Ad-Hoc
                        Extra:tsf=000000000416e410
                        Extra: Last beacon: 16ms ago
                        IE: Unknown: 000A746573745F6164686F63
                        IE: Unknown: 010882840B160C121824
                        IE: Unknown: 030101
                        IE: Unknown: 06020000
                        IE: Unknown: 32043048606C
    $ ping 192.168.2.52
    PING 192.168.2.52 (192.168.2.52) 56(84) bytes of data.
    From 192.168.2.51 icmp_seq=9 Destination Host Unreachable
    ...

    Questions:
    - The network still seems WEP-encrypted (instead of WPA), or am I wrong?
    - As before, ping does not work, and I have no idea why. :(
      Any ideas?
    - I tested the same with wpa_supplicant 0.7.3 -- this resulted in a
      completely *unencrypted* network, although I used exactly the same
      wpa_supplicant.conf. Why??


best regards,
Roland




More information about the Hostap mailing list