Scanner

I love news, whether a constant stream of world-wide news from Twitter down to the county fire/EMS scanner, I like knowing what's going on. To listen to a scanner requires either a radio or a one of a variety of online scanner services, which vary in quality and availability. The problem I have with online scanners is that they are based on the Internet radio model, which while obvious and simple to implement, is terribly inefficient. Unlike listening to the radio, the scanner is primarily silence, at least in the rural area I live in. So I implemented my own!

Due to topographical issues I can't pick up the Otsego County, New York, fire/EMS scanner with a portable scanner. So the first thing was to get a big antenna and put it on my roof. Check.

scanner1.jpg
And a scanner. It's actually not so much scanning, but permanently set to my local dispatch frequency of 46.440 MHz.

scanner2.jpg
That gets fed into one of my computers that's always running. A server running in Apache Tomcat (Java) listens to the audio input, locates the silence, and splits the incoming audio transmission into individual transmissions. It's separate app on the theory that I could deploy this on inexpensive single board computers to remote locations since that part doesn't take much CPU or bandwidth.

The fun happens on the second Tomcat webapp. Since dispatch calls are preceded by tones, it divides the sample into smaller buckets and runs a fast Fourier transform (FFT) on each bucket. From this I can detect the frequency and length of the tones. And from that, short tone pairs, long tones, and some other things that they use where I used to live. From a list I found online and some experimentation I know which department the call is for.

The first thing I did was write a simple HTML5/CSS/Javascript page to display and play the sounds. There's of course a server-side Apache Tomcat component as well. One of the important things is that there's a servlet that waits for new transmissions, holding the connection open for a period of time (currently, 55 seconds) and immediately returns the transmission if there is one, otherwise waits for timeout. This keeps the network traffic way down compared to constantly streaming audio. Typically, under 100 bytes per minute during silence.
scanner5.jpgThat was a good start, but the next step was making a native iPhone app. That made it work a little more smoothly than having to open up Safari.


scanner3.jpg
The real improvement was after I made it configurable.

scanner4.jpg
With a few clicks I can configure which squads I get push notifications for. It dramatically cut down on the number of notifications I got, because I was really only interested in what happened in the few towns closest to me, anyway.

And that's it! It's currently not open to the public mainly because I'd have to deploy it on a larger public server and pay for bandwidth, and it's not entirely clear if there's a lot of demand or benefit to doing so. And get the app approved by Apple. But it was a cool project, and I use it all the time.

About this Entry

This page contains a single entry by Rick Kasguma published on June 3, 2013 8:47 AM.

Keyless Entry was the previous entry in this blog.

Reading e-books is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Categories

Pages