ACKme
/
wiconnect-join_example
Simple app demonstrating network join feature of WiConnect Host Library.
Diff: example.cpp
- Revision:
- 3:15daf72c279c
- Parent:
- 1:b4e1870b6daa
- Child:
- 5:84c69c7f4085
- Child:
- 8:504313ccb679
--- a/example.cpp Wed Aug 13 04:41:54 2014 -0700 +++ b/example.cpp Sat Aug 23 05:43:34 2014 -0700 @@ -8,8 +8,7 @@ * 1. Instantiate the WiConnect Library * 2. Initiate Communication with WiFi Module * 3. Join a network using the specified parameters - * 4. Wait for the module to join - * 5. That's it! + * 4. That's it! * * */ @@ -103,7 +102,6 @@ printf("Joining network: %s....\r\n", NETWORK_SSID); - // Initiate module join sequence if(wiconnect.join(NETWORK_SSID, NETWORK_PASSWORD) != WICONNECT_SUCCESS) { printf("Failed to send join command\r\n"); @@ -111,25 +109,7 @@ } //------------------------------------------------------------------------- - // STEP 4: Wait for the module to join the network - //------------------------------------------------------------------------- - - printf("Waiting to join network....\r\n"); - - do - { - // poll the module for the network status - if(wiconnect.getNetworkStatus(&networkStatus) != WICONNECT_SUCCESS) - { - printf("Failed to get network status\r\n"); - for(;;); // infinite loop - } - - // loop until the network status is not down - } while(networkStatus == NETWORK_STATUS_DOWN); - - //------------------------------------------------------------------------- - // STEP 5: Done! + // STEP 4: Done! //------------------------------------------------------------------------- printf("Network join example has completed!\r\n");