Rocode >> Hobbies >> VK3RTV On Off

Monitoring VK3RTV using a Raspberry Pi

This page details my experimentation with the local Amateur Radio broadcasts.

It discusses using a Raspberry Pi to produce Elvin notifications indicating that the Melbourne ATV Repeater VK3RTV goes On Air and Off Air.


Raspberry Pi

Raspberry Pi is an ARM GNU/Linux hobbyist computer for 21.60.

The Raspberry Pi home page is http://www.raspberrypi.org/.
See also the Wikipedia page http://en.wikipedia.org/wiki/Raspberry_Pi.

Raspberry Pi with DVB-T Tuner

Raspberry Pi with DVB-T Tuner

The photo above shows my Raspberry Pi Model B Rev 1 and Clear case (AUD $49.54).
On the left a Kaiser Baas TVStick (AUD $44.49) and Red Ethernet cable (AUD $4.20).
On the right a USB power cable (AUD $4.98) and SD card (AUD $10.69).
On the top is a HDMI to DVI video cable that was a gift.
Not shown is the USB power adaptor (AUD $3.95).

I purchased the USB adaptor, USB cable, Ethernet cable and SD card from ebay.com.au.

A total of AUD$75 to the Raspberry Pi computer excluding DVB-T and audio video cables.

On initial setup I used a physical USB keyboard and USB mouse.
Once the OS has been initially booted I may access the computer remotely via its Ethernet connection.

I have connected DVB-T television to my Raspberry Pi and check when VK3RTV the Melbourne Digital Amateur Television repeater is switched on or off.

I use a Kaiser Baas TVStick USB DVB-T Dongle.
http://www.kaiserbaas.com/tv-radio-category/usb-hd-tvstick-tuner.

My Raspberry Pi emits Elvin notifications via my LAN to my AVIS Router (AVIS is a freeware Elvin Router).

The AVIS Event Router is freely available via its home page:
http://avis.sourceforge.net/.

Then the AVIS router forwards these notifications to any subscribed software over my LAN.

Elvin Notification Routing

AVIS Routing

As I already have an Avis Router running on my Zentyal gateway, I did not try to install it directly to the Raspberry Pi. This would be an interesting challenge.


Screenshots

The following screenshots shows how the VK3RTV checker notifications look on subscribed tickertapes running on my Windows 7 Desktop and Fedora Linux server.

Sticker Tickertape Screenshot

Sticker Tickertape on Windows 7

Sticker Tickertape Screenshot

Sticker Tickertape on Fedora Linux

Sticker Tickertape Screenshot

Sticker Tickertape on Windows 7

Sticker Tickertape Screenshot

Sticker Tickertape on Fedora Linux

The following screenshot shows a history of notifications as stored in sticker running on my Windows 7 Desktop. This history is from Monday November 5 2012.

Sticker Messages

Sticker Messages and VK3RTV


Linux Distribution

I used the Fedora Remix distribution for my Raspberry Pi.
http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix .

I used the Image Writer for Windows to record the Fedora Remix image to my Raspberry Pi's SD card.
https://launchpad.net/win32-image-writer.

I chose Fedora as it works well with AVIS C client library. Shown below is a console view with a report of kernel, memory and disk for my Raspberry Pi.

Raspberry Pi Console

As my installation uses a kernel version of 3.2, my choice of DVB-T dongle was restricted. The Kaiser Baas TVStick is supported by this kernel.

See the LinuxTV web site for a list of support DVB-T dongles and the required kernel version.
http://linuxtv.org/wiki/index.php/DVB-T_USB_Devices.

I was required to install a DVB firmware file, for this specific USB dongle, to /lib/firmware.
The file is called dvb-usb-dib0700-1.20.fw.


Scripting

I wrote a simple bash shell script to monitor VK3RTV. It checks once every second for the repeater going on or off.

The script is written to work with the current 2 channel configuration ("2 services"). It will also work when a signal is detected but without enough strength to find the 2 channels ("filter timeout pid").

/usr/local/bin/atvchecker.sh

The above script calls scan and passes it the following /usr/local/bin/vk3rtv.conf file.

/usr/local/bin/vk3rtv.conf

The script calls my Elvin producer named tick. Details of my /usr/local/sbin/tick command line program may be found on my Elvin page:
http://rocode.com/elvin/#TICK.

The tick program generates an Elvin notification that is feed through my installation of the AVIS Event Router
http://avis.sourceforge.net/.

The AVIS C client library maybe downloaded here:
http://avis.sourceforge.net/client_library.html.

I have made the source code for tick available here:
http://rocode.com/amateurradio/tick.c.

I start the bash script using a service wrapper in /etc/init.d/atvchecker.

/etc/init.d/atvchecker

This custom atvchecker service is started using the chkconfig command.
chkconfig --level 234 atvchecker on

This will set the service to start automatically on boot.


NTP Time Client

I also installed an NTP Time Client to synchronise the clock of the Raspberry Pi on boot.

yum install ntp.

Then create a service wrapper in /etc/init.d/myntpd similar to the above atvchecker.

/etc/init.d/myntpd

Enable it on boot.

chkconfig --level 234 myntpd on.

The 60 second sleep on the above ATV checker script means it waits for ntp client synchronication.