srrctl, a Perl script to control a Quintech L-band switch

We use Quintech SRR2150 L-band switches at our teleports. These are simple devices for switching L-band inputs and outputs. The most common application for one is to switch inputs to a spectrum analyser. This allows me to use one spectrum analyser to monitor several inputs (multiple antennas, multiple polarisations on the same antenna, etc).

Quintech’s switches are pretty basic. They have a front control panel, an interactive shell accessible by serial or telnet, and a custom communications protocol over 9100/TCP. Quintech provide a basic Windows management application, but it is either rudimentary (version 1.0) or totally broken (version 2.06). Why not control it from the command line? Thankfully Quintech have fully documented their management protocol, and implementing it in Perl was a few hours’ work back in 2007.

Behold, srrctl. The current version is 0.32. Right-click, save it somewhere like $HOME/bin/srrctl, and make it executable:

chmod +x srrctl

It’s pretty easy to use. You can send any documented command with the -c option, but the two you’ll use the most are -g to get the active input, and -s to set it.

srrctl 192.168.3.101 -g

srrctl 192.168.3.101 -s 1

If this seems odd to you, that’s the literal communications protocol output. To request the current input, you send a “Q” character to 9100/TCP along with a header and checksum, and get back “Q” followed by a 2-digit port number. To set the input you do something similar, and get back an “S” to confirm that it was set correctly.

With srrctl you can now script L-band switch actions, or even make a simple modperl web page to control them.

Quintech switches are definitely not secure. Firewall them or someone’s going to do bad things to it. The new nmap scripting system and srrctl makes that really easy to do.

Tags: ,

Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.