WiFiClient cannot connect to IPv6 link local address
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Basic Infos
- [x] This issue complies with the [issue POLICY doc](https://github.com/esp8266/Arduino/blob/master/POLICY.md).
- [x] I have read the documentation at [readthedocs](https://arduino-esp8266.readthedocs.io/en/latest) and the issue is not addressed there.
- [x] I have tested that the issue is present in current master branch (aka latest git).
- [x] I have searched the issue tracker for a similar issue.
- [x] If there is a stack dump, I have decoded it.
- [x] I have filled out all fields below.
#### Platform
- Hardware: ESP8266MOD
- Core Version: 2.5.2
- Development Env: Arduino IDE
- Operating System: Windows
### Settings in IDE
- Module: Wemos D1 R2 & mini
- Flash Size: 4MB
- lwip Variant: v2 IPv6 Higher Bandwidth
- Reset Method: ck
- CPU Frequency: 80Mhz
- Upload Using: SERIAL
- Upload Speed: 921600
### Problem Description
As per https://github.com/esp8266/Arduino/pull/5136, IPv6 is supported on the recent versions of ESP8266. However, I observed that `WiFiClient.connect()` is not able to connect to an IPv6 link-local IP address (`fe80::/10`) on the same network with the ESP8266.
### [MCVE](https://stackoverflow.com/help/mcve) Sketch
```C++
#include
#define STA_SSID "your-ssid"
#define STA_PSWD "your-wifi-password"
#define SERVER_IP "fe80::aaaa:bbff:fecc:dddd"
IPAddress server;
WiFiClient client;
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.setAutoConnect(true);
WiFi.setAutoReconnect(true);
WiFi.begin(STA_SSID, STA_PSWD);
}
void loop() {
Serial.println("\nStarting connection...");
// if you get a connection, report back via serial:
server.fromString(SERVER_IP);
if (client.connect(server, 8000)) {
Serial.println("connected");
// Make a HTTP request:
client.println("GET / HTTP/1.0");
client.println();
} else {
Serial.println("Failed to connect");
}
delay(500);
}
```
### Debug Messages
Sketch output:
```
Starting connection...
Failed to connect
```
I've done a packet capture on the server and can see NO packets from ESP8266.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.