Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
"wifi.connect" hang up
By problems such as access point, in a case where the connection destination is no longer, and repeat the initialization of the following, you can hang up in the "wifi.connect" several times. Will there countermeasures like? Nice to meet you. Matsuda
---------------
Wifi Connect
---------------
int Wifi_Connect()
{
int ret = 0;
Initialize Wi-Fi interface ret = wifi.init(); if(ret != 0){ printf("Wi-Fi initial failed %d\r\n", ret); return ret; } wait(0.5);
ret = wifi.disconnect(); if(ret != 0) { printf("on the disconnect state %d\r\n", ret); return ret; } wait(0.3);
ret = wifi.connect( WifiSet.Wifi_SSID, strlen(WifiSet.Wifi_SSID) , SecuriryType , WifiSet.Wifi_SECURITY_KEY, strlen(WifiSet.Wifi_SECURITY_KEY) ); if(ret != 0) { printf("Connect AP is failed %d\r\n", ret); return ret; } wait(0.5);
DHCP IP GET int retIp = wifi.setIPConfig(true); wait(0.5); printf("IP Address Get!!! %d\n", retIp);
return(true); }
Question relating to:
Assigned to
9 years, 1 month ago.This means that the question has been accepted and is being worked on.