Keyboard Shortcuts
Likes
Search
FLDIGI - RTTY output to Serial Device
Greetings:
?
I have setup an RTTY -> phone -> modem ->ASR-33 demo here at the Computer Museum @ System Source (Hunt Valley, MD) ()
?
I am taking an RTTY Feed, (for example ) and feeding the sound into a telephone handset.
?
When the handset is in a modem (I am just using the modem microphone since I don't think we have a modem for 45baud, Baudot) the sound goes into the sound card and is decoded by fldigi.
?
I have not figured out how to easily get the text (which appears on fldigi screen) to the serial port which goes to the teletype.
?
I have hacked it by logging the RTTY text to a file, and then I am using a Python script to clean up the log file and print on the ASR-33.? Hoping to find a way to simplify and pipe the rtty signal directly to /dev/ttyUSB0.
?
Thanks
Bob
?
(More details, not really important for the question, but here is the setup)
Raspberry Pi 5, with USB sound dongle:
mplayer gets rtty feed.? Sound redirected from HDMI to USB Sound Dongle that is wired to old school Dial-up telephone.? When phone goes off hook, we hear the RTTY signal from the phone earpiece.
Earpiece is set in acoustic modem.? just used the microphone which is wired back into microphone input on USB sound dongle.? Fldigi decodes RTTY, and logs to /home/pi/.fldigi/fldigiyyyymmdd.log
Python opens the file, skips two the end, the cuts the beginning of each line which logging info, and it sends the ASCII text to a USB->Serial Dongle.? ASR-33 has a 3rd party card to take RS-232 as input instead of Current loop.
?
?
? |
|||
开云体育Look at the $HOME/.fldigi/talk/textout.txt file --David KI6ZHD On 04/18/2025 10:02 AM, Bob Roswell,
KC3KCS via groups.io wrote:
|
|||
开云体育Nice!? That is a bit easier to use, and I did not find it.? Any way to redirect that directly to the serial port? (USB) ? From: [email protected] <[email protected]>
On Behalf Of David Ranch, KI6ZHD via groups.io
Sent: Friday, April 18, 2025 1:29 PM To: [email protected] Subject: Re: [linuxham] FLDIGI - RTTY output to Serial Device ?
On 04/18/2025 10:02 AM, Bob Roswell, KC3KCS via wrote:
? |
|||
开云体育
Sure: ?? cat textout.txt > /dev/ttyUSB0 --David KI6ZHD
|
|||
开云体育In the Misc section of the FLDIGI configuration you can choose 'RX text capture' and enable 'rx text stream' in the window that pops up.?That stream goes by default to .fldigi/talk/output.txt in your home directory. The best is to write a little script in bash or another of your? favourite languages as you need to set the serial port speed, open output.txt and read it in a loop to see or new characters are appended? to that file and copy/output those to your serial device. Boudewijn VE3TOK
On 4/18/25 13:48, Bob Roswell, KC3KCS
via groups.io wrote:
-- There is nothing permanent except change Heraclitus |
|||
This is untested, but give it a try. It uses the XML interface that is included in fldigi (and I think it was made so that you could do exactly what you are wanting to do!)
?
Make sure you have:
?
Python script follows:
?
import xmlrpc.client
import serial import time # Connect to Fldigi XML-RPC
fldigi = xmlrpc.client.ServerProxy("http://localhost:7362") # Configure serial port for ASR33
ser = serial.Serial( ? ? '/dev/ttyUSB0', ? ? baudrate=110, ? ? ? ? # ASR33 typical speed ? ? bytesize=serial.SEVENBITS, ? ? parity=serial.PARITY_NONE, ? ? stopbits=serial.STOPBITS_TWO, ? ? timeout=1 ) def main():
? ? print("Starting RTTY-to-ASR33 relay...") ? ? previous_text = "" ? ? try:
? ? ? ? while True: ? ? ? ? ? ? # Get current received text from Fldigi ? ? ? ? ? ? current_text = fldigi.main.get_rx_text() ? ? ? ? ? ? # Find new characters
? ? ? ? ? ? if current_text != previous_text: ? ? ? ? ? ? ? ? new_chars = current_text[len(previous_text):] ? ? ? ? ? ? ? ? for char in new_chars: ? ? ? ? ? ? ? ? ? ? if char.isprintable() or char in '\r\n': ? ? ? ? ? ? ? ? ? ? ? ? print(f"Sending: {repr(char)}") ? ? ? ? ? ? ? ? ? ? ? ? ser.write(char.encode('ascii', errors='ignore')) ? ? ? ? ? ? ? ? ? ? ? ? ser.flush() ? ? ? ? ? ? ? ? ? ? ? ? time.sleep(0.1) ?# Adjust for ASR33 mechanical response ? ? ? ? ? ? ? ? previous_text = current_text ? ? ? ? ? ? time.sleep(0.1) ?# Polling interval
? ? except KeyboardInterrupt:
? ? ? ? print("\nStopping...") ? ? finally: ? ? ? ? ser.close() if __name__ == "__main__":
? ? main() ?
|