Code Monkey home page Code Monkey logo

esphome-nat-ap's People

Contributors

mag1024 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

esphome-nat-ap's Issues

5.1 compatability?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.