I believe FTDI as @dkemppai refers to is just a common chipset/driver for a serial to USB cable.
With a Linux variant (i.e., RPI5), you just 'cat' the serial device created by the FTDI converter. It has been a few years (decades?) since I've done this, but a script something like
sleep 5 < /dev/usb-serial-port &
stty [apppropriate rs-232 baud/parity/data bits] < /dev/usb-serial-port
cat /dev/usb-serial-port > my-data-file
should work. The sleep (or some other trick) is needed since linux kernel reverts the serial-port to default parameters when it is closed by all devices, by attaching a sleep or something else on it, the stty command can complete and the cat command start without that happening. You can wrap that in a bash script to restart it endlessly (the cat will close if the far end resets the serial connection). A bit more scripting gets you a time/date stamp added to the "my-data-file" name so you get a time & date for each data file, or you can use an append operation >> to just keep growing the same data file
edited to add: I see @dkemppai replied while I was typing
With a Linux variant (i.e., RPI5), you just 'cat' the serial device created by the FTDI converter. It has been a few years (decades?) since I've done this, but a script something like
sleep 5 < /dev/usb-serial-port &
stty [apppropriate rs-232 baud/parity/data bits] < /dev/usb-serial-port
cat /dev/usb-serial-port > my-data-file
should work. The sleep (or some other trick) is needed since linux kernel reverts the serial-port to default parameters when it is closed by all devices, by attaching a sleep or something else on it, the stty command can complete and the cat command start without that happening. You can wrap that in a bash script to restart it endlessly (the cat will close if the far end resets the serial connection). A bit more scripting gets you a time/date stamp added to the "my-data-file" name so you get a time & date for each data file, or you can use an append operation >> to just keep growing the same data file
edited to add: I see @dkemppai replied while I was typing
Last edited: