Negative PPM value for RTL_FM

A friend was setting up an APRS i-gate with a Raspberry Pi and an RTL-SDR receiver and ran into the issue that he needed to configure it for a negative PPM value for frequency correction. When providing rtl_fm with the PPM correction, it expects it in the format of rtl_fm -p nn where nn is the PPM value. The problem with this, is that a negative value starting with a - is interpreted as a parameter and throws an error. The solution is to enclose the value in double quotes, such as rtl_fm -p "-nn" The final command looks something like this:

rtl_fm -p "-5" -f 123.45

If you're running it in Linux from a script where your command is already enclosed in quotes, use backslashes to escape your quotes for the PPM value:

DWCMD="rtl_fm -p \\"-5\\" -f 123.45 | direwolf -options"

That's all there is to it. Despite the lack of useful information on the internet and in the documentation, it is possible to run rtl_fm with a negative PPM value.

Tags : radiortl-sdrlinux

Published on  June 20th, 2017