Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 Support? #2521

Closed
mwuertinger opened this issue Apr 22, 2018 · 118 comments · Fixed by #17230
Closed

IPv6 Support? #2521

mwuertinger opened this issue Apr 22, 2018 · 118 comments · Fixed by #17230
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@mwuertinger
Copy link

The Internet Protocol version 6 was designed 20 years ago. Unfortunately many devices (including virtually all IoT devices) still do not support it. IPv4 addresses are getting extremely scarce these days and many ISPs no longer allocate public IPv4 addresses for their customers (Carrier grade NAT) which is already causing connectivity issues for many people including myself. Therefore we should all strive for 100% IPv6 support.

Would it be possible to implement IPv6 on Sonoff devices or is there anything in particular that stands in the way?

@Leseratte10
Copy link

Leseratte10 commented Apr 22, 2018

Last I checked, the upstream libraries didn't support IPv6 yet: esp8266/Arduino#638
I found this: espressif/arduino-esp32#1261, but this doesn't apply to the ESP8266. And it seems to be in active development and not completely ready for release. When this is finished (and merged into esp8266/Arduino), IPv6 can be used in Tasmota.

@stale
Copy link

stale bot commented Jun 6, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Action - Issue left behind - Used by the BOT to call for attention label Jun 6, 2018
@stale
Copy link

stale bot commented Jun 21, 2018

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.

@stale stale bot closed this as completed Jun 21, 2018
@d-a-v
Copy link

d-a-v commented Sep 14, 2018

Check again esp8266/Arduino#638

@akram
Copy link

akram commented Jan 15, 2020

Ardui core now supports IPv6 : esp8266/Arduino#5136

can we re-open thins one ?

@ascillato
Copy link
Contributor

can we re-open thins one ?

No because it is already implemented in Tasmota. You have to compile by yourself enabling IPV6 support in platformio.ini

If you need further assistant, please, do not hesitate on asking on the Support Chat. Thanks.

@akram
Copy link

akram commented Jan 17, 2020

Hi @ascillato , thank you for your quick answer.
I had a look at platformio.ini and I didn't find a self exaplanatory commented out parameter to enable it.
That would be good if you could tell which one it is?

@akram
Copy link

akram commented Jan 17, 2020

my bad , it looks like related to this:

; lwIP 1.4
;                            -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
;                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
;                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwidth Low Memory no Features
;                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features (Tasmota default)
                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 2 - Higher Bandwidth IPv6 (use ONLY if you need IPv6, experimental!)
;                            -DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH

@ascillato
Copy link
Contributor

yes, exactly.

If you need help on using those, you can use the support chat if you want.

@ascillato
Copy link
Contributor

Anyway, as the comment explains, it is experimental because the support is on the Arduino Core. You should use the stage core that have several fixes for that, but still experimental.

Use it, if you really need ipv6 in your local network. ipv4 for a local network is reliable and works for all usecases.

@freifunkerffm
Copy link

freifunkerffm commented Sep 23, 2020

Hello,
from the post above I understand that TASMOTA is supporting IPV6 in general.
I have already a working platformio-core setup where I can compile TASMOTA with different features with success!
But I fail with IPV6 :-/
In platformio.ini I have set:
; lwIP 2 - Higher Bandwidth IPv6 (use ONLY if you need IPv6, experimental!)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH

But it fails to work on a NODEMCU V3 board.
The serial-log from the device shows:
00:00:00 CFG: aus Flash geladen am F4, zählen 8
00:00:00 QPC: Count 1
00:00:00 Projekt tasmota Tasmota Version 8.5.0.1(tasmota)-2_7_4_1
00:00:00 HTP: Web-Server aktiv bei tasmota_40FABB-6843 mit IP-Adresse (IP unset)
00:00:01 RSL: tele/tasmota_40FABB/INFO1 = {"Module":"Sonoff Basic","Version":"8.5.0.1(tasmota)","FallbackTopic":"cmnd/DVES_40FABB_fb/","GroupTopic":"cmnd/tasmotas/"}
00:00:01 RSL: tele/tasmota_40FABB/INFO2 = {"WebServerMode":"Admin","Hostname":"tasmota_40FABB-6843","IPAddress":"(IP unset)","IPv6Address":""}
00:00:01 RSL: tele/tasmota_40FABB/INFO3 = {"RestartReason":"Software/System restart"}
00:00:01 RSL: stat/tasmota_40FABB/RESULT = {"POWER":"OFF"}
00:00:01 RSL: stat/tasmota_40FABB/POWER = OFF
00:00:01 RSL: homeassistant/discovery/807D3A40FABB/config = {"ip":"(IP unset)","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota_40FABB-6843","mac":"807D3A40FABB","md":"Sonoff Basic","ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"8.5.0.1","t":"tasmota_40FABB","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"btn":[1,0,0,0],"so":{"11":0,"13":0,"17":0,"20":0,"30":0,"37":1,"68":0,"73":0,"80":0},"lt_st":0,"ver":1}
00:00:05 RSL: tele/tasmota_40FABB/STATE = {"Time":"1970-01-01T00:00:05","Uptime":"0T00:00:07","UptimeSec":7,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":8,"MqttCount":0,"POWER":"OFF","Wifi":{"AP":1,"SSId":"lalala.net","BSSId":"FF:FF:FF:FF:FF:FF","Channel":1,"RSSI":100,"Signal":31,"LinkCount":1,"Downtime":"0T00:00:01"}}
00:00:06 QPC: Reset

So somehow IPV6 is mentioned but for it looks like I miss some build-parameters.
The documentation on having TASMOTA IP6 is quite weak.

Has anyone compiled TASMOTA with IPV6 and can give dedicated hints what settings in platformio.iniare necessary?
I am also curious if ESP-8266 is then turned into a single IPV6 stack or into a dual stack (IP4/IP6) device?

Kai

@altelch
Copy link
Contributor

altelch commented Sep 23, 2020 via email

@d-a-v
Copy link

d-a-v commented Sep 23, 2020

That example will work ;-)

@altelch
Copy link
Contributor

altelch commented Sep 23, 2020 via email

@altelch
Copy link
Contributor

altelch commented Sep 24, 2020

Hi,

IPv6 works with 8.5.0. Somehow platformio.ini isn't evaluated after changing DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH to DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH

Did also put a
#pragma message ("IPv6 compile time enabled!")
into support_wifi.ino in WifiBegin after #ifdef LWIP_IPv6 to see if this branch is compiled. After a few trials gitpod started to compile the whole project again and this time I got my above message during compile. The firmare works as expected:
00:00:05 WIF: Got IPv6 global address xxxx:xxxx:150:5ecf:7fff:fe88:xxxx

Greetings,

       Heiko.

@freifunkerffm
Copy link

Hello Heiko,
I tested it again with a freschly checked out TASMOTA : git clone https://github.com/arendst/Tasmota.git
I changed platformio.ini like that:
;-DPIO_FRAMEWORK_ARDUINO_LWIP3_HIGHER_BANDWIDTH_LOW_FLASH
-DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH
and used no user_config_override.h
But compiled it with platformio and not with gitpod.
I also added your pragma message in the support_wifi.ino.
That is visible in the build log:
Retrieved .pio/build/tasmota/libeec/ESP8266SdFat/FatLib/FatFileSFN.cpp.o' from cache /home/k/platformio-coreIP6/TasmotaIPV6/tasmota/support_wifi.ino: In function 'void WifiBegin(uint8_t, uint8_t)': /home/k/platformio-coreIP6/TasmotaIPV6/tasmota/support_wifi.ino:214:52: note: #pragma message: IPv6 compile time enabled! #pragma message ("IPv6 compile time enabled!") ^ Retrieved .pio/build/tasmota/libeec/ESP8266SdFat/FatLib/FatVolume.cpp.o' from cache

I pushed the bin via tasmotizer to the NodeMCU V3 board and got:
00:00:00 CFG: aus Flash geladen am F9, zählen 3
00:00:00 QPC: Count 1
00:00:00 Projekt tasmota Tasmota Version 8.5.0.1(tasmota)-2_7_4_1
00:00:00 HTP: Web-Server aktiv bei tasmota_40FABB-6843 mit IP-Adresse (IP unset)
00:00:01 RSL: tele/tasmota_40FABB/INFO1 = {"Module":"Sonoff Basic","Version":"8.5.0.1(tasmota)","FallbackTopic":"cmnd/DVES_40FABB_fb/","GroupTopic":"cmnd/tasmotas/"}
00:00:01 RSL: tele/tasmota_40FABB/INFO2 = {"WebServerMode":"Admin","Hostname":"tasmota_40FABB-6843","IPAddress":"(IP unset)","IPv6Address":""}
00:00:01 RSL: tele/tasmota_40FABB/INFO3 = {"RestartReason":"External System"}
00:00:01 RSL: stat/tasmota_40FABB/RESULT = {"POWER":"OFF"}
00:00:01 RSL: stat/tasmota_40FABB/POWER = OFF
00:00:01 RSL: homeassistant/discovery/807D3A40FABB/config = {"ip":"(IP unset)","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota_40FABB-6843","mac":"807D3A40FABB","md":"Sonoff Basic","ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"8.5.0.1","t":"tasmota_40FABB","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"btn":[1,0,0,0],"so":{"11":0,"13":0,"17":0,"20":0,"30":0,"37":1,"68":0,"73":0,"80":0},"lt_st":0,"ver":1}
00:00:05 RSL: tele/tasmota_40FABB/STATE = {"Time":"1970-01-01T00:00:05","Uptime":"0T00:00:07","UptimeSec":7,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":8,"MqttCount":0,"POWER":"OFF","Wifi":{"AP":1,"SSId":"","BSSId":"FF:FF:FF:FF:FF:FF","Channel":1,"RSSI":100,"Signal":31,"LinkCount":1,"Downtime":"0T00:00:01"}}
00:00:06 QPC: Reset

I noticed a new WLAN named ESP-40FABB I could join and found at 192.168.4.1 a new tasmota device to configure.
(no hint for that in the logging)
I just changed the WIFI credentials via GUI and got:

00:00:00 CFG: aus Flash geladen am F6, zählen 6
00:00:00 QPC: Count 1
00:00:00 Projekt tasmota Tasmota Version 8.5.0.1(tasmota)-2_7_4_1
00:00:00 HTP: Web-Server aktiv bei tasmota_40FABB-6843 mit IP-Adresse (IP unset)
00:00:01 RSL: tele/tasmota_40FABB/INFO1 = {"Module":"Generic","Version":"8.5.0.1(tasmota)","FallbackTopic":"cmnd/DVES_40FABB_fb/","GroupTopic":"cmnd/tasmotas/"}
00:00:01 RSL: tele/tasmota_40FABB/INFO2 = {"WebServerMode":"Admin","Hostname":"tasmota_40FABB-6843","IPAddress":"(IP unset)","IPv6Address":""}
00:00:01 RSL: tele/tasmota_40FABB/INFO3 = {"RestartReason":"Software/System restart"}
00:00:01 RSL: homeassistant/discovery/807D3A40FABB/config = {"ip":"(IP unset)","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota_40FABB-6843","mac":"807D3A40FABB","md":"Generic","ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"8.5.0.1","t":"tasmota_40FABB","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"btn":[0,0,0,0],"so":{"11":0,"13":0,"17":0,"20":0,"30":0,"37":1,"68":0,"73":0,"80":0},"lt_st":0,"ver":1}
00:00:05 RSL: tele/tasmota_40FABB/STATE = {"Time":"1970-01-01T00:00:05","Uptime":"0T00:00:07","UptimeSec":7,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":0,"Wifi":{"AP":1,"SSId":"lalala.net","BSSId":"FF:FF:FF:FF:FF:FF","Channel":1,"RSSI":100,"Signal":31,"LinkCount":1,"Downtime":"0T00:00:01"}}
00:00:06 QPC: Reset

After this the ESP-40FABB WIFI is not gone, but the ESP8266 detects the W-Lan Network.
So for me IPv6 is still not really usable
Is there a kind of command list to execute to get some more information about that.
I am happy to help, if I can

Kai

@freifunkerffm
Copy link

Hi all,
I gave it another go, this time I compliled the tasmota Development Branch: https://gitpod.io#https://github.com/arendst/Tasmota/tree/development via gitpod.
Just changed one line in platformio.ini , I replaced:
DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
with
DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH

And compiled a pure tasmota with: "platformio run -e tasmota"
Used tasmotizer to flash, and got again something I have already seen:

CFG: Loaded from flash at F8, Count 4
00:00:00 QPC: Count 1
00:00:00 Project tasmota Tasmota Version 8.5.0.1(tasmota)-2_7_4_1
00:00:00 HTP: Web server active on tasmota_40FABB-6843 with IP address (IP unset)
00:00:01 RSL: tele/tasmota_40FABB/INFO1 = {"Module":"Sonoff Basic","Version":"8.5.0.1(tasmota)","FallbackTopic":"cmnd/DVES_40FABB_fb/","GroupTopic":"cmnd/tasmotas/"}
00:00:01 RSL: tele/tasmota_40FABB/INFO2 = {"WebServerMode":"Admin","Hostname":"tasmota_40FABB-6843","IPAddress":"(IP unset)","IPv6Address":""}
00:00:01 RSL: tele/tasmota_40FABB/INFO3 = {"RestartReason":"External System"}

So sorry I am not able to confirm that IPV6 is working on a TASMOTA device.

Kai

@XenGi
Copy link

XenGi commented Feb 9, 2022

Another year went by and my tasmota devices still has no IPv6 support by default. It is still needed to compile tasmota by hand to enable that feature?

@barbudor
Copy link
Contributor

barbudor commented Feb 9, 2022

AFAIK, even by compiling with either hand or feet you won't get IPv6 running on Tasmota.
It's definitively not designed for it (all internal IP addresses representation are on 4 bytes)
And there is not much need to run a home automation system on an IPV6 network.

@Raja4Shekar
Copy link

Raja4Shekar commented Feb 23, 2022

There are so many places where public ipv4 address is not provided by ISP due to the use of CGNAT, so in those circumstances, ipv6 is too much useful. So many people will get benefited if Tasmota Support ipv6. Especially who are ardent in using Tasmota

Not sure if this link helps anyway
https://www.keithh.com/network/ipv6-setup-esp8266/

@redhat421
Copy link

I run Tasmota on a S31 w/ IPv6 enabled. It works.

I give it an address via SLAAC.
I have noted that if the router isn't handing out Router Advertisements, the device will hang for ~2 mins then come up with an IPv4 address only, so look out for that.

Thanks!

@XenGi
Copy link

XenGi commented Feb 23, 2022

Honestly you don't need to fish for NAT or IPv4 shortage reasons to support IPv6. It's the current version of the internet protocol and it is at this point over 20 years old. By not enabling it by default your basically building legacy systems.

So I think this ticket should be reopened. IPv6 support is still not enabled by default. I would rather use something that lacks IPv4 support than something without IPv6.

@RedBlackThunder
Copy link

I would like an IPv6-only option even more than dual stack.

@s-hadinger
Copy link
Collaborator

There is no plan for IPv6-only option in Tasmota. Why would you even want to not support IPv4 ?

@XenGi
Copy link

XenGi commented Feb 23, 2022

There is no plan for IPv6-only option in Tasmota. Why would you even want to not support IPv4 ?

Let me rephrase:
There is no plan for car only roads. Why would you even want to not support coaches.

IPv4 should be nothing more then a fallback. A widely used one for now. But hopefully things will finally change.

@kroon040
Copy link

Will there be ipv6 full support? Dual stack, with dhcpv6 and slaac? It's availiable in the esp-idf, so hopefullt soon in tasmota

@sfromis
Copy link
Contributor

sfromis commented Jul 16, 2022

As Tasmota is designed for internal networks, not the big bad Internet, the "real benefit" of IPv6 would be marginal at best. I certainly have no scarcity of IP addresses within the reserved ranges.

@kroon040
Copy link

Hi tested and look like same behaviour now as the esp8266. MQTT is fixed and routing works. What I noticed , as well on the esp8266 and esp32, your first have to place them in same subnet, than set mqtt to ipv6 , and that change to other subnet, and than it works. I will test later this week on flashing some more devices with this build on the esp8266 and esp32.

Tests results now on ESP32 (flashed 2 devices)

On same subnet (mqtt / tasmota / laptop)

  • - SLAAC works it get an ipv6 address. (global address)
  • - ping works to global address
  • - webui listen to the address, use http://[2001:xxxx:xxxx:xxxx]
  • - MQTT works
  • - got and ipv6 local (FE80).

On other subnet (mqtt / tasmota / laptop)

  • - SLAAC works it get an ipv6 address. (global address)
  • - ping works to global address
  • - webui listen to the address, use http://[2001:xxxx:xxxx:xxxx]
  • - MQTT works
  • - got and ipv6 local (FE80).

@Leseratte10
Copy link

Leseratte10 commented Dec 13, 2022

I don't think support for DHCPv6 is that important. Sure it should be implemented eventually, but I bet a fairly large amount of networks is going to work without that, too, as Android is also not supporting DHCPv6 due to a stupid design choice.

Though, it'd be cool to get DNS AAAA requests to work so you could for example connect to an IPv6-only MQTT broker or syslog server without having to hardcode an IP.

EDIT: Haven't been able to test the current builds yet, but thanks for all your work on updating Tasmota for IPv6!

EDIT 2: Has connecting to an IPv6-only OTA update server and/or an IPv6-only syslog server been tested yet? If not then I'll try doing that when I finally get to flashing that beta onto one of my devices.

EDIT 3: What about multiple prefixes, like one global prefix and a ULA? Has that been tested?

@kroon040
Copy link

@s-hadinger , compilation for tasmota32 is ok, but for the tastmoa32solo1 it fails


/home/richard/Tasmota-development/tasmota/tasmota_support/support_wifi.ino: In function 'String WifiFindIPv6(bool, const char*)':
/home/richard/Tasmota-development/tasmota/tasmota_support/support_wifi.ino:468:22: error: 'netif_list' was not declared in this scope
   for (netif* intf = netif_list; intf != nullptr; intf = intf->next) {
                      ^~~~~~~~~~
/home/richard/Tasmota-development/tasmota/tasmota_support/support_wifi.ino:468:22: note: suggested alternative: 'netif_mtu6'
   for (netif* intf = netif_list; intf != nullptr; intf = intf->next) {
                      ^~~~~~~~~~
                      netif_mtu6
/

etc

@s-hadinger
Copy link
Collaborator

IPv6 only OTA doesn't work for now because the safeboot partition doesn't support IPv6. We haven't decided yet if we include IPv6 in safeboot nor have identified the code size increase.

Syslog on IPv6 address should work but was not tested.

I doubt multiple prefixes nor ULA are supported by esp-idf. Anyways the underlying lib has a hard limit for 3 IPv6 addresses per interface: 1/ Local-link 2/ Global 3/ ???.

@s-hadinger
Copy link
Collaborator

@s-hadinger , compilation for tasmota32 is ok, but for the tastmoa32solo1 it fails

I suppose that it's because the Arduino/esp-idf lib is different from the Esp32 and does not yet include the IPv6 code. @Jason2866

@Jason2866
Copy link
Collaborator

@s-hadinger , compilation for tasmota32 is ok, but for the tastmoa32solo1 it fails


/home/richard/Tasmota-development/tasmota/tasmota_support/support_wifi.ino: In function 'String WifiFindIPv6(bool, const char*)':
/home/richard/Tasmota-development/tasmota/tasmota_support/support_wifi.ino:468:22: error: 'netif_list' was not declared in this scope
   for (netif* intf = netif_list; intf != nullptr; intf = intf->next) {
                      ^~~~~~~~~~
/home/richard/Tasmota-development/tasmota/tasmota_support/support_wifi.ino:468:22: note: suggested alternative: 'netif_mtu6'
   for (netif* intf = netif_list; intf != nullptr; intf = intf->next) {
                      ^~~~~~~~~~
                      netif_mtu6
/

etc

As expected, since solo1 is an extra different framework. There is no IPv6 version (yet).

@Jason2866
Copy link
Collaborator

Jason2866 commented Dec 14, 2022

@kroon040
You can try with solo1 now. To use the solo1 you have to add in platformio_override.ini

platform_packages = framework-arduino-solo1 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1092/framework-arduinoespressif32-solo1-release_v4.4-a0113c7bfe.zip

EDIT: Correct file where to place.

@kroon040
Copy link

I added this , but it fails . Must there be something more and define?

I have this now in user_config_override.h

#define USE_IPV6
platform_packages = framework-arduino-solo1 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1092/framework-arduinoespressif32-solo1-release_v4.4-a0113c7bfe.zip
Compiling .pio/build/tasmota32solo1/libca1/berry/be_bytecode.c.o
In file included from tasmota/my_user_config.h:1191,
                 from lib/libesp32/berry/src/../default/berry_conf.h:14,
                 from lib/libesp32/berry/src/berry_conf.h:1,
                 from lib/libesp32/berry/src/berry.h:14,
                 from lib/libesp32/berry/default/be_modtab.c:8:
tasmota/user_config_override.h:92:1: warning: data definition has no type or storage class
 platform_packages = framework-arduino-solo1 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1092/framework-arduinoespressif32-solo1-release_v4.4-a0113c7bfe.zip
 ^~~~~~~~~~~~~~~~~
tasmota/user_config_override.h:92:1: warning: type defaults to 'int' in declaration of 'platform_packages' [-Wimplicit-int]
tasmota/user_config_override.h:92:21: error: 'framework' undeclared here (not in a function)
 platform_packages = framework-arduino-solo1 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1092/framework-arduinoespressif32-solo1-release_v4.4-a0113c7bfe.zip

@Jason2866
Copy link
Collaborator

Jason2866 commented Dec 14, 2022

@kroon040 The framework stuff needs to go here
You can use this as platformio_override.ini just dl and rename.
Tested solo1 does compile successfull
Sorry i gave you a false info!

@kroon040
Copy link

It compiles and the ipv6 works also now on de esp32-solo1

@Jason2866
Copy link
Collaborator

Jason2866 commented Dec 14, 2022

Latest development has now in platformio_override_sample.ini all IPv6 framework versions. Just uncomment and enable IPv6 with #define USE_IPV6 in user_config_override.h
The frameworks should work with and without enabled IPv6.

@s-hadinger
Copy link
Collaborator

Hi all, IPv6 is progressing well. I have a working version of Ping for IPv6 (ICMP6) and a version of DNS resolver for IPv6 addresses (AAAA records) with the possibility to choose whether v4 or v6 has priority. I still have an issue with Ethernet dns resolver so it's not quite ready for release.

Stay tuned

@kroon040
Copy link

Latest development has now in platformio_override_sample.ini all IPv6 framework versions. Just uncomment and enable IPv6 with #define USE_IPV6 in user_config_override.h The frameworks should work with and without enabled IPv6.

@Jason2866
For the ESP8266, this is not yet in the platform_override.ini? This I see only in the platform.ini

@Jason2866
Copy link
Collaborator

@kroon040 For esp8266 there is no different framework needed. The used one is IPv6 ready. Just needs to be enabled with
-DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH build option instead of
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH

@s-hadinger
Copy link
Collaborator

With the latest PR, preliminary work for ipv6 is complete. Now dns works for AAAA records and ping works for ipv6 (ICMP6)

For DNS, in case of dual stack, ipv4 is prioritized unless you set SetOption149 1.

Please note that IPv6 only networks are not yet supported and yield to a crash after some time.

Please report any issue. I will also start a ipv6 page in the doc.

@s-hadinger
Copy link
Collaborator

s-hadinger commented Dec 17, 2022

For example, on a network with both v4 and v6 addresses:

ping www.wikipedia.org

11:19:18.467 MQT: stat/tasmota_B90B50/RESULT = {"Ping":"Done"}
11:19:19.534 MQT: tele/tasmota_B90B50/RESULT = {"Ping":{"www.wikipedia.org":{"Reachable":true,"IP":"185.15.58.224","Success":1,"Timeout":0,"MinTime":19,"MaxTime":19,"AvgTime":19}}}

SetOption149 1
ping www.wikipedia.org

11:20:04.673 MQT: stat/tasmota_B90B50/RESULT = {"Ping":"Done"}
11:20:05.786 MQT: tele/tasmota_B90B50/RESULT = {"Ping":{"www.wikipedia.org":{"Reachable":true,"IP":"2a02:ec80:600:ed1a::1","Success":1,"Timeout":0,"MinTime":13,"MaxTime":13,"AvgTime":13}}}

On the first call www.wikipia.org resolves to 185.15.58.224. With SetOption149 1, www.wikipedia.org resolves to 2a02:ec80:600:ed1a::1

@Jason2866
Copy link
Collaborator

Jason2866 commented Dec 17, 2022

For all ESP32x builds IPv6 support is now enabled with latest commit (Core 2.0.5.4).
You can use the latest precompiled development builds.

@Jason2866 Jason2866 added fixed Result - The work on the issue has ended and removed work in progress Action - Work in progress labels Dec 17, 2022
@s-hadinger
Copy link
Collaborator

There is now a documentation page dedicated to IPv6: https://tasmota.github.io/docs/IPv6/

@s-hadinger
Copy link
Collaborator

Closing this issue for now. Please reopen a new one if a problem is discovered.

@kroon040
Copy link

Hi,

I took the latest development todat and tried IPv6 with the esp8266. Changed the platformio.ini and add in the user_config_override.h

#define USE_IPV6

When compiling I get this error?

Compiling .pio/build/tasmota/src/tasmota.ino.cpp.o
In file included from tasmota/my_user_config.h:1202:0,
                 from /home/richard/Downloads/Tasmota-development/tasmota/tasmota.ino:27:
tasmota/user_config_override.h:91:8: error: macro names must be identifiers
 #define USE_IPV6
        ^
Archiving .pio/build/tasmota/lib947/libESP8266WiFi.a
Indexing .pio/build/tasmota/lib947/libESP8266WiFi.a
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SdCard/SdSpiCardEX.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SdCard/SdioCardEX.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SdCard/SdioTeensy.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SpiDriver/SdSpiESP8266.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SpiDriver/SdSpiParticle.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SpiDriver/SdSpiSAM3X.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SpiDriver/SdSpiSTM32.cpp.o
Compiling .pio/build/tasmota/libecc/ESP8266SdFat/SpiDriver/SdSpiTeensy3.cpp.o
Compiling .pio/build/tasmota/libc2a/SDFS/SDFS.cpp.o
Compiling .pio/build/tasmota/liba6e/SD/SD.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceBuffer.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceFS.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceFunction.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceHTTPStream.cpp.o
Archiving .pio/build/tasmota/libecc/libESP8266SdFat.a
Indexing .pio/build/tasmota/libecc/libESP8266SdFat.a
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceICYStream.cpp.o
Archiving .pio/build/tasmota/liba6e/libSD.a
Indexing .pio/build/tasmota/liba6e/libSD.a
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceID3.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourcePROGMEM.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceSD.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceSPIRAMBuffer.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileSourceSTDIO.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioFileStream.cpp.o
Archiving .pio/build/tasmota/libc2a/libSDFS.a
Indexing .pio/build/tasmota/libc2a/libSDFS.a
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioGeneratorAAC.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioGeneratorFLAC.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioGeneratorMIDI.cpp.o
Compiling .pio/build/tasmota/libb78/ESP8266Audio/AudioGeneratorMOD.cpp.o
*** [.pio/build/tasmota/src/tasmota.ino.cpp.o] Error 1
====================================================================== [FAILED] Took 13.19 seconds ======================================================================

Environment    Status    Duration
-------------  --------  ------------
tasmota        FAILED    00:00:13.186
================================================================= 1 failed, 0 succeeded in 00:00:13.186 ====

@sfromis
Copy link
Contributor

sfromis commented Dec 28, 2022

The location of the caret makes me suspect that the blank after #define may not be a "real" blank 0x20 but some other whitespace char, maybe a non-breaking space?

@kroon040
Copy link

Yes that was the problem, now it compiles .

@kroon040
Copy link

kroon040 commented Dec 28, 2022

Don't I have to put it any more for the esp8266 in the user_config_override.h? It looks like also for the esp8266 its enabled by default??? It compiles but get these warnings.

Compiling .pio/build/tasmota/src/tasmota.ino.cpp.o
In file included from tasmota/my_user_config.h:1202:0,
                 from /home/richard/Downloads/Tasmota-development/tasmota/tasmota.ino:27:
tasmota/user_config_override.h:96:0: warning: "USE_IPV6" redefined [enabled by default]
 #define USE_IPV6
 ^

@Jason2866
Copy link
Collaborator

Yes, it is now in Platformio.ini as define. It is here https://github.com/arendst/Tasmota/blob/development/platformio.ini#L102

@s-hadinger
Copy link
Collaborator

We have enabled RDNSS on esp32 to discover DNS servers on Ipv6. This is not enabled on esp8266 and would require a specific build of esp-idf. I was too lazy to try. If you are interested though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

Successfully merging a pull request may close this issue.