Open jackpien opened 4 years ago
I understand the reason of this error. mbedTLS component should be configured to use pre share key. (using idf.py menuconfig). I did this configuration and solved it in sdkconfig.default. It should be applied to your configuration automatically I will double check why it's no applied. I will return with a solution.
пт, 30 окт. 2020 г. в 20:30, Jack Pien notifications@github.com:
Hi @dsryzhov https://github.com/dsryzhov
During ./idf.sh build, I get this error.
I doubled checked my "./idf.sh menuconfig" and believe I did everything in the README.
Do you see this error?
Thanks Jack
[895/945] Building CXX object esp-idf/...iFiClientSecure/src/ssl_client.cpp.obj FAILED: esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj ccache /opt/esp/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -Iconfig -I/home/espidf/ext_components/arduino/variants/esp32 -I/home/espidf/ext_components/arduino/cores/esp32 -I/home/espidf/ext_components/arduino/libraries/ArduinoOTA/src -I/home/espidf/ext_components/arduino/libraries/AsyncUDP/src -I/home/espidf/ext_components/arduino/libraries/BLE/src -I/home/espidf/ext_components/arduino/libraries/BluetoothSerial/src -I/home/espidf/ext_components/arduino/libraries/DNSServer/src -I/home/espidf/ext_components/arduino/libraries/EEPROM/src -I/home/espidf/ext_components/arduino/libraries/ESP32/src -I/home/espidf/ext_components/arduino/libraries/ESPmDNS/src -I/home/espidf/ext_components/arduino/libraries/FFat/src -I/home/espidf/ext_components/arduino/libraries/FS/src -I/home/espidf/ext_components/arduino/libraries/HTTPClient/src -I/home/espidf/ext_components/arduino/libraries/HTTPUpdate/src -I/home/espidf/ext_components/arduino/libraries/NetBIOS/src -I/home/espidf/ext_components/arduino/libraries/Preferences/src -I/home/espidf/ext_components/arduino/libraries/SD_MMC/src -I/home/espidf/ext_components/arduino/libraries/SD/src -I/home/espidf/ext_components/arduino/libraries/SimpleBLE/src -I/home/espidf/ext_components/arduino/libraries/SPIFFS/src -I/home/espidf/ext_components/arduino/libraries/SPI/src -I/home/espidf/ext_components/arduino/libraries/Ticker/src -I/home/espidf/ext_components/arduino/libraries/Update/src -I/home/espidf/ext_components/arduino/libraries/WebServer/src -I/home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src -I/home/espidf/ext_components/arduino/libraries/WiFi/src -I/home/espidf/ext_components/arduino/libraries/Wire/src -I/home/espidf/ext_components/arduino/cores/esp32/libb64 -I/opt/esp/idf/components/newlib/platform_include -I/opt/esp/idf/components/freertos/include -I/opt/esp/idf/components/heap/include -I/opt/esp/idf/components/log/include -I/opt/esp/idf/components/soc/esp32/include -I/opt/esp/idf/components/soc/include -I/opt/esp/idf/components/esp_rom/include -I/opt/esp/idf/components/esp_common/include -I/opt/esp/idf/components/xtensa/include -I/opt/esp/idf/components/xtensa/esp32/include -I/opt/esp/idf/components/esp32/include -I/opt/esp/idf/components/driver/include -I/opt/esp/idf/components/esp_ringbuf/include -I/opt/esp/idf/components/esp_event/include -I/opt/esp/idf/components/tcpip_adapter/include -I/opt/esp/idf/components/lwip/include/apps -I/opt/esp/idf/components/lwip/include/apps/sntp -I/opt/esp/idf/components/lwip/lwip/src/include -I/opt/esp/idf/components/lwip/port/esp32/include -I/opt/esp/idf/components/lwip/port/esp32/include/arch -I/opt/esp/idf/components/vfs/include -I/opt/esp/idf/components/esp_wifi/include -I/opt/esp/idf/components/esp_wifi/esp32/include -I/opt/esp/idf/components/esp_eth/include -I/opt/esp/idf/components/efuse/include -I/opt/esp/idf/components/efuse/esp32/include -I/opt/esp/idf/components/app_trace/include -I/opt/esp/idf/components/spi_flash/include -I/opt/esp/idf/components/mbedtls/port/include -I/opt/esp/idf/components/mbedtls/mbedtls/include -I/opt/esp/idf/components/mdns/include -I/opt/esp/idf/components/console -I/opt/esp/idf/components/esp_adc_cal/include -I/opt/esp/idf/components/fatfs/diskio -I/opt/esp/idf/components/fatfs/vfs -I/opt/esp/idf/components/fatfs/src -I/opt/esp/idf/components/wear_levelling/include -I/opt/esp/idf/components/sdmmc/include -I/opt/esp/idf/components/nvs_flash/include -I/opt/esp/idf/components/app_update/include -I/opt/esp/idf/components/bootloader_support/include -I/opt/esp/idf/components/spiffs/include -I/opt/esp/idf/components/openssl/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu++11 -fno-exceptions -fno-rtti -D_GNU_SOURCE -DIDF_VER="v4.0.1-441-g6093407d7" -DGCC_NOT_5_2_0 -DESP_PLATFORM -MD -MT esp-idf/arduino/CMakeFiles/idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj -MF esp-idf/arduino/CMakeFiles/idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj.d -o esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj -c /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:23:4: error: #error "Please configure IDF framework to include mbedTLS -> Enable pre-shared-key ciphersuites and activate at least one cipher" error "Please configure IDF framework to include mbedTLS -> Enable pre-shared-key ciphersuites and activate at least one cipher"
^~~~~
/home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp: In function 'int start_ssl_client(sslclient_context, const char, uint32_t, int, const char, const char, const char, const char, const char*)': /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:151:15: error: 'mbedtls_ssl_conf_psk' was not declared in this scope ret = mbedtls_ssl_conf_psk(&ssl_client->ssl_conf, psk, psk_len, ^
~~~~~~~ /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:151:15: note: suggested alternative: 'mbedtls_ssl_conf_sni' ret = mbedtls_ssl_conf_psk(&ssl_client->ssl_conf, psk, psk_len, ^~~~~~~~ mbedtls_ssl_conf_sni [904/945] Building CXX object esp-idf/.../libraries/WiFi/src/WiFiClient.cpp.obj ninja: build stopped: subcommand failed. ninja failed with exit code 1— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dsryzhov/hadabot_rds/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALDQF27M3RKKZZSE6HXQYDDSNLZ2XANCNFSM4TFHT7IQ .
Please check than this setting is enables in ./idf.sh menuconfig Component config > mbedTLS > TLS ket exchange method > Enable pre-shared-key ciphersuites > Enable PSK based cipersuites modes
It will add to your hadabotr_microros_firmware/sdkconfig params CONFIG_MBEDTLS_PSK_MODES=y CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
I've stored this params in sdkconfig.default https://github.com/dsryzhov/hadabot_rds/blob/master/hadabot_microros_firmware/sdkconfig.default
Your sdkconfig should be created based on sdkconfig.default I assume that by some reason this params was not transfered to your sdkconfig
Hi @dsryzhov
During ./idf.sh build, I get this error.
I doubled checked my "./idf.sh menuconfig" and believe I did everything in the README.
Do you see this error?
Thanks Jack
[895/945] Building CXX object esp-idf/...iFiClientSecure/src/ssl_client.cpp.obj FAILED: esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj ccache /opt/esp/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig -I/home/espidf/ext_components/arduino/variants/esp32 -I/home/espidf/ext_components/arduino/cores/esp32 -I/home/espidf/ext_components/arduino/libraries/ArduinoOTA/src -I/home/espidf/ext_components/arduino/libraries/AsyncUDP/src -I/home/espidf/ext_components/arduino/libraries/BLE/src -I/home/espidf/ext_components/arduino/libraries/BluetoothSerial/src -I/home/espidf/ext_components/arduino/libraries/DNSServer/src -I/home/espidf/ext_components/arduino/libraries/EEPROM/src -I/home/espidf/ext_components/arduino/libraries/ESP32/src -I/home/espidf/ext_components/arduino/libraries/ESPmDNS/src -I/home/espidf/ext_components/arduino/libraries/FFat/src -I/home/espidf/ext_components/arduino/libraries/FS/src -I/home/espidf/ext_components/arduino/libraries/HTTPClient/src -I/home/espidf/ext_components/arduino/libraries/HTTPUpdate/src -I/home/espidf/ext_components/arduino/libraries/NetBIOS/src -I/home/espidf/ext_components/arduino/libraries/Preferences/src -I/home/espidf/ext_components/arduino/libraries/SD_MMC/src -I/home/espidf/ext_components/arduino/libraries/SD/src -I/home/espidf/ext_components/arduino/libraries/SimpleBLE/src -I/home/espidf/ext_components/arduino/libraries/SPIFFS/src -I/home/espidf/ext_components/arduino/libraries/SPI/src -I/home/espidf/ext_components/arduino/libraries/Ticker/src -I/home/espidf/ext_components/arduino/libraries/Update/src -I/home/espidf/ext_components/arduino/libraries/WebServer/src -I/home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src -I/home/espidf/ext_components/arduino/libraries/WiFi/src -I/home/espidf/ext_components/arduino/libraries/Wire/src -I/home/espidf/ext_components/arduino/cores/esp32/libb64 -I/opt/esp/idf/components/newlib/platform_include -I/opt/esp/idf/components/freertos/include -I/opt/esp/idf/components/heap/include -I/opt/esp/idf/components/log/include -I/opt/esp/idf/components/soc/esp32/include -I/opt/esp/idf/components/soc/include -I/opt/esp/idf/components/esp_rom/include -I/opt/esp/idf/components/esp_common/include -I/opt/esp/idf/components/xtensa/include -I/opt/esp/idf/components/xtensa/esp32/include -I/opt/esp/idf/components/esp32/include -I/opt/esp/idf/components/driver/include -I/opt/esp/idf/components/esp_ringbuf/include -I/opt/esp/idf/components/esp_event/include -I/opt/esp/idf/components/tcpip_adapter/include -I/opt/esp/idf/components/lwip/include/apps -I/opt/esp/idf/components/lwip/include/apps/sntp -I/opt/esp/idf/components/lwip/lwip/src/include -I/opt/esp/idf/components/lwip/port/esp32/include -I/opt/esp/idf/components/lwip/port/esp32/include/arch -I/opt/esp/idf/components/vfs/include -I/opt/esp/idf/components/esp_wifi/include -I/opt/esp/idf/components/esp_wifi/esp32/include -I/opt/esp/idf/components/esp_eth/include -I/opt/esp/idf/components/efuse/include -I/opt/esp/idf/components/efuse/esp32/include -I/opt/esp/idf/components/app_trace/include -I/opt/esp/idf/components/spi_flash/include -I/opt/esp/idf/components/mbedtls/port/include -I/opt/esp/idf/components/mbedtls/mbedtls/include -I/opt/esp/idf/components/mdns/include -I/opt/esp/idf/components/console -I/opt/esp/idf/components/esp_adc_cal/include -I/opt/esp/idf/components/fatfs/diskio -I/opt/esp/idf/components/fatfs/vfs -I/opt/esp/idf/components/fatfs/src -I/opt/esp/idf/components/wear_levelling/include -I/opt/esp/idf/components/sdmmc/include -I/opt/esp/idf/components/nvs_flash/include -I/opt/esp/idf/components/app_update/include -I/opt/esp/idf/components/bootloader_support/include -I/opt/esp/idf/components/spiffs/include -I/opt/esp/idf/components/openssl/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu++11 -fno-exceptions -fno-rtti -D_GNU_SOURCE -DIDF_VER=\"v4.0.1-441-g6093407d7\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -MD -MT esp-idf/arduino/CMakeFiles/idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj -MF esp-idf/arduino/CMakeFiles/idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj.d -o esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/WiFiClientSecure/src/ssl_client.cpp.obj -c /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:23:4: error: #error "Please configure IDF framework to include mbedTLS -> Enable pre-shared-key ciphersuites and activate at least one cipher"
error "Please configure IDF framework to include mbedTLS -> Enable pre-shared-key ciphersuites and activate at least one cipher"
/home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp: In function 'int start_ssl_client(sslclient_context, const char, uint32_t, int, const char, const char, const char, const char, const char*)': /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:151:15: error: 'mbedtls_ssl_conf_psk' was not declared in this scope ret = mbedtls_ssl_conf_psk(&ssl_client->ssl_conf, psk, psk_len, ^
~~~~~~~ /home/espidf/ext_components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:151:15: note: suggested alternative: 'mbedtls_ssl_conf_sni' ret = mbedtls_ssl_conf_psk(&ssl_client->ssl_conf, psk, psk_len, ^~~~~~~~ mbedtls_ssl_conf_sni [904/945] Building CXX object esp-idf/.../libraries/WiFi/src/WiFiClient.cpp.obj ninja: build stopped: subcommand failed. ninja failed with exit code 1