Raspberry pi – Home made radio with remote control

My own notes, hints, etc.

We need:
– Raspberry Pi
– notebook with SD card port for cards that fit into RasPi
– hdmi cable + monitor
– usb keyboard and mouse

How to:
– flash the card, load it with image you decided best for you
– login to shell (ssh pi@IP.address), default pwd is raspberry
– configure RPI by sudo raspi-config, change pwd to pi / Radio5678
– sudo apt-get update
– install cmdpad (scripts bound to keyboard hits), should be replaced by preinstalled thd – trigger happy daemon
– install mpd (music player with server, accessible remotely) + mpc (client for it)

Installer
that sets up the radio on Raspberry Pi, just unpack it and run „sudo make install“
radio_installer_140903

Other
/boot/config.txt

I’m using:
* before: http://www.linuxsystems.it/2012/06/debian-wheezy-raspberry-pi-minimal-image
* now: 2014-06-20-wheezy-raspbian.zip (2_8gb)

* Installed .img on card using the sourceforge.net/projects/win32diskimager
* Does not boot (leds dead), have to update firmware because I have 512mb (stated in comments on page)
* Upgrading firmware:
* https://github.com/raspberrypi/firmware/tree/master/boot
* download all single files
* copy them to existing sd card boot folder in windows, overwrite existing files
* bootable, leds are on
* requested IP from DHCP
* ssh to the IP
* login: root / raspberry
* logged in

* trying to install mpd : apt-get install mpd – failed with packages not downloadable, hangs
* fix: apt-get update –fix-missing
* apt-get install mpd : downloading 45mb of packages:

[….] Starting Music Player Daemon: mpdlisten: bind to ‚[::1]:6600‘ failed: Failed to create socket: Address family not supported by protocol (continuing anyway, because binding to ‚127.0.0.1:6600‘ succeeded)
Failed to load database: Failed to open database file „/var/lib/mpd/tag_cache“: No such file or directory

apt-get install alsa-utils

—–
trying raspbian

* trying to install mpd : apt-get install mpd – failed with packages not downloadable, hangs
* fix: apt-get update –fix-missing

adduser radio/radiopi

Sprav makefile

/etc/modules – add ipv6

For Ubuntu users, if your directories and files are on other devices, like /dev/hda1, you must add mpd user to „plugdev“ group.

=====
make:
install cmdpad
http://sourceforge.net/projects/cmdpad/files

make cmdpad work:
sudo touch /var/log/cmdpad.log
sudo chmod 777 /var/log/cmdpad.log
add to /etc/rc.local:
/usr/local/cmdpad/cmdpad –verbose >> /var/log/cmdpad.log &

install mpd + mpc
setup mpd
backup /etc/mpd.conf

command=015,P ,/usr/local/radio/switchToChannel.py 1
command=051,P ,/usr/local/radio/switchToChannel.py 1
command=052,P ,/usr/local/radio/switchToChannel.py 1
command=053,P ,/usr/local/radio/switchToChannel.py 1
command=002,P ,/usr/local/radio/switchToChannel.py 1

command=103,P ,/usr/local/radio/switchToChannel.py 2
command=030,P ,/usr/local/radio/switchToChannel.py 2
command=048,P ,/usr/local/radio/switchToChannel.py 2
command=036,P ,/usr/local/radio/switchToChannel.py 2
command=003,P ,/usr/local/radio/switchToChannel.py 2

command=125,P ,/usr/local/radio/switchToChannel.py 3

command=105,P ,/usr/local/radio/switchToChannel.py 4

command=114,P H,/usr/local/radio/volume.py -5
command=115,P H,/usr/local/radio/volume.py +5

command=071,P H,/usr/bin/aumix -d /dev/mixer -v -5
command=075,P H,/usr/bin/aumix -d /dev/mixer -v +5

1 – 15 (or cycle if numlock: 51,52,53,2)
2 – 103 (30, 48, 36, 3)
3 – 125 (32, 14, 18, 4)
4 – 105 …
5 – 28
6 – 106
7 – 29 and 24
8 – 108
9 – 1
vol- = 114
vol+ = 115

Link to other radio: http://radiolv.fm/DIYradio/

Random trash
screen
http://radiolv.fm/DIYradio/
cron – no @reboot
backup
??? sudo usermod john -g sudo??