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.

Issue with automatic reconnect after smart Config



Hi,

I have issues with automatic reconnect after smart Config, can someone check my procedure please ?

1/ At the very first boot i  succesfully perform a smart config on my home AP without AES encryption for the moment ( WPA2 ) and with TI smart app on IOS

2/ then i swicth off my board and when i swicth it on again, i never receive connection indication(HCI_EVNT_WLAN_UNSOL_CONNECT ) nor DHCP info(HCI_EVNT_WLAN_UNSOL_DHCP)

Any idea ? here the sequence i used :  

1st boot : 

wlan_ioctl_set_connection_policy(DISABLE, DISABLE, DISABLE)

wlan_ioctl_del_profile(255)

//Wait until CC3000 is disconnected
...

// Trigger the Smart Config process
//
if (wlan_smart_config_set_prefix(aucCC3000_prefix) == -1)

netapp_dhcp((unsigned long *) pucIP_Addr, (unsigned long *) pucSubnetMask,
(unsigned long *) pucIP_DefaultGWAddr, (unsigned long *) pucDNS); 

wlan_smart_config_start(0);

wlan_ioctl_set_connection_policy(DISABLE, DISABLE, ENABLE);

/ reset the CC3000
wlan_stop();

wlan_start(0);

wlan_set_event_mask(HCI_EVNT_WLAN_KEEPALIVE | HCI_EVNT_WLAN_UNSOL_INIT | HCI_EVNT_WLAN_ASYNC_PING_REPORT);

until here everything looks fine .... 

then HW reset 

and after wlan start i expect to receive  HCI_EVNT_WLAN_UNSOL_CONNECT and 

HCI_EVNT_WLAN_UNSOL_DHCP through CC3000_UsynchCallback

but it never happens ...

Thanks 

Lionel 

  • Dear Aaron, 

    tahnsk for the first answer, but i already tried to use this policy for second rebbot and nothing happens. 

    here the procedure, i get blocked in GetIpAdress() below :  

    if(FirstBoot)

        SmartConfig(); //this is OK

    else 

    {

    // Configure to connect automatically to the AP retrieved in the
    // Smart config process
    wlan_ioctl_set_connection_policy(DISABLE,DISABLE,ENABLE);  //this is OK

    // Mask out all non-required events
    wlan_set_event_mask(HCI_EVNT_WLAN_KEEPALIVE | HCI_EVNT_WLAN_UNSOL_INIT | HCI_EVNT_WLAN_ASYNC_PING_REPORT);//this is OK

    /* Wait for connecting is OK */
    do
    {
    network_status = wlan_ioctl_statusget();
    delay ()Cc3000Connected } while (network_status != 3);//this is OK

    SetIP adress() ; //this is OK (netapp_dhcp)

    I  get block in my fiunction GetIp adress because of variables Cc3000Dhcp & Cc3000Connected are still to 0 

    because CC3000_UsynchCallback did not come

    /* Wait for DHCP process to finish (if you are using a static IP address please delete the wait for DHCP event - hub_WifiCtx.Cc3000Dhcp */
    while ((hub_WifiCtx.Cc3000Dhcp == 0) || (hub_WifiCtx.Cc3000Connected == 0))
    {
    hci_unsolicited_event_handler();
    ... ;
    }

    Lionel