Getting Notified From Radio Frequency using RTL_SDR and Opsgenie

Sat, Apr 13, 2019 2-minute read

Alerting usually lives in the world of servers and APIs, but there’s no reason it has to. In this article, I’ll show how to get notified straight from radio signals, tying together an RTL_SDR stick, a ham radio, and Opsgenie.

Setup and System

  • RTL_SDR USB stick
  • Ham radio
  • Opsgenie account

The heart of this is a nice SDR scanner created by madengr called ham2mon (https://github.com/madengr/ham2mon). I edited this Python script so that it fires an alert when a specific frequency and squelch value match the ones we’re listening for.

For the alerting side, I basically followed the Opsgenie Python SDK tutorial: https://docs.opsgenie.com/docs/opsgenie-python-api#section-create-aler

alarm_Body = CreateAlertRequest(
                message='New message recieved via Radio Freq : '+str(file_freq),
                alias=str(file_freq),
                description='Frequency: '+str(file_freq)+' Squelch:         '+str(squelch_db),
                teams=[TeamRecipient(name='first team')],
                note='New radio stuff happened')
            try:
                response = client.create_alert(body=body)

                print('request id: {}'.format(response.request_id))
                print('took: {}'.format(response.took))
                print('result: {}'.format(response.result))
            except ApiException as err:
                raise ApiException("Exception when calling AlertApi->create_alert: %s\n" % err)

To start scanning and capturing, I used these configurations:

./ham2mon.py -a "rtl" -n 1 -f 434360000 -g 20 -s -40 -v 0 -w

I pointed it at 434.360 MHz because it is legally allowed to use a ham radio with a Class A certificate (which I have 🙂), and the squelch sits at -40 so it won’t pick up anything that isn’t powerful enough.

Cool Part

Now for the fun part, let’s try it out. I’ll be speaking on 433.600 (though the hardware is not rock solid, so it lands at .860).

ham2mon image when getting radio signals from 433.860Mhz

With the signal captured, let’s see the Opsgenie alert.

cool subdomain isn't it

What’s Next

These will be in part 2

  • Using AWS Transcribe to notify you when someone is calling you on a certain frequency
  • Whenever your favorite music is on FM, you’ll get alerts