BBC Radio

Raspberry Pi related support

BBC Radio

Postby ICLlP » 08 Nov 2014, 19:54

Can anyone tell me how to get BBC internet radio working? I've had no luck so far.
ICLlP
 
Posts: 88
Joined: 30 Apr 2014, 07:52

Re: BBC Radio

Postby aj78 » 08 Nov 2014, 20:54

Yes, I can help. I've posted a rough guide to how to do it in the DIY and Tweaks forum. Have a look at that and see how you get on; feel free to ask if you need more assistance.
aj78
 
Posts: 51
Joined: 29 Oct 2014, 20:42

Re: BBC Radio

Postby ICLlP » 09 Nov 2014, 19:21

I'm struggling. I read the other thread, but I'm still not sure exactly what I need to do.

I need a dummies' version of the instructions.
ICLlP
 
Posts: 88
Joined: 30 Apr 2014, 07:52

Re: BBC Radio

Postby aj78 » 09 Nov 2014, 20:03

OK, here we go:

1. You need to get shell access to your RuneAudio machine. If you're on Linux / BSD, open a terminal and type 'ssh -l root runeaudio.local'. The default password is 'rune'; now might be a good time to change it if you're concerned about the security of your device. (To do so, type 'passwd'.) If you're on a Windows computer, download PuTTY from this page: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (there's a Windows installer some way down the list of download links). I haven't used the Windows version in some time but it should be fairly self explanatory.

2. Once you're logged in, type the following:
Code: Select all
cd /usr/local/bin

Code: Select all
nano bbc.sh


Type the following into the editor window that has just opened (or copy and paste it from here):
Code: Select all
#!/bin/sh
cd /mnt/MPD/Webradio
wget http://www.bbc.co.uk/radio/listen/live/r1_aaclca.pls
mv r1_aaclca.pls BBCRadio1.pls
wget http://www.bbc.co.uk/radio/listen/live/r1x_aaclca.pls
mv r1x_aaclca.pls BBCRadio1Xtra.pls
wget http://www.bbc.co.uk/radio/listen/live/r2_aaclca.pls
mv r2_aaclca.pls BBCRadio2.pls
wget http://www.bbc.co.uk/radio/listen/live/r3_aaclca.pls
mv r3_aaclca.pls BBCRadio3.pls
wget http://www.bbc.co.uk/radio/listen/live/r4_aaclca.pls
mv r4_aaclca.pls BBCRadio4.pls
wget http://www.bbc.co.uk/radio/listen/live/r4x_aaclca.pls
mv r4x_aaclca.pls BBCRadio4Extra.pls
wget http://www.bbc.co.uk/radio/listen/live/r5l_aaclca.pls
mv r5l_aaclca.pls BBCRadio5Live.pls
wget http://www.bbc.co.uk/radio/listen/live/r5lsp_aaclca.pls
mv r5lsp_aaclca.pls BBCRadio5LiveSportsExtra.pls
wget http://www.bbc.co.uk/radio/listen/live/r6_aaclca.pls
mv r6_aaclca.pls BBCRadio6.pls
wget http://www.bbc.co.uk/radio/listen/live/ran_aaclca.pls
mv ran_aaclca.pls BBCAsianNetwork.pls
mpc update Webradio


You can comment out any you don't care about by putting a # symbol at the start of the line. Now exit and save by pressing Ctrl-X then Y and then Enter to accept the name of the file. In case you're worried about the impact of updating your database frequently, notice that the last line is specific - it doesn't update the whole database, just the Webradio folder. Very quick, very minimal processor overhead especially since the RuneOS is so optimised.

3. Then make the file executable. Type:
Code: Select all
chmod +x bbc.sh


4. Now add it to your root crontab. Type
Code: Select all
EDITOR=nano crontab -e

This will open an editor with your crontab. Type in the following:
Code: Select all
0 * * * * /usr/local/bin/bbc.sh

This makes cron run the command /usr/local/bin/bbc.sh at 0 minutes past every hour, every day of the month.
You need to exit the editor and save, again by pressing Ctrl-X, Y, Enter.

5. Cron isn't activated by default on RuneAudio, to save resources. Fortunately cron is very lightweight and we're not asking it to do very much, so the impact of enabling it again is very minimal. You can enable it by typing
Code: Select all
systemctl enable cronie
and then start it by typing:
Code: Select all
systemctl start cronie
Enabling means it will start at bootup from now on.

6. Run the command for the first time to get all the radio stations set up for the first time:
Code: Select all
/usr/local/bin/bbc.sh


You should be good to go, you can shut down your terminal program and enjoy BBC internet radio via RuneAudio :D

This gets you all the national streams. I haven't managed to get it to work for the local BBC radio station streams, which appear to be managed differently. (To be honest I haven't tried very hard. Maybe I'll have another go with my local one, BBC Radio Cumbria, and post back with my results.)

(edit: I've corrected the order of a couple of systemctl commands here, for ease of reference of anyone else trying to follow my guide.)
Last edited by aj78 on 10 Nov 2014, 01:30, edited 1 time in total.
aj78
 
Posts: 51
Joined: 29 Oct 2014, 20:42

Re: BBC Radio

Postby ICLlP » 09 Nov 2014, 20:31

Many thanks.

I've got most of the way there (I'm using Terminal in Mac OS X, logged in as root@10.0.0.114), but I don't think this looks right.

[root@runeaudio bin]# EDITOR=nano crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
[root@runeaudio bin]# systemctl cronie enable
Unknown operation 'cronie'.

Have I done something wrong?
ICLlP
 
Posts: 88
Joined: 30 Apr 2014, 07:52

Re: BBC Radio

Postby aj78 » 10 Nov 2014, 01:27

Nope, it's me being stupid, I had the arguments to the systemctl commands the wrong way round. It should be
Code: Select all
systemctl enable cronie
and
Code: Select all
systemctl start cronie
(I've also updated the post above so it's easier to follow for anyone else.)

Byt the way, I've figured out how to get local radio stations working. The good news is, they don't seem to need to be updated like the national streams do. I'll post an explanation of how to do it next time I have a few hours free. Maybe tomorrow, definitely some time this week.
aj78
 
Posts: 51
Joined: 29 Oct 2014, 20:42

Re: BBC Radio

Postby ICLlP » 10 Nov 2014, 09:08

Perfect!

Thank you very much indeed.
ICLlP
 
Posts: 88
Joined: 30 Apr 2014, 07:52

Re: BBC Radio

Postby aj78 » 10 Nov 2014, 20:18

As promised, here is how to get BBC Local Radio stations (and the ones like BBC Wales, BBC Ulster etc.) working.
These stations don't have a stupid regularly-updating link, so there's no need for a script, but the published playlists are ASX playlists which don't seem to work with MPD. However each of the ASX playlists contains a normal mms:// link, which works fine.

I've extracted all these links and put them together into a big .pls file. So all you need to do is copy the code below, paste it into your favourite text editor and save the file as BBCLocalRadio.pls (or similar) and put it in the directory /mnt/MPD/Webradio on your runeaudio box (then update the Webradios directory either using the RuneUI or the command
Code: Select all
mpc update Webradio


The pls file:
Code: Select all
[playlist]
NumberOfEntries=45

Title1=BBC Berkshire
File1=mms://wmlive.bbc.co.uk/wms/england/lrberkshire
Length1=-1

Title2=BBC Bristol
File2=mms://wmlive.bbc.co.uk/wms/england/lrbristol
Length2=-1

Title3=BBC Cambridgeshire
File3=mms://wmlive.bbc.co.uk/wms/england/lrcambridgeshire
Length3=-1

Title4=BBC Cornwall
File4=mms://wmlive.bbc.co.uk/wms/england/lrcornwall
Length4=-1

Title5=BBC Coventry and Warwickshire
File5=mms://wmlive.bbc.co.uk/wms/england/lrcoventryandwarwickshire
Length5=-1

Title6=BBC Cumbria
File6=mms://wmlive.bbc.co.uk/wms/england/lrcumbria
Length6=-1

Title7=BBC Derby
File7=mms://wmlive.bbc.co.uk/wms/england/lrderby
Length7=-1

Title8=BBC Devon
File8=mms://wmlive.bbc.co.uk/wms/england/lrdevon
Length8=-1

Title9=BBC Essex
File9=mms://wmlive.bbc.co.uk/wms/england/lressex
Length9=-1

Title10=BBC Gloucestershire
File10=mms://wmlive.bbc.co.uk/wms/england/lrgloucestershire
Length10=-1

Title11=BBC Guernsey
File11=mms://wmlive.bbc.co.uk/wms/england/lrguernsey
Length11=-1

Title12=BBC Hereford and Worcester
File12=mms://wmlive.bbc.co.uk/wms/england/lrherefordandworcester
Length12=-1

Title13=BBC Humberside
File13=mms://wmlive.bbc.co.uk/wms/england/lrhumberside
Length13=-1

Title14=BBC Jersey
File14=mms://wmlive.bbc.co.uk/wms/england/lrjersey
Length14=-1

Title15=BBC Kent
File15=mms://wmlive.bbc.co.uk/wms/england/lrkent
Length15=-1

Title16=BBC Lancashire
File16=mms://wmlive.bbc.co.uk/wms/england/lrlancashire
Length16=-1

Title17=BBC Leeds
File17=mms://wmlive.bbc.co.uk/wms/england/lrleeds
Length17=-1

Title18=BBC Leicester
File18=mms://wmlive.bbc.co.uk/wms/england/lrleicester
Length18=-1

Title19=BBC Lincolnshire
File19=mms://wmlive.bbc.co.uk/wms/england/lrlincolnshire
Length19=-1

Title20=BBC London
File20=mms://wmlive.bbc.co.uk/wms/england/lrlondon
Length20=-1

Title21=BBC Manchester
File21=mms://wmlive.bbc.co.uk/wms/england/lrmanchester
Length21=-1

Title22=BBC Merseyside
File22=mms://wmlive.bbc.co.uk/wms/england/lrmerseyside
Length22=-1

Title23=BBC Newcastle
File23=mms://wmlive.bbc.co.uk/wms/england/lrnewcastle
Length23=-1

Title24=BBC Norfolk
File24=mms://wmlive.bbc.co.uk/wms/england/lrnorfolk
Length24=-1

Title25=BBC Northampton
File25=mms://wmlive.bbc.co.uk/wms/england/lrnorthampton
Length25=-1

Title26=BBC Nottingham
File26=mms://wmlive.bbc.co.uk/wms/england/lrnottingham
Length26=-1

Title27=BBC Oxford
File27=mms://wmlive.bbc.co.uk/wms/england/lroxford
Length27=-1

Title28=BBC Sheffield
File28=mms://wmlive.bbc.co.uk/wms/england/lrsheffield
Length28=-1

Title29=BBC Shropshire
File29=mms://wmlive.bbc.co.uk/wms/england/lrshropshire
Length29=-1

Title30=BBC Solent
File30=mms://wmlive.bbc.co.uk/wms/england/lrsol
Length30=-1

Title31=BBC Somerset
File31=mms://wmlive.bbc.co.uk/wms/england/lrsomerset
Length31=-1

Title32=BBC Stoke
File32=mms://wmlive.bbc.co.uk/wms/england/lrstoke
Length32=-1

Title33=BBC Suffolk
File33=mms://wmlive.bbc.co.uk/wms/england/lrsuffolk
Length33=-1

Title34=BBC Surrey
File34=mms://wmlive.bbc.co.uk/wms/england/lrsurrey
Length34=-1

Title35=BBC Tees
File35=mms://wmlive.bbc.co.uk/wms/england/lrtees
Length35=-1

Title36=BBC Three Counties
File36=mms://wmlive.bbc.co.uk/wms/england/lrthreecounties
Length36=-1

Title37=BBC Wiltshire
File37=mms://wmlive.bbc.co.uk/wms/england/lrwiltshire
Length37=-1

Title38=BBC West Midlands
File38=mms://wmlive.bbc.co.uk/wms/england/lrwm
Length38=-1

Title39=BBC York
File39=mms://wmlive.bbc.co.uk/wms/england/lryork
Length39=-1

Title40=BBC Cymru
File40=mms://wmlive.bbc.co.uk/wms/nations/cymru
Length40=-1

Title41=BBC Foyle
File41=mms://wmlive.bbc.co.uk/wms/nations/foyle
Length41=-1

Title42=BBC nan Gaidheal
File42=mms://wmlive.bbc.co.uk/wms/nations/nangaidheal
Length42=-1

Title43=BBC Scotland
File43=mms://wmlive-acl.bbc.net.uk/wms/scotland/Scotland_UK
Length43=-1

Title44=BBC Ulster
File44=mms://wmlive.bbc.co.uk/wms/nations/ulster
Length44=-1

Title45=BBC Wales
File45=mms://wmlive.bbc.co.uk/wms/nations/wales
Length45=-1


This produces one big playlist file containing all the local rado stations. It may be that you're not interested in all of them, just your local one. In that case, you can simply use RuneUI's "add a webradio" functionality and copy and paste the relevant link from the list above.

So hopefully that's it, there's now a fairly complete guide to listening to BBC radio stations using your RuneAudio device. :mrgreen:
aj78
 
Posts: 51
Joined: 29 Oct 2014, 20:42

Re: BBC Radio

Postby ICLlP » 09 Dec 2014, 10:28

aj78 wrote:Nope, it's me being stupid, I had the arguments to the systemctl commands the wrong way round. It should be
Code: Select all
systemctl enable cronie
and
Code: Select all
systemctl start cronie
(I've also updated the post above so it's easier to follow for anyone else.)

Byt the way, I've figured out how to get local radio stations working. The good news is, they don't seem to need to be updated like the national streams do. I'll post an explanation of how to do it next time I have a few hours free. Maybe tomorrow, definitely some time this week.


Hello again! I just flashed a new card (getting a Christmas present ready) and attempted to set up the BBC national radio stations as per your instructions, which worked for me previously. This time the radio stations aren't showing in the library. Any idea why this might be?
ICLlP
 
Posts: 88
Joined: 30 Apr 2014, 07:52

Re: BBC Radio

Postby ICLlP » 13 Dec 2014, 20:06

Sorted. Having followed Adrian's instructions nothing showed in the web radio section of the library UI. To sort this one needs to pretend to add a web radio through the UI. I entered BBC for the name and www for the URL and then all was OK. All were listed.
ICLlP
 
Posts: 88
Joined: 30 Apr 2014, 07:52

support RuneAudio Donate with PayPal

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 11 guests
cron