Inverting the PTT/RTS logic in WSPR

Alright, seeing my interface requires a +ve voltage on RTS to trigger PTT but WSPR sets the RTS to -ve for PTT I needed to do something. A lot of apps allow you to simply invert the logic – such as fldigi – however WSPR doesn’t. So instead I read the code I use from Subversion and inverted the logic myself. Needless to say, I’ve just succesfully transmitted my first WSPR packets and had them received!! And that’s received some 12,000kms away with only 500mW!!

And to finish with, here’s the diff should anyone else need to do the same:

ian@ian-Latitude-D610:~/wspr-svn$ svn diff ptt_unix.c
Index: ptt_unix.c
===================================================================
— ptt_unix.c    (revision 2331)
+++ ptt_unix.c    (working copy)
@@ -164,10 +164,10 @@
   int control = TIOCM_RTS | TIOCM_DTR;
 
   if(*ntx) {
–    ioctl(fd, TIOCMBIS, &control);               /* Set DTR and RTS */
+    ioctl(fd, TIOCMBIC, &control);
     *iptt = 1;
   } else {
–    ioctl(fd, TIOCMBIC, &control);
+    ioctl(fd, TIOCMBIS, &control);               /* Set DTR and RTS */
     *iptt = 0;
   }
   return(0);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s