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

upgrade to Idf v5.3.2, added esp32c6 #70

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

upgrade to Idf v5.3.2, added esp32c6 #70

wants to merge 12 commits into from

Conversation

hathach
Copy link
Member

@hathach hathach commented Mar 12, 2025

based on @dhalbert WIP https://github.com/dhalbert/nina-fw/tree/idf-5.x
This PR update idf to v5.3.2 and added esp32c6. What have done:

  • Wifi tested worked with both esp32 and esp32c6 using simple wifitest sketch with metro m4
  • Use log_i()/log_d() from arduino-esp32, log_d() is enabled with CMAKE_BUILD_TYPE=DEBUG. debug mode is also initialized to true with debug type.
  • fixed compile error and spis setting with esp32c6
  • ci compile both esp32 & esp32c6 target with release & debug build

Need to do

  • More complicated such as ssl socket test. Update SSL client failed to connect
  • Tet with rp2350 + esp32c6 combo since it is what @ladyada plan to test with
  • test bluetooth (classic) hci mode for esp32 via uart
  • add/test bleutooth ble hci mode for esp32c6 via uart
  • figure out how to do the GPIO0 available pin (netif input hook code right now is commented out because it was crashing). Danh's comment
    The GPIO0 available-data pin will be a bit of work. In the old code, it hooked its own routine to netif->input, which checked for an incoming packet being available, and set the pin. I tried to do the same kind of thing, but it was trickier because they've made it harder to get to the netif. I had to use one or two private .h #include's . It may just be a C vs C++ thing that was causing it to crash.
    I can think of two other ways to do this besides doing it the old way: 1. use IPV4_INPUT_HOOK (I think that's not exactly the name, but it has _HOOK in it), which compiles in a hook routine in lwip. But that requires recompiling the already-compiled arduino-esp32 libraries, I think. 2. Don't use a hook at all, and instead just use some polling task that checks periodically for an incoming packet using .available() or whatever.
    

@ladyada
Copy link
Member

ladyada commented Mar 12, 2025

ok let me know when you want me to test it!

@hathach
Copy link
Member Author

hathach commented Mar 12, 2025

It still has issue with SSL connection, still troubleshooting, maybe certificate-related. Dan does mention it previously HTTPS not working: I need to add explicit calls to use the root cert bundle in the certificate partition

[  7750][D][NetworkManager.cpp:83] hostByName(): Clearing DNS cache
[  7861][D][NetworkManager.cpp:127] hostByName(): DNS found IPv4 146.75.112.159
[  7869][I][NetworkClientSecure.cpp:153] connect(): Actual TLS start postponed.
[  7878][E][NetworkClientSecure.cpp:159] connect(): start_ssl_client: connect failed: -1
[  7889][I][sketch.ino.cpp:64] dumpBuffer(): RESPONSE: 

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

Successfully merging this pull request may close these issues.

3 participants