printf("wifi mode is %d \n",mode);
} else {
printf("Failed to get wifi mode \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("wifi mode is %d \n", mode);
} else {
printf("error in setting mode \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("Station mode: mac address %s \n", mac);
} else {
printf("Failed to get station mode MAC address \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("MAC address is set \n");
} else {
printf("MAC address is not set \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("MAC address is set \n");
} else {
printf("MAC address is not set \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("Softap mode: mac address %s \n", mac);
} else {
printf("Failed to get softap mode MAC address \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("Connected to AP: '%s'\n",STATION_MODE_SSID);
} else if (ret == NO_AP_FOUND){
printf("SSID: %s not found \n",(char *)&config.station.ssid);
+ return FAILURE;
} else if (ret == INVALID_PASSWORD){
printf("Invalid password %s for SSID %s\n", (char *)&config.station.pwd ,\
(char *)&config.station.ssid);
+ return FAILURE;
} else {
printf("Failed to connect with AP \n");
+ return FAILURE;
}
ret = create_socket(AF_INET, SOCK_DGRAM, IPPROTO_IP, &sockfd);
printf("AP's encryption mode %d \n", config.station.encryption_mode);
} else {
printf("AP's status %s \n", config.station.status);
+ return FAILURE;
}
printf("====\n\n");
printf("softAP bandwidth mode %d \n", config.softap.bandwidth);
} else {
printf("Failed to get softAP config \n");
+ return FAILURE;
}
printf("====\n\n");
stations_list = wifi_connected_stations_list(&count);
if (!count) {
printf("No station found \n");
+ return FAILURE;
}
if (!stations_list) {
stations_list = NULL;
}
printf("====\n\n");
- return 0;
+ return SUCCESS;
}
int test_softap_mode_stop()
printf("Power save mode set \n");
} else {
printf("Power save mode is not set \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("Power save mode is %d \n", power_save_mode);
} else {
printf("Failed to get power save mode \n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("OTA begin success \n");
} else {
printf("Failed start OTA begin\n");
+ return FAILURE;
}
printf("====\n\n");
#endif
} else {
printf("Failed OTA write\n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("OTA end success \n");
} else {
printf("Failed OTA end\n");
+ return FAILURE;
}
printf("====\n\n");
#endif
printf("Success in set vendor specific ie\n");
} else {
printf("Failed to set vendor specific ie\n");
+ return FAILURE;
}
printf("====\n\n");
#endif