-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description
- Type: Bug
- Related issue: Fails to connect with K64F and ESP8266 mbed-os-example-client#205
- Priority: Major
Bug
Target
K64F
Toolchain:
GCC_ARM|ARM|IAR
meed-os sha:
88a4baa Merge pull request #3902 from mazimkhan/master
Steps to reproduce
Run this simple program:
#include "mbed.h"
#include "TCPSocket.h"
#include "ESP8266Interface.h"
ESP8266Interface wifi(MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX);
int main()
{
printf("WiFi example\r\n\r\n");
printf("\r\nConnecting...\r\n");
int ret = wifi.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD, NSAPI_SECURITY_WPA_WPA2);
if (ret != 0) {
printf("\r\nConnection error\r\n");
return -1;
}
printf("Success\r\n\r\n");
TCPSocket socket;
socket.open(&wifi);
ret = socket.connect("www.arm.com", 80);
printf("%d\r\n", ret);
wifi.disconnect();
printf("\r\nDone\r\n");
}
Get this output:
WiFi example
Connecting...
Success
-3009
Done
-3009 indicates connection to address failed. Looking deeper, it fails at the DNS resolution step.
However, if you try to connect to google.com, you get this output:
WiFi example
Connecting...
Success
0
Done
This seems to also be affecting mbed-client behavior - ARMmbed/mbed-os-example-client#205.
Metadata
Metadata
Assignees
Labels
No labels