image_pdfimage_print

Audio Recording on AllStar Link node

image_pdfimage_print

Audio Recording on AllStar Link nodes.

In rpt.conf there are stanzas that start with the node number, such as:

[28174] ; Change this to your assigned node number
rxchannel=Radio/usb
;rxchannel=Simpleusb/usb
duplex=0
~
archivedir=/media/USB

If it contains the “archivedir=<some recording location>” as shown above, then the audio passing through the radio will be recorded. In my case the recording location is a USB stick formatted as an ext4 file system identified by the system as /dev/sda1. So edit the file /etc/fstab and add a line as shown in bold below:

#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0
tmpfs /var/log tmpfs nodev,nosuid,size=50M 0 0
/dev/sda1 /media/USB ext4 errors=remount-ro 0 1

Reboot and the drive should be mounted. We can check that the USB is in fact mounted at the location /media/USB with the df command.

[root@AllStar-KA7U USB]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3762048 1323764 2227464 38% /
devtmpfs 493436 0 493436 0% /dev
tmpfs 497712 0 497712 0% /dev/shm
tmpfs 497712 12860 484852 3% /run
tmpfs 497712 0 497712 0% /sys/fs/cgroup
tmpfs 497712 108 497604 1% /tmp
tmpfs 51200 272 50928 1% /var/log
/dev/mmcblk0p1 102182 14104 88078 14% /boot
/dev/sda1 7561896 19996 7134732 1% /media/USB
tmpfs 99544 0 99544 0% /run/user/0
[root@AllStar-KA7U USB]#

The AllStarLink system will add the node number to the directory structure, so when you navigate to the saved audio files, you will do something like this:

[root@AllStar-KA7U /]# cd /media/USB/28174
[root@AllStar-KA7U 28174]# ls -l
total 1188
-rw------- 1 root root 6154 Mar 15 21:22 20160315.txt
-rw------- 1 root root 12800 Mar 15 20:51 20160315205145.WAV
-rw------- 1 root root 5455 Mar 15 20:51 20160315205153.WAV
-rw------- 1 root root 5130 Mar 15 20:52 20160315205159.WAV
.... snip...

As you can see above the system has been busy recording audio files in the mounted USB stick. To use these files, we need to copy them to a computer capable of playing them. In this case the Raspberry PI is connected to another Linux computer by SSH, so we will copy the desired files to the connected computer with the SCP command issued from the connecting computer in the directory we wish the files to be copied to. Note: there is a space between *.WAV and ./ , don’t forget the space. 🙂

ron@linux-zdyj:~/wave> scp root@allstar-ka7u:/media/USB/28174/*.WAV ./
root@allstar-ka7u's password: 
20160315205145.WAV                                                 100% 13KB 12.5KB/s 00:00 
20160315205153.WAV                                                 100% 5455 5.3KB/s 00:00 
20160315205159.WAV                                                 100% 5130 5.0KB/s 00:00 
20160315205202.WAV                                                 100% 1685 1.7KB/s 00:00 
20160315210008.WAV                                                 100% 4155 4.1KB/s 00:00 
20160315210157.WAV                                                 100% 4480 4.4KB/s 00:00
... snip....

From here we can play the files one by one in a player of choice, such as Audacity, or we can concatenate them into one or more files using SOX. Without our intervention, SOX will concatenate the files in the correct date and time order with the simplest command.

ron@linux-zdyj:~/wave> sox *.WAV test.wav
ron@linux-zdyj:~/wave> ls -l test.wav
-rw-r--r-- 1 ron users 1034926 Mar 15 21:42 test.wav
ron@linux-zdyj:~/wave>

Notice in the above that a new file “test.wav” now exists. Also note that the AllStarlink system uses a naming convention on the audio files using capital letters WAV. Audacity has the ability to further edit the file and change from wav to other codecs such as mpg. This screenshot shows the presentation of this audio file in Audacity.Audacity

test.wav

The file is linked above, if you would like to listen to it or work with it. This recording is quite useful in as much as one of the radios has an intermittent connection problem and one of the radios is over modulated. The picture in Audacity is worth a thousand words, and being able to listen to the audio more than once, makes it much easier to determine how things sound.

If the radio is breaking squelch to often, the recordings of that will be plentiful. So if we plan to record, the squelch should be sufficient to silence the radio until a signal appears.
Ron Morell
KA7U