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.

CC3100 raw socket and AP connection

Other Parts Discussed in Thread: CC3100

Hi.

I am using CC3100 with IP stack on host MCU and I want MCU to handle the DHCP.

The way that it is now:

Creating raw socket:

rawSocket = sl_Socket(SL_AF_INET, SL_SOCK_RAW, 1);

And connecting to AP:

t_ip_ret wifi_connect_to_ap(signed char* SSID, signed char* key, unsigned char sec_type){
    SlSecParams_t secParams = {0};
    _i32 retVal = 0;

    secParams.Key = key;
    secParams.KeyLen = pal_Strlen(key);
    secParams.Type = sec_type;

    retVal = sl_WlanConnect(SSID, pal_Strlen(SSID), 0, &secParams, 0);
    if(retVal<0)
      return IP_ERR_INIT;
    ASSERT_ON_ERROR(retVal);

    /* Wait */
    while((!IS_CONNECTED(g_Status)) || (!IS_IP_ACQUIRED(g_Status))) { _SlNonOsMainLoopTask(); }

    return IP_SUCCESS;
}

But in this case, when CC3100 connects to an AP it will obtain IP address too, and this is what I don't want. I want it to just connect to AP, and then the host MCU will care about getting IP address. Is it possible?

Best regards

Konrad