schreibfaul1 / ESP32-audioI2S

Play mp3 files from SD via I2S
GNU General Public License v3.0
1.12k stars 288 forks source link

SSL error A buffer is too small to receive or write a message #353

Closed tv4you2016 closed 2 years ago

tv4you2016 commented 2 years ago

Hello @schreibfaul1 I'm trying to play this url https://22533.live.streamtheworld.com/RFMONTHEROCKAAC.aac

and not work

[161968][E][ssl_client.cpp:37] _handle_error(): [send_ssl_data():375]: (-27136) SSL - A buffer is too small to receive or write a message

below I leave the log to see if you can help me

[161002][I][ESP32-iSND1W.ino:1360] audio_info(): audio_info : Connect to new host: "https://22533.live.streamtheworld.com/RFMONTHEROCKAAC.aac"
[161013][V][ssl_client.cpp:324] stop_ssl_socket(): Cleaning SSL connection.
[161024][I][ESP32-iSND1W.ino:1360] audio_info(): audio_info : buffers freed, free Heap: 91559 bytes
[161031][I][ESP32-iSND1W.ino:1360] audio_info(): audio_info : The host has disconnected, reconnecting
[161040][V][ssl_client.cpp:62] start_ssl_client(): Free internal heap before TLS 91559
[161049][V][ssl_client.cpp:68] start_ssl_client(): Starting socket
[161107][V][ssl_client.cpp:149] start_ssl_client(): Seeding the random number generator
[161108][V][ssl_client.cpp:158] start_ssl_client(): Setting up the SSL/TLS structure...
[161113][D][ssl_client.cpp:179] start_ssl_client(): WARNING: Skipping SSL Verification. INSECURE!
[161123][V][ssl_client.cpp:257] start_ssl_client(): Setting hostname for TLS session...
W [161132][V][ssl_client.cpp:272] start_ssl_client(): Performing the SSL/TLS handshake...
(162318) wifi:<ba-add>idx:1 (ifx:0, 5c:a6:e6:69:14:ea), tid:1, ssn:12, winSize:64
[161802][V][ssl_client.cpp:293] start_ssl_client(): Verifying peer X.509 certificate...
[161802][V][ssl_client.cpp:301] start_ssl_client(): Certificate verified.
[161807][V][ssl_client.cpp:316] start_ssl_client(): Free internal heap after TLS 70995
[161816][V][ssl_client.cpp:62] start_ssl_client(): Free internal heap before TLS 70995
[161824][V][ssl_client.cpp:68] start_ssl_client(): Starting socket
[161882][V][ssl_client.cpp:149] start_ssl_client(): Seeding the random number generator
[161884][V][ssl_client.cpp:158] start_ssl_client(): Setting up the SSL/TLS structure...
[161889][D][ssl_client.cpp:179] start_ssl_client(): WARNING: Skipping SSL Verification. INSECURE!
[161898][V][ssl_client.cpp:257] start_ssl_client(): Setting hostname for TLS session...
[161907][V][ssl_client.cpp:272] start_ssl_client(): Performing the SSL/TLS handshake...
[161916][V][ssl_client.cpp:293] start_ssl_client(): Verifying peer X.509 certificate...
[161924][V][ssl_client.cpp:301] start_ssl_client(): Certificate verified.
[161932][V][ssl_client.cpp:316] start_ssl_client(): Free internal heap after TLS 46899
[161940][I][ESP32-iSND1W.ino:1360] audio_info(): audio_info : SSL has been established in 124 ms, free Heap: 46899 bytes
[161952][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 203 bytes...
[161961][V][ssl_client.cpp:374] send_ssl_data(): Handling error -27136
[161968][E][ssl_client.cpp:37] _handle_error(): [send_ssl_data():375]: (-27136) SSL - A buffer is too small to receive or write a message
[161983][V][ssl_client.cpp:324] stop_ssl_socket(): Cleaning SSL connection.
schreibfaul1 commented 2 years ago

the url works for me 20:50:28 AUDIO_info: Connect to new host: "https://22533.live.streamtheworld.com/RFMONTHEROCKAAC.aac" 20:50:28 AUDIO_info: buffers freed, free Heap: 152132 bytes 20:50:29 AUDIO_info: SSL has been established in 706 ms, free Heap: 106600 bytes 20:50:29 icy-url: .. https://rfm.sapo.pt/ouviremissaorfmontherock/SWZZdm5GVm45UGk3RGpmVEJWd3FWM3YxaDY3SmxWOWlORWVISS8vR3hFZz0 20:50:29 AUDIO_info: AACDecoder has been initialized, free Heap: 83060 bytes 20:50:29 lastURL: .. https://22533.live.streamtheworld.com/RFMONTHEROCKAAC.aac 20:50:30 AUDIO_info: stream ready 20:50:30 AUDIO_info: syncword found at pos 0 20:50:30 AUDIO_info: Channels: 2 20:50:30 AUDIO_info: SampleRate: 22050 20:50:30 AUDIO_info: BitsPerSample: 16 20:50:30 AUDIO_info: BitRate: 59259 20:50:30 AUDIO_info: AAC HeaderFormat: ADTS 20:50:30 AUDIO_info: AAC Codec: MPEG-4 20:50:30 AUDIO_info: AAC Profile: LowComplexity 20:50:30 AUDIO_info: VBR recognized, audioFileDuration is estimated

I suspect a memory problem, please try another partition e.g. huge_app

tv4you2016 commented 2 years ago

My Settings:

platform = https://github.com/platformio/platform-espressif32.git board = esp32dev framework = arduino monitor_filters = direct esp32_exception_decoder monitor_speed = 115200

board_upload.flash_size = 8MB build_flags = -DCORE_DEBUG_LEVEL=5 -DAUDIOKIT_BOARD=3 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue board_build.flash_mode = dio board_build.partitions = default_8MB.csv board_build.f_flash = 80000000L

Upload RAM: [== ] 15.8% (used 51876 bytes from 327680 bytes) Flash: [=== ] 32.2% (used 1076837 bytes from 3342336 bytes)

does not work