Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

5.1 compatability? #1

Open
alex-red opened this issue Oct 15, 2023 · 3 comments
Open

5.1 compatability? #1

alex-red opened this issue Oct 15, 2023 · 3 comments

Comments

@alex-red
Copy link

Hey, thanks for this!

I'm playing around with a esp32-c6 which requires the esp-idf 5.1 which has a lot of breaking changes, particularily with dhcps_set_option_info. I thought I would pick your brain to see if you had any ideas how I could adapt this to work with 5.1.

Error:

In file included from src/main.cpp:17:
src/nat-ap.h: In function 'void ap_config(esp_netif_t*)':
src/nat-ap.h:66:33: error: invalid use of incomplete type 'esp_netif_t' {aka 'struct esp_netif_obj'}
   66 |   dhcps_set_option_info(ap_netif->dhcps, 6, &dhcps_dns_value, sizeof(dhcps_dns_value));
      |                                 ^~
In file included from /data/cache/platformio/packages/framework-espidf/components/esp_netif/include/esp_netif.h:13,
                 from /data/cache/platformio/packages/framework-espidf/components/esp_wifi/include/esp_wifi_default.h:10,
                 from /data/cache/platformio/packages/framework-espidf/components/esp_wifi/include/esp_wifi.h:58,
                 from src/nat-ap.h:6:
/data/cache/platformio/packages/framework-espidf/components/esp_netif/include/esp_netif_types.h:47:8: note: forward declaration of 'esp_netif_t' {aka 'struct esp_netif_obj'}
   47 | struct esp_netif_obj;
      |        ^~~~~~~~~~~~~
src/nat-ap.h:69:31: error: invalid use of incomplete type 'esp_netif_t' {aka 'struct esp_netif_obj'}
   69 |   dhcps_dns_setserver(ap_netif->dhcps, &dnsserver);
      |                               ^~
/data/cache/platformio/packages/framework-espidf/components/esp_netif/include/esp_netif_types.h:47:8: note: forward declaration of 'esp_netif_t' {aka 'struct esp_netif_obj'}
   47 | struct esp_netif_obj;
      |        ^~~~~~~~~~~~~

My setup:

esphome:
  name: esp32-c6-a
  friendly_name: esp32-c6-a
  includes:
    - nat-ap.h
    
esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf
    version: 5.1.0
    platform_version: https://github.com/stintel/platform-espressif32#esp32-c6-test
    sdkconfig_options:
      CONFIG_COMPILER_OPTIMIZATION_SIZE: y
      CONFIG_LWIP_IP_FORWARD: y
      CONFIG_LWIP_IPV4_NAPT: y

I think this is how they want us to use it now: https://docs.espressif.com/projects/esp-faq/en/latest/software-framework/wifi.html#lwip-how-to-configure-the-option-contents-of-dhcp-server-in-esp-idf but I couldn't get it to work.

@mag1024
Copy link
Owner

mag1024 commented Oct 16, 2023

The 'incomplete type' seems to indicate that some include is missing.... but I haven't tried 5.x myself. Many esphome modules seem to not be compatible with version 5 yet.

@Bascht74

This comment was marked as off-topic.

@mag1024

This comment was marked as off-topic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants