A wrap: I now have my Serialport server talking to the KRT2 radio and its client program, which transfers lists of preset frequencies to and from the radio, successfully downloading presets from the radio.
Much of the problem vanished when I replaced the AXE027 cable with my pFranc RS232 USB adapter and added a three-wire cable terminated in a
3.5mm stereo socket to it. This had to be three-wire because the radio, manages to connect power, two mics, two speakers/headphones and either a remote control head or the presets up/down load facility through a single D-15 socket, so no handshake pins are available.
Yesterday, using ptlrc with a carefully crafted script file that drove a partial download, let me verify that the connection was working.
Today I tried making contact over the cable from krt2, my up/download program. This acts as a client to spd, the SerialPort daemon, which drives the USB adapter and runs the link to the radio. It was immediately obvious that krt2 was able to send data to the radio (its display changed state) but that it couldn't receive. I guessed that was probably in the cflag values (set with tcsetattr(), so compared my settings with ptlrc. Where there were differences I swiped the ptlrc settings, mainly that I hadn't set CLOCAL or CREAD, so I set them and also set IGNBRK and IGNPAR in iflag for good measure and because that couldn't do any harm.
Immediate success, so thank you, Jan, for making ptlrc available.
After that all that was needed was to juggle with timings a bit: the KRT2 has a very slow MPU managing it, and needs a 100mS delay between my program requesting the next preset and starting to read it. I'd been warned that the protocol the radio uses to upload and download presets was a bit flaky and poorly documented, so I also had to adjust some assumptions I'd coded into krt2 so they matched the reality shown by my debugging displays.
The result seems to be fairly robust, if not particularly resilient, but its SLOW. Bearing in mind that the link runs at 9600N1, each preset frequency packet contains 11 characters and the request for the next one is a single ACK, the radio takes 13 seconds to assemble and transmit 10 preset packets. Judging by way the Rx and Tx LEDs flash on the USB adapter, 80-90% of that time is taken up by the radio assembling the next
11 character packet.
Anyway, thanks for your help, guys. I learned stuff I didn't know about the varieties of USB adapters available, and somewhat more about serial port setup than I thought I knew.
My next job: add the code to krt2 (the program) to do the reverse transfer, and upload presets to the radio, but that can wait a bit: the glider the KRT2 lives in badly needs some airtime and I need to look at the world from a glider at cloudbase.