Using pseudo tty rather than serial port

Greetings

My computer is too far from my weather station base unit for reliable serial comms and since I already have CAT5 through the house I’m going to encapsulate the serial data over Ethernet using a redundant Linux capable embedded controller using something like sredird, sercd, ser2net or serialoverip.

At the PC end, the data stream will appear as a pseudo tty (pty) - does anyone know it the Linux WD will attach to this or does it require a real serial port (some of the termios functions will return an error on a pty). Seems a shame to waste 2 serial ports on the PC to loop it out and back in again if I can’t do it this way!!

Robin.

redundant Linux capable embedded controller using something like sredird, sercd, ser2net or serialoverip.
I just looked at freshmet, don't those need a computer on both ends of the ethernet?

Chris

Hi Chris

Yup - these applications all use a Linux computer at each end - one end will be the little embedded device (actually a PowerPC based device the size of a cigarette packet) and the other will be the PC thats running WD.

La Crosse ----> embedded =======> PC
where — is serial and === is ethernet

Once it gets to the PC, I can either send the data out a serial port and loop it back into a second port so that WD knows no different to the weather station being plugged directly in, or I can connect the ethernet stream to one end of an ‘internal’ tty device and the other end to WD. In this case WD won’t be using a serial port at all :-))

It all depends on how the serial device is selected in WD - if its ‘hard coded’ to COM1/COM2 etc then I’m stuck with a physical serial port. If its coded to /dev/ttyS0/1 then I can change that to /dev/ttyp1 and connect my ethernet pipe to ptyp1 (or whatever!!).

Hope thats clear - probably best to try it and see in the 30 days grace before I have to pay for WD (I assume thats how it works…).

Cheers

Robin

It all depends on how the serial device is selected in WD - if its 'hard coded' to COM1/COM2 etc then I'm stuck with a physical serial port. If its coded to /dev/ttyS0/1 then I can change that to /dev/ttyp1 and connect my ethernet pipe to ptyp1 (or whatever!!).

Hope thats clear - probably best to try it and see in the 30 days grace before I have to pay for WD (I assume thats how it works…).


I am not for certain, but I think it is coded to /dev/…
And yes you do get a “grace period”. It is actually based on the # of program starts(either 20 - 30 I don’t recall which)

Chris