WPA-PSK for Aironet

Basavaraj Arani basavaraj.arani
Wed Jan 3 21:47:26 PST 2007


Hi Dan,

I am using the Firmware 5.6.08. But whenever I set the WPA key, the card
somehow doesn't get associated with the Access Point.
I am using the DLink-DWL-7100AP access point.

Here is the code for setting the WPA on/off
........
    if(!strcasecmp(args[0], "on"))
    {
        //wrq.u.param.flags = IW_AUTH_WPA_ENABLED & IW_AUTH_INDEX;
        wrq.u.param.flags = IW_AUTH_DROP_UNENCRYPTED & IW_AUTH_INDEX;
        wrq.u.param.value = 1;

        if(iw_set_ext(skfd, ifname, SIOCSIWAUTH, &wrq) < 0)
                return(IWERR_SET_EXT);

    }
    else if(!strcasecmp(args[0], "off"))
    {
        wrq.u.param.flags = IW_AUTH_WPA_ENABLED & IW_AUTH_INDEX;
        wrq.u.param.value = 0;

        if(iw_set_ext(skfd, ifname, SIOCSIWAUTH, &wrq) < 0)
                return(IWERR_SET_EXT);
    }
........

and for setting the WPA keys, I have the following code.

static int
set_wpakey_info(int             skfd,
             char *             ifname,
             char *             args[],
             int                count)
{
    struct iwreq wrq;
    struct iw_encode_ext *iwee;
    unsigned char key[IW_ENCODING_TOKEN_MAX];
    int keylen = strlen(args[0]);

    memset(&wrq, 0x00, sizeof(wrq));

    memcpy(key, args[0], keylen);
    iwee = (struct iw_encode_ext *)malloc(sizeof(struct iw_encode_ext) +
IW_ENCODING_TOKEN_MAX);

    iwee->alg = IW_ENCODE_ALG_WEP;
    iwee->key_len = keylen;
    iwee->ext_flags = 1;
    memcpy(iwee->key, key, keylen);

    wrq.u.encoding.pointer = (caddr_t)iwee;
    wrq.u.encoding.flags =  1;
    wrq.u.encoding.length = sizeof(struct iw_encode_ext) + keylen;
    if(iw_set_ext(skfd, ifname,SIOCSIWENCODEEXT, &wrq) < 0)
    {
       return(IWERR_SET_EXT);
    }
    return(1);
}

I tried to set a key of length 32.
The key I set at both the ends (AP/ client adapater) is
abcdefghijklmnopqrstuvwxyzabcdef.

But the card doesn't get associated with the AP.

Please help me in resolving this problem.

Many thanks in advance.

Regards,
Basu


On 1/4/07, Dan Williams <dcbw at redhat.com> wrote:
>
> On Wed, 2007-01-03 at 09:20 +0700, kemas henry wrote:
> > On Tue, 2007-01-02 at 18:13 +0100, castet.matthieu at free.fr wrote:
> > > Selon R Arani Basavaraj-a24052 < basavaraj at motorola.com>:
> > >
> > > >
> > > > Hi,
> > > Hi,
> > >
> > > >
> > > > Is the current Linux driver for aironet pc4500 driver supports
> WPA-PSK?
> > > > I downloaded the airo driver which claims to support WPA-PSK from
> > > > http://castet.matthieu.free.fr/airo, but it doesn't seems to be
> working well
> > > > for me.
> > > AFAIK, only 340 and 350 series with a recent firmware support wpa. The
> older
> > > cards don't.
> >
> > did you mean cisco 340 and 350 pcmcia ?
>
> Correct, only the 340 and 350 versions, in both MiniPCI and PCMCIA.
> You'll need firmware version 5.30.17 or later to do WPA.
>
> > what kind of WPA that this card support ?
>
> TKIP encryption only, with either WPA or WPA2.  The hardware just cannot
> do AES/CCMP.
>
> Dan
>
>
>
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20070104/278ca2f4/attachment.htm 



More information about the Hostap mailing list