Linux – Serial Over IP or USB over IP

linuxserialtcp/ipusb

Need to connect remotely to a device using cellular GPRS gateway.

Device supports RS-232 and USB. It boils done to two options:

1.- Serial Over TCP/IP (Serial to Ethernet – to GPRS, or Serial to GPRS)

2.- USB Over TCP/IP (USB to Ethernet – GPRS, or USB to GPRS)

Note that there are gateways that allow transparent communication from TCP network communications to serial port. Example: Serial to GPRS Gateway.

End goal is to have a virtual serial tty port. Tools like Socat in Linux allows this.

So application programs will think that the device is connected locally to the computer.

Which one should I use? People tell me definitely Serial over IP due to USB latencies issues…

P.S. I'm talking about Virtual Serial Port.

Best Answer

I don't know what "Serial over IP" is -- TCP/IP provides a bidirectional socket connection that can carry many different application protocols. I've never seen an off-the-shelf RS-232-to-GPRS box. You'll probably have to build something custom -- either using a GPRS module designed to interface with an MCU (these typically have a built-in TCP/IP stack, so the MCU used can be quite basic), or a USB GPRS modem hooked up to an embedded board (my recommendation). If you're building a one-off prototype, I'd recommend getting something like an OLinuXino imx233 or a Raspberry Pi, and getting a $25 Huwei USB-GPRS modem.