https://www.dropbox.com/s/3eriotijo0fvfxx/radio.sh?dl=0
yoooo here is the link , how it worked for me.
https://www.dropbox.com/s/3eriotijo0fvfxx/radio.sh?dl=0
yoooo here is the link , how it worked for me.
THX for the info
i included that, reduced the script to the only necessary stuff and put in the radioV2.sh in my dropbox.
https://www.dropbox.com/s/k73t8k848zceg5b/radioV2.sh?dl=0[link text](link url)
here is the error i get now on the last line:
/usr/bin/radioV2.sh: line 56: syntax error: unexpected "done" (expecting "then")
Any Ideas what is the problem here?
@Douglas-Kryder and make sure you take the *.sh file from dropbox. It is my last upload and the streams should work
just type
run opkg update
opkg install mpg123
thats it.
to listen the stream i connected a small usb soundcard on my onion (with a powered usb adapter)
Hello, i put the bashscript in my dropbox. here is the link
https://www.dropbox.com/sh/u3s8lqdn0f9g6u2/AACvfddIZcKHp-cJ98nmrnCPa?dl=0[link text](link url)
maybe you can try to start it.
thx lg christian
ahhh looks like i have to write my first bash script these days and also wanna include it with the start routine of the onion, but still have a problem....next one
here is the status:
...i can start the mp3 stream directly from the commandline with mpg123 http://.........mp3...stream => that works
#!/bin/ash
gpioctl dirin 0
gpioctl dirin 1
gpioctl dirin 2
gpioctl dirin 3
gpioctl dirin 6
gpioctl dirin 7
gpioctl dirin 8
gpioctl dirin 9
COUNTER=0
while [ $COUNTER -lt 100 ]; do
BUTTON0=$(gpioctl get 0 | grep Pin | cut -b 10)
BUTTON1=$(gpioctl get 1 | grep Pin | cut -b 10)
BUTTON2=$(gpioctl get 2 | grep Pin | cut -b 10)
BUTTON3=$(gpioctl get 3 | grep Pin | cut -b 10)
BUTTON7=$(gpioctl get 7 | grep Pin | cut -b 10)
BUTTON8=$(gpioctl get 8 | grep Pin | cut -b 10)
BUTTON9=$(gpioctl get 9 | grep Pin | cut -b 10)
if [ $BUTTON0 = 'H' ]; then
killall mpg123
echo starting radio mode
echo GROOVE SALAD
mpg123 http://ice3.somafm.com/groovesalad-256-mp3 &
fi
if [ $BUTTON1 = 'H' ]; then
killall mpg123
echo starting radio mode
echo SECRETAGENT
mpg123 http://ice1.somafm.com/secretagent-128-mp3 &
fi
if [ $BUTTON2 = 'H' ]; then
killall mpg123
echo starting radio mode
echo OE1
mpg123 http://mp3stream3.apasf.apa.at:8000 &
fi
if [ $BUTTON3 = 'H' ]; then
killall mpg123
echo starting radio mode
echo GROOVESALAD
mpg123 http://ice3.somafm.com/groovesalad-256-mp3 &
fi
if [ $BUTTON9 = 'H' ]; then
killall mpg123
echo starting radio mode
echo SECRETAGENT
mpg123 http://ice1.somafm.com/secretagent-128-mp3 &
fi
if [ $BUTTON8 = 'H' ]; then
killall mpg123
echo starting radio mode
echo OE1
mpg123 http://mp3stream3.apasf.apa.at:8000 &
fi
sleep 1
done
2nd The script is called from the file /etc/rc.local, so it starts when the Omega2 reboots:
/usr/bin/radio.sh & > /dev/null
exit 0
3rd the hardware (buttons) seems fine to me working, but how can i try the script now and test it?
Make the script executable by running the command: " chmod +x radio.sh "
execute the script by typing " ./radio.sh "
i am not sure, how to test my skript? without including it immediately
i hope you can help me with my weired post
ps omega onion firemware is up to date. i also did "oupgrade -force" in the commandline
Hello, i am Building my Internet Radio with my onion but cont figure out what is the Problem with my Radio.py script. I am a python beginner, maybe you have an idea what i did wrong. i tried a lot of variations and also googled wo help.
i always get :
radio3.py: line 80: syntax error: unexpected "done" (expecting "then")
thanks lg christian
gpioctl dirin 0
gpioctl dirin 1
gpioctl dirin 2
gpioctl dirin 3
gpioctl dirin 6
gpioctl dirin 7
gpioctl dirin 8
gpioctl dirin 9
COUNTER=0
while [ $COUNTER -lt 100 ]; do
# echo The counter is $COUNTER
# let COUNTER=COUNTER+1
BUTTON0=$(gpioctl get 0 | grep Pin | cut -b 10)
BUTTON1=$(gpioctl get 1 | grep Pin | cut -b 10)
BUTTON2=$(gpioctl get 2 | grep Pin | cut -b 10)
BUTTON3=$(gpioctl get 3 | grep Pin | cut -b 10)
#BUTTON6=$(gpioctl get 6 | grep Pin | cut -b 10)
BUTTON7=$(gpioctl get 7 | grep Pin | cut -b 10)
BUTTON8=$(gpioctl get 8 | grep Pin | cut -b 10)
BUTTON9=$(gpioctl get 9 | grep Pin | cut -b 10)
if [ $BUTTON0 = 'H' ]; then
killall mpg123
echo starting radio mode
echo BBC 1
mpg123 http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p &
fi
if [ $BUTTON1 = 'H' ]; then
killall mpg123
echo starting radio mode
echo BBC-World
mpg123 http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-einws &
fi
if [ $BUTTON2 = 'H' ]; then
killall mpg123
echo starting radio mode
echo France inter
mpg123 http://direct.franceinter.fr/live/franceinter-midfi.mp3 &
fi
#world: http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-einws
if [ $BUTTON3 = 'H' ]; then
killall mpg123
echo starting radio mode
echo SWR3
mpg123 http://swr-mp3-m-swr3.akacast.akamaistream.net/7/720/137136/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr3 &
fi
#if [ $BUTTON6 = 'H' ]; then
#killall mpg123
# echo starting radio mode
# echo D-Radio
#mpg123 http://stream.dradio.de/7/249/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_m &
# fi
if [ $BUTTON9 = 'H' ]; then
killall mpg123
echo starting radio mode
echo D-Radio Kultur
mpg123 http://stream.dradio.de/7/530/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dkultur_m &
fi
if [ $BUTTON8 = 'H' ]; then
killall mpg123
echo starting radio mode
echo D-Radio Wissen
mpg123 http://stream.dradio.de/7/698/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dwissen_s &
fi
sleep 1
done