Fwd: Need help. Trying to get a new driver work.

Sriharsha Vedurmudi svedurumudi
Wed Oct 3 08:27:51 PDT 2007


Hi Dan,
 I was not sure if you got my reply (am not sure if your firewall lets
mails from unknown addresses) to your mail and so am posting it in the
forum.

Best wishes,
Sriharsha.

---------- Forwarded message ----------
From: Sriharsha Vedurmudi <svedurumudi at gmail.com>
Date: Oct 3, 2007 8:38 PM
Subject: Re: Need help. Trying to get a new driver work.
To: Dan Williams <dcbw at redhat.com>


Hello Dan,
 A very _big_ thank you for taking time to help me out. I am so glad I
got instant help (honestly I did not think anyone would reply so
soon).
 Coming to the progress, I made the changes you suggested (changed the
we_version_source from 9 to 19. and added enc_capa field populated
with CAPA_WPA | CAPA_CIPHER_TKIP).

The output from iwlist wlan0 scan looks good (see below):
# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 00:17:94:FE:54:D0
                    ESSID:"CISCO_WPA"
                    Mode:Master
                    Frequency:2.437 GHz
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK

The configuration file that I am using (/etc/wpa1.conf) is:
network={
      ssid="CISCO_WPA"
      scan_ssid=1
      key_mgmt=WPA-PSK
      psk="linuxap10"
 }

And, when I give wpa_supplicant command, I see the following:

# wpa_supplicant -iwlan0 -c/etc/wpa1.conf -d
Successfully initialized the event loop
Initializing interface : 'wlan0'
Conf  : '/etc/wpa1.conf'
Driver: 'default'
Control Interface: 'N/A'
Bridge: 'N/A'

Configuration file '/etc/wpa1.conf' -> '/etc/wpa1.conf'
Reading configuration file '/etc/wpa1.conf'
Priority group 0
   id=0 ssid='CISCO_WPA'
Initializing interface (2) 'wlan0'
SIOCGIWRANGE:
WE(compiled)=21
WE(source)=19
enc_capa=0x5
capabilities:
key_mgmt 0x5
enc 0x7
LinkMode: 1
Operstate:5
WEXT: Operstate:
linkmode=1
operstate=5
Own MAC address: 00:11:22:33:44:55
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=9):
     43 49 53 43 4f 5f 57 50 41         CISCO_WPA
Trying to get current scan results first without requesting a new scan to speed
up initial association
Received 170 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:17:94:fe:54:d0 ssid='CISCO_WPA' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:17:94:fe:54:d0 ssid='CISCO_WPA' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - non-WPA network not allowed
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
Received 170 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:17:94:fe:54:d0 ssid='CISCO_WPA' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:17:94:fe:54:d0 ssid='CISCO_WPA' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - non-WPA network not allowed
No suitable AP found.
Setting scan request: 5 sec 0 usec


Can anything be deciphered from the above dump?

Best wishes,
Sriharsha.

On 10/3/07, Dan Williams <dcbw at redhat.com> wrote:
> A few things.  In your GIWRANGE handler, make sure you are doing the
> following:
>
> 1) Setting range->we_version_source = 19 or higher; as long as you
> provide WPA support you should advertise 19 or higher
>
> 2) Setting range->enc_capa correctly:
>
>                 range->enc_capa =   IW_ENC_CAPA_WPA
>                                   | IW_ENC_CAPA_WPA2
>                                   | IW_ENC_CAPA_CIPHER_TKIP
>                                   | IW_ENC_CAPA_CIPHER_CCMP;
>
>    (of course, if you don't support CCMP or RSN don't put those there)
>
> 3) In your GIWSCAN handler, are you adding the WPA IEs correctly?  Don't
> use EVCUSTOM; use EVGENIE like so:
>
>         memset(&iwe, 0, sizeof(iwe));
>         if (bss->rsn_ie_len) {
>                 char buf[MAX_WPA_IE_LEN];
>                 memcpy(buf, bss->rsn_ie, bss->rsn_ie_len);
>                 iwe.cmd = IWEVGENIE;
>                 iwe.u.data.length = bss->rsn_ie_len;
>                 start = iwe_stream_add_point(start, stop, &iwe, buf);
>         }
>
> Without wpa_supplicant, what does a scan result look like, from the
> output of 'iwlist wlan0 scan' for an AP you know is broadcasting an IE?
> iwlist will print out the IE information if your driver correctly
> handles it.
>
> Also, thanks for using driver_wext.c; the more wireless drivers that use
> WEXT the easier it is for Linux applications to work with your driver.
>
> Dan
>
>
> >  Also surprising is that none of the printk's that I put in the ioctl
> > handler functions are getting displayed.
> >  Since wpa_supplicant is not seeing any wpa ie, it is not issuing the
> > associate command. I am unable to figure out whats going wrong. Can
> > somebody help me with the correct sequence that is needed and also the
> > correct way to pass the WPA IE to wpa_supplicant (through
> > driver_wext.c, since Im using Linux 2.6.19-2 with W.E ver 21).
> >
> > Thanks in advance,
> >
> > Best regards,
> > Sriharsha.
> > _______________________________________________
> > HostAP mailing list
> > HostAP at shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
>
>




More information about the Hostap mailing list