Here's a snippet for sending files via serial from #OpenBSD (and other BSD systems) via direct RS232 serial using YMODEM (set to 57600 baud for great success, in my case the transfer likes to fail at higher speeds):

First you need lrzsz for sending stuff:

# pkg_add lrzsz

Then establish a serial connection:

$ cu -l /dev/cua00 -s57600 -d
Connected to /dev/cua00 (speed 57600)

Then (on a "clean" line, so perhaps press Enter once for good measure) issue the cu command:
~C
Which forks out and asks for a command you'd like to execute.
Run:

*Local command?* lsz --ymodem ~/file-to-send.bin
Sending: file-to-send.bin
Bytes Sent:1881472/5125910 BPS:5243 ETA 10:18

Then put the other machine in YMODEM receiving mode and rub your hands together in glee.

Other methods that work but are discouraged:

cu(1) actually has XMODEM transfer baked in (running the ~X command once connected) but I found it to be unreliable and slow. Don't use it.

Depending on your use case you might be able to use the ~> command in cu(1) as well, but that will just directly write file contents to the serial connections, "raw". In my case this was NOT what I wanted as I wanted to send stuff to a non-unix machine. But if you did, then you'd probably need to just cat the output of the serial connection to a file on the receiving end.

#RunBSD #retrocomputing