Thursday, November 15, 2007

Measuring and logging HD Radio interchannel delay

The analog FM program audio and the main digital audio are supposed to be synchronized very closely to produce a clean blend between analog and digital when necessary at the receiver. With some work, you can synchronize these down to within a few samples. The problem now, depending on your installation, is keeping it synchronized. A lot of stations are finding that their digital signal drifts in time against the analog. The drift problem is being worked on, but for now, my concern is "How do I keep aware of how well I am synchronised?"

A ham operator and FM enthusiast, Brian Beezley (K6STI), wrote a command line program to cross-correlate the delay error between the two channels of a wave file and output the results to a text file. It seems logical to me that one could automate the recording of audio from a receiver in split mode to create many samples of audio for analysis. Then, another automated script could analyze the sample audio files and output the results in a statistical format. Since it doesn't have to be done in real time, all these data points (timestamped delay error values) could be saved and graphed, showing a nice graphical view of the drift. If you use a package like OpenNMS to collect and log the data, you could even get notification when it drifted outside certain limits. That is one way to keep on top of the drift and know how much it changes.

Monday, November 05, 2007

Monitoring the network (and more) with OpenNMS

A thread on Pubtech about SNMP management prompted me to do a little searching on IT infrastructure monitoring and notification. Intermapper has been around for a while, but I didn't feel like hassling with trial serial numbers to try it out since it is commercial software. I did find a great project called OpenNMS. This is open source, free software, and it does a lot. It has been under development for several years and has been implemented in a number of large-scale IT shops. The newest versions have a ton of useful features, and there is a great web front end for managing the app. On the flip side, it was very difficult for me to install set up. Some of that I brought upon myself. I chose to install it on an Ubuntu server, which didn't have anyone to keep the opennms packages up-to-date like the RedHat folks do. I also chose to use the development version because it was said to be feature rich and stable, but I couldn't find precompiled installation packages for Ubuntu. So I downloaded the sources and compiled it myself. Since I had very little experience with that process, it took me a few tries to get all the dependencies worked out. I was ultimately successful, and it runs great. I notice that as of the 1.3.8 release there are packages available for Debian based distributions. Should make installation much easier.

The next hurdle was collecting SNMP data on some of our broadcast equipment. To add the correct SNMP OID's, I had to edit some XML files by hand, which, because of my lack of experience with the software, took a few tries to get right. I also had to edit other text files to build reports visualizing the new data that was being gathered. But, in the end, it still works great, and I can monitor data on generic network equipment as well as some special purpose hardware, like EbNo on our ContentDepot receivers, RSSI on our wireless link to the transmitter and more.

Even better, OpenNMS can send email, page, text message, even IM, if a value gets out of range. This makes it useful for getting notification if there is snow in the sat dish or interference to the wireless link or even if the transmitter shuts down. It can even be integrated into trouble ticket management software, like BestPractical RT. I really like this software and am looking forward to rolling it out for production use.

My next experiment will be to use the HTTP collection agent to pull data from our Burk ARC16 running Autopilot. I have never liked their data storage and reporting functions, so I think it would be neat to integrate the metrics like that into a system-wide monitoring app like OpenNMS. Now that I think of it, I could even turn status alarms into OpenNMS events. Back to work I go.

Thursday, September 13, 2007

RF propagation modeling with SPLAT! for Windows



Many are probably familiar with John Magliacane's RF Signal Propagation, Loss, And Terrain analysis software (SPLAT!). This software is useful for visualizing terrain and performing Longley-Rice path loss and coverage prediction using the Irregular Terrain Model. It had been only available for the Linux OS. I was able to compile it for Windows with a few minor modifications. This is a command line program, freely available under the GNU GPL. I would be happy to include the source code if you are so inclined.

http://people.missouristate.edu/jmcmellen/software/splat-1.2.3-win32.zip

There is a PDF version of the instructions for the Linux version, which is pretty much exactly how it works in Windows too. Some utilities are included as well as instructions for downloading free terrain data for your area. I have only tested it in Windows XP SP2, so if you have any problems, let me know.

Fixes for Windows Port

  • 11-12-07 - Fixed error in srtm2sdf.exe that caused it to not work with hgt or bil files.
  • 11-15-07 - Fixed error in splat.exe that caused it to generate coverage maps without any loss data plotted when analyzing sites with anything other than default settings.
  • 11-15-07 - Changed a trailing "/" to a "\" in the data path option. This never caused a problem in my setup, but might have in others.
  • 2-15-08 - Successfully ported the usgs2sdf.exe utility to Windows. Now those who prefer the USGS DEM's as raw terrain data can convert them to Splat data files.

Saturday, June 30, 2007

Moseley Starlink Tech Bulletin

Moseley has released a tech bulletin about a problem with a batch of their Starlink RF STL's. The modem cards develop a significant jitter problem in the oscillators made by Greenray, which causes high BER and audio problems. More information is in the tech bulletin.

http://www.moseleysb.com/mb/service_bulletin/starlink_9003q_service_bulletin_ocxo.pdf

Wednesday, May 23, 2007

Web site testbed

One of the big obstacles to me of getting an idea off the ground is being able to try it out, prototype it, play around with it, before you try to explain the idea to others. I have read about all the great things people are doing with web 2.0 technologies like blogs and wiki's, but it is not always easy to get some space on the web server to try these kinds of things out, nor do you always want them to be publicly accessible. However, I have found that using the free WAMP (Windows, Apache, MySQL, PHP) framework has made installing and experimenting with web software very easy to do. I installed it on my XP computer at my desk and just a few minutes later had a working Joomla web site installed and running. Over the next couple of weeks, I was able to tinker with it in my spare time to make a fairly rich web site that we might model our stations new website after. I also found it very easy to install MediaWiki under WAMP. I have been using this wiki to collaborate with a coworker on building a station policy document. Either of us can edit the framework or add new content to the document without having to email Word docs around or schedule frequent meetings.

I am sure there are better ways of building a business-class system for production, but the WAMP sure makes it easy and fun to tinker with web stuff. Just make sure you understand the potential holes this might open up on whatever computer you install it on.

Thursday, April 19, 2007

PREC 2007

What a great conference this year! I attended the PREC in 2005, and I feel like this year was even better than the first. As soon as I get some time, I want to try to summarize some of the things I learned here and at the NAB Broadcast Engineering Conference. Also, keep watching the APRE site as they will be posting many of the presentations and other material from the conference (I think even recordings of the sessions).

http://www.prss.org
http://www.nprlabs.org/apre

Thursday, March 22, 2007

Tuesday, February 20, 2007

Your WSH is my command, part 2

As I mentioned in part 1, the WSH and some VBScript can be used to do more than move files around. Another use is in parsing the data in files. Parsing text files is very easy to do, but there are no built-in functions for accessing binary data. You will find, however, that others have made up for this shortcoming by implementing their own classes for manipulating binary files. See for example this site with example code. This example uses only VBScript code to create a Binary Object class, although better performance is achieved using dll's or COM objects. However, for the purposes of my demonstration, I used the CBin.vbs code in the tsbin.zip file at the above site. If you would like to run my demo script, you will have to download this zip archive and put the CBin.vbs file in the same folder as the script when you run it. My example pulls a list of wav files from a given folder and reads the binary file header and prints out the CartChunk Content Depot data. One could use this information for making scripted decisions about when to copy or move files or perhaps to push the future XML pad information in the file to a database for a "Now Playing" or other application. Currently, I don't have any other good uses for this script besides reporting what is there, but maybe it is useful to you. Maybe you could use it to email someone when a new file shows up. I would love to hear some more ideas. So, without further ado, here is my code for your perusal.

ConDepReader_v1_0_1.zip

UPDATE (2/22/2007): After reading some posts on Pubtech lamenting the lack of a spreadsheet of CutIDs, I updated the script (now v1.0.1) to output a report of files and CutIDs in CSV format for use in Excel or whatever.

Tuesday, January 30, 2007

Your WSH is my command, part 1

Several recent projects converged on a single need to automate basic server tasks, such as synchronizing folder contents, media conversion, etc. My first priority was to pull special "promo" audio files off of our Content Depot storage receiver and put them in another safe location so that our staff could edit them or otherwise use them in their spot production without having to navigate the critical parts of the storage receiver file system. The Windows Scripting Host (WSH) is ideally suited to automating such tasks. It is installed on every Windows XP and Server computer, is easily scripted and very powerful. In fact, there are several useful scripts included on your installation in the System32 directory, scripts that can automate printer management and filter event logs. I know what you're thinking, though. "VBS files are bad! They are viruses! That's why Norton blocks them!" They can be used by attackers, commonly in email, but are very useful for many Windows tasks. The Microsoft Technet journal carries a regular column called "Scripting Guys" that details many excellent scripting uses. You can also find VB scripts at the heart of the Samurize desktop widget software.

On to the fun stuff, though. As I mentioned, I wanted to get promos off of the storage receiver and into another folder on a different computer where they could be safely operated on. Using VBScript and the WSH, I created a list of files in the source location that match a regular expression, check that they are newer than files in the destination or don't exist in the destination location and copy them. This script then runs on an interval using "Scheduled Tasks" in Control Panel. I also found that using the command line Mplayer software, I could automate the conversion of these files to uncompressed wav files in the destination. Sweet! Lastly, I check to see if there are any files in the destination that aren't in the source location. These are deleted from the destination and walah! We are synchronized!

This type of scripting would also be useful for retrieving many other types of files from the storage receiver, items like images, rundowns, etc. that at this time are locked away because no one wants their staff monkeying around in that folder looking for these files. They could be automatically emailed or pushed to a web server or content management system for use. The WSH makes it easy to automate.

I am including a link to my script for your examination. In part 2, I will show you how I used a script to retrieve and report on the Cartchunk data stored in the wav files.

PromoSyncConv_v1_1.zip
MSDN Reference Material for WSH