Tool/software: Code Composer Studio
Hi TI,
I am using MQTT program (merged with OTA), i want to use AP+SC feature of the wifi. here is my modified function...
/* * ======== initWiFi ======= * Start the NWP and connect to AP */ static void initWiFi() { /* Set connection variables to initial values */ deviceConnected = false; ipAcquired = false; provisioning = true; int32_t status; // uint32_t currButton; // uint32_t prevButton = 0; status = sl_WifiConfig(); if (status < 0) { /* sl_WifiConfig failed */ IOT_INFO("sl_WifiConfig failed"); ASSERT_ON_ERROR(status); while (1); } /* Host driver starts the network processor */ status = sl_Start(NULL, NULL, NULL); if (status < 0) { /* Error: Could not initialize WiFi */ IOT_INFO("Error: Could not initialize WiFi"); ASSERT_ON_ERROR(status); while (1); } // status = wlanConnect(); // if ( status < 0) { // /* Error: Could not connect to WiFi AP */ // IOT_INFO("Error: Could not connect to WiFi AP"); // ASSERT_ON_ERROR(status); // while (1); // } /* * Wait for the WiFi to connect to an AP. If a profile for the AP in * use has not been stored yet, press Board_GPIO_BUTTON0 to start * provisioning. */ if ((deviceConnected != true) || (ipAcquired != true) || (provisioning == true)) { IOT_INFO("Waiting for provisioning..."); provisioningFxn(); } while ((deviceConnected != true) || (ipAcquired != true) || (provisioning == true)) { /* * Start provisioning if a button is pressed. This could be done with * GPIO interrupts, but for simplicity polling is used to check the * button. currButton = GPIO_read(CONFIG_GPIO_BUTTON_0); if ((currButton == 0) && (prevButton != 0)) { provisioningFxn(); } prevButton = currButton; */ usleep(50000); } }
this is working well , i am able to give wifi credentials and it's getting connected as well. but whenever it's(CC3235MODSF) getting restart (RESET) , it's asking for the the credentials again every time.
why it is not storing wifi credential in flash. and what i have to do for that?
please do let me know ?
Thanks in advance,
waiting for your response
sarju bhatnagar