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
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
Check out the source here: https://github.com/acerion/cwdaemon/blob/master/src/ttys.c Looks like you might change TIOCM_DTR to TIOCM_CTS (line 130), per the constant name in the ioctl_tty man 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