POST /api/streaming's JSON parser only accepted "http://" URLs, rejecting any "https://" URL with invalid_json before ever attempting a connection. Nearly every real internet radio stream today is HTTPS- only, so this made the feature fail for essentially any station a user would actually try. Two changes were needed together: the parser now accepts both http:// and https://, and web_radio_stream.cpp's esp_http_client now attaches ESP-IDF's built-in CA certificate bundle (crt_bundle_attach) so the TLS handshake actually verifies -- CONFIG_MBEDTLS_CERTIFICATE_BUNDLE was already enabled in sdkconfig but never wired up here. Requires adding mbedtls to main's PRIV_REQUIRES (esp_crt_bundle.h lives there). Confirmed live: an https:// stream URL now gets accepted by the API and produces a real HTTP response (404, from a guessed-wrong path) -- before this fix it never reached the network at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
20 lines
737 B
CMake
20 lines
737 B
CMake
idf_component_register(
|
|
SRCS
|
|
"main.cpp"
|
|
"hardware_bootstrap.cpp"
|
|
"web_radio_stream.cpp"
|
|
"esp32_i2s_sink.cpp"
|
|
"phone_stream.cpp"
|
|
"antenna_calibration.cpp"
|
|
"$<$<BOOL:${CONFIG_TEST_FIRMWARE}>:test_firmware.cpp>"
|
|
"$<$<BOOL:${CONFIG_I2S_SDATA_PROBE}>:i2s_sdata_probe.cpp>"
|
|
"$<$<BOOL:${CONFIG_ESP32_I2S_TEST_TONE}>:esp32_i2s_test_tone.cpp>"
|
|
INCLUDE_DIRS "."
|
|
REQUIRES core net secure_store adau1701 si4684 tuner audio bt1035 bluetooth station integration ota eeprom24aa webradio driver
|
|
PRIV_REQUIRES esp_timer esp_http_client mbedtls
|
|
)
|
|
|
|
if(CONFIG_TEST_FIRMWARE)
|
|
set(EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS}" "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
endif()
|