I am using a latest version of patch (1.10) and trying to perform the SmartConfiguration process, but after
sending wlan_smart_config_start(0) control get stuck in a while loop :
while(ulsmartconfigfinshed == 0)
{
hci_unsolicited_event_handle();
}
Here is the detail code which I am using to perform the SmartConfig :
ulCC3000DHCP = 0;
ulCC3000Connected = 0;
//ulSocket = 0;
ulSmartConfigFinished=0;
bEnableUnSolEvent = 0;
wlan_init( CC3000_UsynchCallback,sendWLFWPatch, sendDriverPatch, sendBootLoaderPatch, ReadWlanInterruptPin, WlanInterruptEnable, WlanInterruptDisable, WriteWlanPin);
wlan_start(patch);
wlan_set_event_mask(HCI_EVNT_WLAN_KEEPALIVE|HCI_EVNT_WLAN_UNSOL_INIT|HCI_EVNT_WLAN_ASYNC_PING_REPORT);
ucStopSmartConfig = 0;
wlan_ioctl_set_connection_policy(0,0,0);
wlan_ioctl_del_profile(255);
wlan_smart_config_set_prefix(aucCC3000_prefix);
wlan_smart_config_start(0);
hci_unsolicited_event_handler();
while (ulSmartConfigFinished == 0)
{
hci_unsolicited_event_handler();
MCF_GPIO_GPIO_OUT ^= MCF_GPIO_GPIO_OUT_GPIO_OUT16; //LG6 -WIFI LED
//tx_thread_sleep(100);
}
// Decrypt configuration information and add profile
status1 = wlan_smart_config_process();
wlan_ioctl_set_connection_policy(0, 0,1);
wlan_stop();
DEASSERT_CS();
wlan_start(0);
while(loop)
{
if ((ucStopSmartConfig == 1) && (ulCC3000DHCP == 1))
{
while (loop_index < 3)
{
mdnsAdvertiser(1,device_name,strlen(device_name));
loop_index++;
}
ucStopSmartConfig = 0;
loop =0;
}
}
before this I haven't call any of other Wlan API (like wlan_connect).
And also one more update if I will try to connected with the same AP using wlan_Connect(not using smart config)
API then the control will go to the callback routine and set the ulCC3000Connected flag and wlan_ioctl_statusget
return 3.
please let me know if I am missing something on smart config process.
Router Detail :
I am using IPOD app while performing smart config, here is the snap shot of smartconfig app configuration
