I need to get data from a serial device (a weather station) over our network where it'll be processed by a Unix host (using custom software). I was able to compile remserial which makes the remote serial device act like a tty. Remserial was designed for Linux but should work on OS X (which I'm using) and FreeBSD.
What is not clear to me, though, is if a serial-to-ethernet adapter or serial server uses some sort of standard protocol for how it communicates via a network socket, or if every brand is different. More to the point, can I buy any serial-to-ethernet adapter and expect remserial to work with it, and if not, are there any you'd recommend (or other pieces of software glue I should consider)?
No. One device from some vendor will not be compatible with another vendor. Who knows what their low-level protocols are like, but there's nothing like a standard that I am aware of.
I'm not sure if I understand the scenario though... in what case is a long serial cable not long enough (assuming 9600 baud) but a ethernet cable that can be what, 100 meters, is long enough?
There aren't standards for remote serial port forwarding control protocols that I know of, but most serial terminal server devices offer a bare-bones "raw" mode that simply moves data in and out of the serial port w/o any control mechanism.
The remserial documentation says:
There is no protocol, then, on the remserial side. On that basis, you should be able to locate a serial terminal server / "Ethernet to serial" device that offers such a "raw" capability and you'll be fine.
I used to use the IOLAN serial terminal servers years ago. It looks like they're still available, and the IOLAN DS1 model will probably do what you want. Reading thru the manual, it looks like the "Serial Tunneling Profile" would probably do waht you need.