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

C6 Support? #601

Open
Roarrk opened this issue Jun 26, 2023 · 11 comments
Open

C6 Support? #601

Roarrk opened this issue Jun 26, 2023 · 11 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Roarrk
Copy link

Roarrk commented Jun 26, 2023

Describe your problem
I'm unable to get esp32-c6 working. Specifically espressif esp32-c6-wroom1. Trying to find the correct bootloader/firmware, but it seems like the esp-idf that the tasmota firmware is based on is running on v 4.4 which does not support c6 yet?

@gskjold
Copy link
Member

gskjold commented Jul 1, 2023

As far as I can tell this boils down to arduino-esp32 using idf 4.4 in their current releases (https://github.com/espressif/arduino-esp32/releases) , and no, it does not support c6

@gskjold
Copy link
Member

gskjold commented Jul 27, 2023

espressif/esp-idf#10423

@Hedda
Copy link

Hedda commented Aug 17, 2023

Require waiting for Arduino Core release based on ESP-IDF 5.1 that support ESP32-C6, so follow -> espressif/arduino-esp32#7852

@Jason2866
Copy link

@gskjold Seems your project is using our fork of Platformio/Arduino.
Don't hesitate to test the experimental build for C6 based on Arduino 3.0/IDF5.1

platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1511/framework-arduinoespressif32-release_v5.1-90b05eff62.zip

@gskjold
Copy link
Member

gskjold commented Aug 24, 2023

Thanks @Jason2866 , OneWireNg would not build, so I have stripped dallas temperature sensor from the code for the moment. The build runs, but the linker fails with the following:

/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::stop()':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:98: undefined reference to `stop_ssl_socket(sslclient_context*, char const*, char const*, char const*)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::read(unsigned char*, unsigned int)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:232: undefined reference to `get_ssl_receive(sslclient_context*, unsigned char*, int)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::available()':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:246: undefined reference to `data_to_read(sslclient_context*)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::write(unsigned char const*, unsigned int)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:202: undefined reference to `send_ssl_data(sslclient_context*, unsigned char const*, unsigned int)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::WiFiClientSecure()':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:37: undefined reference to `ssl_init(sslclient_context*)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::connect(IPAddress, unsigned short, char const*, char const*, char const*, char const*)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:141: undefined reference to `start_ssl_client(sslclient_context*, IPAddress const&, unsigned long, char const*, int, char const*, bool, char const*, char const*, char const*, char const*, bool, char const**)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::connect(char const*, unsigned short, char const*, char const*)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:163: undefined reference to `start_ssl_client(sslclient_context*, IPAddress const&, unsigned long, char const*, int, char const*, bool, char const*, char const*, char const*, char const*, bool, char const**)'

Do you have any pointers on how to fix this?

EDIT: Branch with current changes, use env esp32c6: https://github.com/UtilitechAS/amsreader-firmware/tree/esp32c6_testing

@gskjold gskjold self-assigned this Aug 24, 2023
@gskjold gskjold added the enhancement New feature or request label Aug 24, 2023
@gskjold gskjold added this to the v2.3.0 milestone Aug 24, 2023
@Jason2866
Copy link

@gskjold We have modified OneWire from Paul Stoffregen to work with C2 and C6.
You find the modified lib here https://github.com/arendst/Tasmota/tree/development/lib/lib_basic/OneWire-Stickbreaker

@Jason2866
Copy link

Jason2866 commented Aug 24, 2023

Are you using the inbuilt https Client/Server? If yes you can't use the fork.
We have removed some Crypto Protocols from mbedtls (real fat...). We do not use mbedtls at all, since it is big and resource hungry. We use BearSSL.
If code is working as expected you can use build https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1532/framework-arduinoespressif32-release_v5.1-303acc246e.zip
We have no Linker warnings, since NOT using WifiClientSecure.

Tasmota Fork based on Arduino 3.0, will not include mbedtls crypto ciphers for ALL ESP32 MCUs. That's a breaking change we have decided.

@gskjold
Copy link
Member

gskjold commented Aug 24, 2023

Thanks, good to know. I am using the built in WebServer and HTTPClient as well as WiFiClient and WiFiClientSecure. I had a plan once to swap out the webserver, but never got that far. Any suggestions on best replacements for http server and client?

I use mbedtls in the code as well, but I can easily swap that out with bearssl.

@Jason2866
Copy link

Jason2866 commented Aug 24, 2023

Not really, since we don't use https with Webfrontend. Using the the standard http client from Arduino. For https OTA updates we have written our own https implementation with Berry we have included in every Tasmota32 variant.
The WifiClient is working. The needed cyphers for this are still there.
So everything is working from Arduino as long "secure" is not used.

@gskjold
Copy link
Member

gskjold commented Sep 16, 2023

@Jason2866 Is WiFiClientSecure stripped out for good? If so, what is the best way to communicate with a API over HTTPS?

@Jason2866
Copy link

Jason2866 commented Sep 16, 2023

Yes, we stripped mbedtls since it uses a lot of flash and RAM. We are using BearSSL
https://github.com/arendst/Tasmota/tree/development/lib/libesp32/HttpClientLight

@gskjold gskjold modified the milestones: v2.3.0, Future Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants