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.

CC3000 WEP security connected but not working

Hi All,

I am having the following issue with the CC3000. I am able to successfully connect to a router with all the different securities available. I send the configuration to the MSP430 through Bluetooth and then I delete all the profiles, I add the new profile I sent, and with a flag decide which type of security to use for the add_profile. 

Everything works with that router, but the WEP and the mixed WPA/WPA2 settings. The WEP seems more important to me. In both cases the CC3000 tells me that it is successfully connected, but the communication does not work (I am able to open a socket, but communication does not seem to work in either direction).

Here the code I use to add a profile. Anyone is aware of any issues with this in the past?? I am trying to update the WiFi module, but I am not sure I can do that on all the devices on the field.

         wlan_ioctl_del_profile(255);

        switch (security){

case WEP:

error = wlan_add_profile(WLAN_SEC_WEP, // security type

SSID,

SSID_len,

NULL, // BSSID

1, // Priority

PWD_len, // PairwiseCipher

0, // GroupCipher

0, // KEY management

PWD,     // KEY

PWD_len);     // KEY length

//to be tested after priority:

// PWD_len, // KEY length

// 0, // KEY index

// 0,

// PWD, // KEY

// 0);

break;

case UNSECURED:

error = wlan_add_profile(WLAN_SEC_UNSEC, // security type

SSID,

SSID_len,

NULL, // BSSID

1, // Priority

0, // PairwiseCipher

0, // GroupCipher

0, // KEY management

0,     // KEY

0);     // KEY length

break;

default:

//case WPA:

error = wlan_add_profile(WLAN_SEC_WPA2, // security type

SSID,

SSID_len,

NULL, // BSSID

1, // Priority

0x18, // PairwiseCipher

0x1e, // GroupCipher

2, // KEY management

PWD,     // KEY

PWD_len);     // KEY length

break;

        }

        if(wifiConnect())

        {

        error = 0;

          }else

        {

          wlan_ioctl_del_profile(255);

          led_startBlink(LEDS, 2000);

          ble_setState(BCAST_STATE_WIFI_ERROR);

          error = -2;

          }

 

Thanks for the help

  • Hi Fabrizio,

    When you add the profile for WEP, do you give some value for the last parameter? Please set it as 0.

    Please look at wlan.c for reference. Here we add the profile for AP with WEP security. This works without any issues and even the traffic on this link works.

    For example: If you are trying to connect to an AP "Test" with WEP key "01234" (Or its hex representation of 3031323334. Then please use the API as below:

    wlan_add_profile(WLAN_SEC_WEP,     // security type
                    ssidPtr,                             // SSID pointer to "Test"
                    4,                             // SSID length
                    NULL,                             // BSSID
                    1,                                // Priority
                    5,                            // KEY length
                    0,                                 // KEY index
                    0,
                    decKeyPtr,                        // KEY pointer to "01234"
                    0);

    Always provide the ASCII input for the key.

    Regards,
    Raghavendra

  • Hi Raghavendra, thank you for the reply. 

    I will try this code, but I already tried, and it was not even connecting. Just to make sure, in your example above, shall I provide the 12345 or the hex 3031323334? 

    EDIT: I GOT WHAT I NEED TO PUT..I WILL TRY. STILL NOT CLEAR WHY IT CONNECTS ANYWAY.

    I am providing the hex, and the CC3000 tells me that is connected to the wifi network, but communication does not work. Is this an option? If anything is wrong in adding the profile, probably it should not even connect, right?

    I will post the results.

    Thanks.

    Fabrizio

  • HI Raghavendra, 

     

    Unfortunately, I tried any possible combination, and the connection to our server does not work. 

    What can I possibly do wrong? I am using the same definitions for all the different securities:

    static unsigned char SSID[32];

    static uint8_t SSID_len = 0;

    static unsigned char PWD[64];

    static uint8_t PWD_len = 0;

     

     

     

    error = wlan_add_profile(WLAN_SEC_WEP, // security type

    SSID,

    SSID_len,

    NULL, // BSSID

    1, // Priority

    PWD_len, // KEY length

    0, // KEY index

    0,

    PWD, // KEY

    0);

    Thanks,

    Fabrizio