You can download a working Raspberry Pi SD card image here.
This image requires an 8 GB or larger SD card, and will run on both the Model B and Model B+. It is set up to automatically run TwoToneDetect after startup, and will automatically reboot every night at midnight. It is also set up with Darkice and can be configured to automatically stream to a server, if desired. This image is intended to be used with a cheap USB sound card as the audio input. Something like this should work just fine.
This image is configured to use DHCP to get an IP address from your home network. In order to SSH into the Pi, you’ll need to determine its IP address by checking your router’s DHCP client information screen. The Pi will show up in the DHCP client list as “twotonedetectv67”.
Steps to get up and running:
- Download the TTD image and image an SD card (minimum 8 gb).
- Plug in your USB sound card, the ethernet cable, and the power supply to your pi. (power supply last) The pi will boot up in less than a minute. Within about two minutes TTD will load automatically. Generally, when TTD loads the LED on the sound card starts flashing.
- Figure out how to access the pi remotely without connecting a keyboard or mouse. Using SSH:
- The pi is set up for VNC access on port 5901. Instructions for connecting via VNC are:
- At the command line type sudo raspi-config then do three things:
pi@twotonedetectv67 ~ $ sudo raspi-config
a. Expand the file system
b. Change user password (if you desire) Current password is ttd-pi
c. Localization Options. Change timezone to your location.
Tab to <Finish> and hit enter. Reboot the pi.
- Edit the /TTD/config.cfg file either from the command line or from the TwoToneDetect Configuration icon on the Pi Desktop. Enter your email username and password. Make sure that the password is encoded properly.
- Restart the pi by typing sudo reboot at the command line.
pi@twotonedetectv67 ~ $ sudo reboot
- Give the pi about three minutes to reboot and restart TTD.
- Check to see that TTD is running. Type screen -list on the command line.
pi@twotonedetectv67 ~ $ screen -list
There is a screen on:
2431.TTD (23/10/15 06:58:01) (Detached)
1 Socket in /var/run/screen/S-pi. This indicates that TTD is running in a detached screen. If you do not get this, recheck your email credentials in config.cfg
- Check that your audio levels are in the correct range. At the command line change to the TTD directory ($ cd TTD) then run LevelMeter ($ python LevelMeter.pyc). Or, at the pi Desktop, double click on the LevelMeter icon. Enter the number of the input device and output device that correspond to the ones showns as “pulse”. Note the numbers that scroll by. Adjust your audio input (volume control on your radio) so that then levels exceed 300-500 when squelch is broken and is less than 300 when no audio is being fed in (squelch is cleared).
- Edit the tones.cfg file preferably by using the TonesEditor icon on the Pi desktop. This ensures that the correct formats are being used. Enter the tone sets and email addresses, then click Save to Tones.cfg. A second alternate means is to edit the tones.cfg file in the /TTD directory at the command line using nano or a similar text editor. Be very careful that the correct format is followed.
- Reboot the pi using sudo reboot at the command line or by power cycling the unit. This will cause the program to reload the new information from Tones.cfg that you have just entered.
- Once the pi comes back up and TTD starts, feed a tone set in through the usb sound card. For testing purposes, a tone set recorded and stored on an iPhone or other device can be fed in by connecting the audio feed cable to the earbud jack on the phone. A sample tone set (757/1000) is on the pi desktop if you can figure out how to get it to your phone. You should receive the email indicating that TTD decoded the tone and sent the emails.
- If you do not receive the emails, look in the logs stored in /TTD/logfiles directory. There is a shortcut to this directory on the pi desktop. Every time TTD starts, it creates a new log file. These are deleted after 15 days. The log file will show what error messages are being received.
Good luck. These instructions are very brief. If you need further assistance, review the information on the RadioReference forums: http://forums.radioreference.com/streaming-broadcasting-audio-recording/262868-twotonedetect-raspberry-pi-how.html#post1936210 Post questions there and you will receive assistance.
TwoToneDetect and its associated files can be found in the /home/pi/TTD directory.
To edit the tones.cfg file, use:
sudo nano /home/pi/TTD/Pi/tones.cfg
To edit the config.cfg file, use:
sudo nano /home/pi/TTD/Pi/config.cfg
This image uses crontab jobs to automate a number of things. To view the crontab tasks that are set up, use: