Skip to content

About VS1053 example #2071

@Frank-Bemelman

Description

@Frank-Bemelman

Problem Description

Trying to make an internet radio, and of course I have more urls to play with than just the example.
Many urls work just fine, certainly the one used in the example.
But many other give problems.

Here is one example, trying to connect to http://theoldiestation.dyndns.org:8020/stream.mp3 which is in fact a dead link.
If I try that link in a webbrowser, I immediately get a response from the browser that this url is unreachable, which is ok.

Below is dump from the serial monitor in Arduino IDE 2.3.6:

18:04:43.986 -> url.begin ->http://theoldiestation.dyndns.org:8020/stream.mp3
18:04:46.955 -> [E] HttpRequest.h : 243 - Connect failed
18:04:50.459 -> [E] MetaDataICY.h : 246 - icy-metaint not defined
18:04:50.505 -> [W] ICYStreamT.h : 77 - url does not provide metadata
18:04:50.505 -> url.begin finished -> time elapsed = 6521
18:04:50.505 -> url Started with bool result: 1

  Serial.printf("url.begin ->%s\n", RequestedStationUrl);
  lapMillis = millis(); 
  return_result = url.begin(RequestedStationUrl,"audio/mpeg"); // what about "audio/mp3"
  currentMillis = millis(); 
  Serial.printf("url.begin finished -> time elapsed = %ld\n", (currentMillis = millis()) - lapMillis);
  
  if(return_result==1){
    Serial.println("url Started with bool result: 1");

The serial output reports connect failed but takes almost 3 seconds to find out. (yes I changed #define URL_CLIENT_TIMEOUT 3000;)
My webbrowser decides in a tenth of second about this. Is there any reason to keep this URL_CLIENT_TIMEOUT so high?

Secondly, there is the question why does url.begin(..... return a solid 1 while obviously it is not succesful?

Thanks in advance for any clarifications!

Frank.

Device Description

Board ESPWROOM-DA

Sketch

Just a snippet...

      Serial.printf("url.begin ->%s\n", RequestedStationUrl);
      lapMillis = millis(); 
      return_result = url.begin(RequestedStationUrl,"audio/mpeg"); // what about "audio/mp3"
      currentMillis = millis(); 
      Serial.printf("url.begin finished -> time elapsed = %ld\n", (currentMillis = millis()) - lapMillis);
      
      if(return_result==1){
        Serial.println("url Started with bool result: 1");

Other Steps to Reproduce

No response

What is your development environment (incl. core version info)

No response

I have checked existing issues, discussions and online documentation

  • I confirm I have checked existing issues, discussions and online documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions