CW keyer with no DTR pin (cwdaemon + cwlib)

Discussion in 'Homebrew and Kit Projects' started by HA4TI, Jan 13, 2021.

ad: L-HROutlet
ad: l-rl
ad: Left-3
ad: L-MFJ
ad: Subscribe
ad: QSOToday-1
ad: Left-2
ad: abrind-2
  1. HA4TI

    HA4TI Ham Member QRZ Page

    Hello fellow hams,

    I'd like to use cwdaemon with a self made interface to my FT-817 radio under linux mint 20. I set up CQRLOG and cwdaemon, however my usb-serial adapter(CP2104-mini kit) does not have the DTR line routed to the pins. I'd like to solve the issue in software, instead of hacking the PCB(which is possible). For that, I'd need to reconfigure either cwdaemon of cwlib to use the CTS line instead of DTR, and maybe invert the logic, to active high.

    Does anyone know, if this is possible and how?

    Thanks and 73,
    Tibi, HA4TI
     
    N8RKD likes this.
  2. W5UAA

    W5UAA Ham Member QRZ Page

    Usually this is done through a configuration file or an option when first starting it up. However,

    Googling "cwlib" doesn't find anything.

    "man cwdaemon" doesn't show any options or configuration file settings having to do with switching from DTR to CTS.

    Doesn't look like there's a way to do it in software.

    Maybe email one of the programmers for a possible answer? I'm sure there's a way to do it in the software, but you'll have to recompile. Maybe by asking the question, someone on the team will be inspired to add that option.

    https://github.com/acerion/cwdaemon

    Contributions from the following people:

    Joop Stakenborg, PG4I <pg4i at amsat.org> (Code Maintainer)
    Rein Couperus, PA0R <pa0r at amsat.org>
    Wolf-Ruediger Juergens, DL2WRJ <wolf at dl2wrj.de>
    Ladislav Vaiz, OK1ZIA <ok1zia at nagano.cz>
    Simon Baldwin, G0FRD <simon_baldwin@yahoo.com> (unixcw libraries)
    Diane Bruce, VA3DB <db at db.net> (FreeBSD support)
    Jason L. Wright, AI4JW <jason at thought.net> (OpenBSD support)
    Jenö Vágó, HA5SE
     
  3. N5HXR

    N5HXR Ham Member QRZ Page

    AE7LP likes this.
  4. HA4TI

    HA4TI Ham Member QRZ Page

    Thank you for the tip! It does the trick.

    Also, I wanted to swap the logic, so that I can use a single transistor to switch the key. For that I did two things. First, change the pin and the logic levels:


    /* CW keying - bit1 (pin 4 for DB-9) */
    int
    ttys_cw (cwdevice * dev, int onoff)
    {
    // int result, y = TIOCM_DTR;
    int result, y = TIOCM_RTS;

    // result = ioctl (dev->fd, onoff ? TIOCMBIS : TIOCMBIC, &y);//original
    result = ioctl (dev->fd, onoff ? TIOCMBIC : TIOCMBIS, &y);
    if (result < 0)
    {
    cwdaemon_errmsg("Ioctl serial port %s", dev->desc);
    exit (1);
    }
    return 0;
    }

    Then, I added one line to cwdaemon.c to line 2734

    cw_register_keying_callback(cwdaemon_keyingevent, NULL);

    global_cwdevice->cw(global_cwdevice, OFF); //Add this line to start the key open, not closed

    73!
    Tibi HA4TI

     
    AE7LP and N5HXR like this.
  5. N5HXR

    N5HXR Ham Member QRZ Page

    Excellent! Nice work. Glad that's working for you. Good luck on the air!
     

Share This Page