Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Only IPv6 router not working with ESP32 #8365

Unanswered
dharmikP17 asked this question in Q&A
Discussion options

I am using ESP32(2.0.9) with arduino IDE(2.0.2).
Board : ESP32-WROOM-32D.
I have an application where I only have IPv6 enabled in router and I want to post data over http.
I have test code for this where I am sending ping to google to see if it is working or not. Unfortunately it is returning -1. I have this code tested in different network where it returns 200.
Am I missing something ?

void setup() {
 Serial.begin(115200);
 delay(2000);
 WiFi.onEvent(WiFiEvent);
 WiFi.begin(ssid, pass);
 while (WiFi.status() != WL_CONNECTED) {
 delay(300);
 Serial.println(".");
 }
 Serial.println("wifi connected");
 delay(2000);
 
 HTTPClient http;
 http.begin("https://www.google.com/");
 int httpCode = http.GET();
 Serial.printf("HTTP code: %d\n", httpCode);
 http.end();
}
void loop() {
}
void WiFiEvent(WiFiEvent_t event) {
 switch (event) {
 case ARDUINO_EVENT_WIFI_STA_CONNECTED:
 Serial.println("Enabling IPv6");
 WiFi.enableIpV6();
 break;
 default:
 break;
 }
}

This is the debug message I got

[ 4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 2053][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 0 - WIFI_READY
[ 2144][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 2 - STA_START
[ 2313][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
Enabling IPv6
.
[ 2620][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 2620][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.3, MASK: 255.255.255.0, GW: 192.168.1.1
.
wifi connected
[ 4035][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 8 - STA_GOT_IP6
[ 4774][D][HTTPClient.cpp:263] beginInternal(): unexpected protocol: https, expected http
[ 4775][D][HTTPClient.cpp:303] beginInternal(): protocol: https, host: www.google.com port: 443 url: /
[ 4781][D][HTTPClient.cpp:598] sendRequest(): request type: 'GET' redirCount: 0
[ 5035][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 8 - STA_GOT_IP6
[ 9829][I][ssl_client.cpp:112] start_ssl_client(): select returned due to timeout 5000 ms for fd 48
[ 9830][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -1
[ 9833][D][HTTPClient.cpp:1163] connect(): failed connect to www.google.com:443
[ 9840][W][HTTPClient.cpp:1483] returnError(): error(-1): connection refused
HTTP code: -1
[ 9858][D][HTTPClient.cpp:408] disconnect(): tcp is closed
You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

Known issue. IPv6 and DNS resolution are not supported yet in Arduino-ESP32. Please check issues (open and closed) and open PRs.

You must be logged in to vote
2 replies
Comment options

Where support is available ? On which platforms ?

Comment options

Our Tasmota fork supports IPv6. Built to be used with Platformio.
See here https://github.com/tasmota/platform-espressif32

Comment options

Follow this #7722 PR

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /