Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:40 10 Mar 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : VS1053 & PICO Questions

Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1041
Posted: 12:34am 09 Mar 2026
Copy link to clipboard 
Print this post

I have finally found time to have a play with the VS1053 module and the PicoW. I have the code written by Peter working ok but I cannot get the code written by Tassie Jim to work. I would like to listen to some local content and have tried to enter Jims strings into Peters code and Peters string into Jims code but I think I have a lack of understanding on how these streams are addressed as I have had no success.

Any help much appreciated

OA47
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6492
Posted: 04:38am 09 Mar 2026
Copy link to clipboard 
Print this post

I don't have a webmite and VS1053 set up but:

My code

SUB listen url$
LOCAL q$, a$, strm$, k%
IF UCASE$(LEFT$(url$,7)) = "HTTP://" THEN url$ = MID$(url$,8)
r% = 0 : w% = 0
k% = INSTR(url$,"/")
a$ = LEFT$(url$,k%-1)
strm$ = MID$(url$,k%)
PRINT a$
PRINT strm$
q$="GET "
INC q$, strm$
INC q$," HTTP/1.1\r\n"
INC q$,"Host: "
INC q$,a$
INC q$,"\r\nConnection: close\r\n\r\n"

PLAY STREAM buff%(), r%, w%
WEB OPEN TCP STREAM a$,80
WEB TCP CLIENT STREAM q$, buff%(), r%, w%
END SUB

Peters code

' create the request for the radio site (ClassicFM)
Dim a$="ice-the.musicradio.com"
Dim q$="GET "
Inc q$,"/ClassicFMMP3"
Inc q$," HTTP/1.1\r\n"
Inc q$,"Host: "
Inc q$,a$
Inc q$,"\r\nConnection: close\r\n\r\n"

using an example from my code,

url$ = "live-radio02.mediahubaustralia.com/JAZW/mp3/"

in Peters code a$ is the url$ up to the first '/'

the rest of the url$ is the stream (where Peter has "/ClassicFMMP3")
moddified Peters code

Dim a$="live-radio02.mediahubaustralia.com"
Dim q$="GET "
Inc q$,"/JAZW/mp3/"
Inc q$," HTTP/1.1\r\n"
Inc q$,"Host: "
Inc q$,a$
Inc q$,"\r\nConnection: close\r\n\r\n"


Getting the spaces correct is important.

Jim
https://www.thebackshed.com/forum/ViewTopic.php?TID=16391&P=3#217896
VK7JH
MMedit
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1041
Posted: 05:21am 09 Mar 2026
Copy link to clipboard 
Print this post

Jim, thankyou for your reply.
Here is a snippet of the code I am using:
'Code updated for the latest version RC15 syntax just posted
Option escape
Option explicit
Option default none
' create the request for the radio site (ClassicFM)
Dim a$="live-radio02.mediahubaustralia.com"
Dim q$="GET "
Inc q$,"/JAZW/mp3/"

'Dim a$="ice-the.musicradio.com"
'Dim q$="GET "
'Inc q$,"/ClassicFMMP3"


Inc q$," HTTP/1.1\r\n"
Inc q$,"Host: "
Inc q$,a$
Inc q$,"\r\nConnection: close\r\n\r\n"


I am only changing 3 lines of code (Rem'd out the original of Peters) Peters url working but ABC not working.

OA47
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1041
Posted: 05:38am 09 Mar 2026
Copy link to clipboard 
Print this post

Jim, I have just found the list of urls for Global Streaming in the UK and other addresses work fine. I am thinking the issue is with the mediahubaustralia urls not functioning. Is there a subscription needed to access these?

OA47
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6492
Posted: 06:59am 09 Mar 2026
Copy link to clipboard 
Print this post

Try pasting this link into your browser
HTTP://live-radio02.mediahubaustralia.com/JAZW/mp3/

It works for me

Jim
VK7JH
MMedit
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1041
Posted: 08:14am 09 Mar 2026
Copy link to clipboard 
Print this post

Jim, I agree the link does work in the browser.

NO Audio
Connected
a$=live-radio02.mediahubaustralia.com
q$=GET /JAZW/mp3/ HTTP/1.1
Host: live-radio02.mediahubaustralia.com


OK Audio
Connected
a$=ice-the.musicradio.com
q$=GET /ClassicFMMP3 HTTP/1.1
Host: ice-the.musicradio.com


Is there a chance that the length of the string (q$) is too long when put behind the WEB TCP Client Stream command? I have tried with and without the SLANT following the /mp3.

OA47
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5753
Posted: 08:23am 09 Mar 2026
Copy link to clipboard 
Print this post

Maybe the MP3 itself is not compatible with the VS1053 module (bitrate?).
The pico only transfers data to the VS1053.

Or the site is HTTPS in stead of HTTP.

Volhout
Edited 2026-03-09 18:25 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11032
Posted: 08:33am 09 Mar 2026
Copy link to clipboard 
Print this post

The streaming support in the VS1053 is quite primitive. There are lots of internet radio stations that it can't receive. For example the BBC uses HLS/DASH which isn't supported. ClassicFM uses the older HTTP streaming with AAC at 48 kbps which is supported. You can use various directories to filter which stations are compatible (AACMix, Internet‑Radio.com etc.)
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6492
Posted: 10:26am 09 Mar 2026
Copy link to clipboard 
Print this post

The stream DID work with the webmite and VS1053 2 years ago when I posted the code.

I can't test it for the next few days.

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6492
Posted: 08:11pm 09 Mar 2026
Copy link to clipboard 
Print this post

The link I posted a few posts ago redirects to
https://abc.streamguys1.com/live/abcjazz/icecast.audio

but it does also work OK without the 's'
http://abc.streamguys1.com/live/abcjazz/icecast.audio

so if you put the other address from my original post into your web browser and se where it gets redirected to

Finally, try the new address without the 's in https

Jim
VK7JH
MMedit
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026