This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WEP Key index Problem

Hello everyone,

I am running some test on our CC3000 chip regarding the security type of a given router.

In each tests, the router use is always the same and only its configuration is changed.

WPA2 works perfectly, I have however some issue with the WEP security type.

To be more precise, the problem comes when I play around with the Key Index on the router.

Indeed, when on the router, the key index used it the first one, I can add a profile like below and the connection is successful.

wlan_add_profile(   WLAN_SEC_WEP,                           // security type
                                   (unsigned char*)ssid,                      // SSID
                                   strlen((char*)ssid),                           // SSID length
                                   NULL,                                                  // BSSID
                                   1,                                                          // Priority
                                   strlen((char*)key),                             // KEY length
                                   0,                                                          // KEY index
                                   0,
                                  (unsigned char*)key,                         // KEY
                                  0);

However, the problem comes if I set on the router the key and index 2 for example. Therefore, if I change the "KEY index" parameter and set it to 1, the connection is not working. I tried by setting it to 2 as well, in case there was a problem of offset, but the problem is the same.

To summarize, everything works fine with WEP as long as the key index used is the first one. With any other key index, the connection fails.

Has any of you already had this issue in the past ? Is there another way of doing it ? Is there something that I am missing ?

Thank you for your help.

  • Hi,

    In order to configure all indexes in WEP, please do the following:

    wlan_add_profile(1, // security type
                                      "dlink", // SSID
                                       11, // SSID length
                                       NULL, // BSSID
                                       1, // Priority
                                        5, // KEY length
                                        0, // KEY index - Don't change this index. 
                                        0,
                                        "12345123451234512345", // KEY is "12345", but is repeated 4 times for each index
                                        0);

    // To allow auto connect to the profile
    wlan_ioctl_set_connection_policy(0, 0, 1);

    Regards,

    Tomer

  • Small correction to previous post, SSID length should be 5 and not 11.

    Regards,

    Tomer