Tcp/Ip over serial solution

Discussion in 'Linux Networking' started by Steven Woody, Mar 14, 2015.

  1. Steven Woody

    Steven Woody Guest

    I have a web application run on a Linux device, user can access its functionalities from a web browser running on their PC. But in some special situations in which an ethernet connection is not convenient, it's desired that people can connect a bare serial line between their PC to the server's serial port and still can access the the same services using their browsers on PC. In order to implement this, what kind of software/setup will be neededon the Linux and the Windows PC sides perspectively?

    Thanks in advance.

    Steven Woody, Mar 14, 2015
    1. Advertisements

  2. Hi there

    Run PPP over a serial line.
    The serial port has to support all (9) pins except RI, so this won't
    work on some embedded systems.
    I have no idea how to get this to work with Windows.
    For Linux see the leased line mini howto.
    You need a proper null modem cable;

    RXD--------\ /--------RXD
    TXD--------/ \--------TXD

    RTS--------\ /--------RTS
    CTS--------/ \--------CTS

    DTR--------\ /--------DTR
    DSR--*-----/ \-----*--DSR
    | |
    DCD--+ +--DCD


    Rob van der Putten, Mar 14, 2015
    1. Advertisements

  3. Steven Woody

    Lew Pitcher Guest

    Assuming that both the Linux system and the Windows system have compatible
    serial devices available (i.e. both have PC/AT serial devices, compatible
    modems, etc),

    On Linux: run /either/ the pppd daemon ("Point to Point Protocol", or the
    older slip ("Serial Line Interface Protocol") tools (eg: slattach,
    sliplogin, et al). Ensure that these use the serial device that the Windows
    machine will connect to. You might want to read Chapter 7 of the Linux
    Network Administrators Guide ( for
    some assistance here.

    On Windows: configure the "Dial Up Networking" support to use the serial
    device and protocol (SLIP or PPP) that connects the Windows machine to the
    Linux machine.

    Start both sides of the communications link.
    Lew Pitcher, Mar 14, 2015
  4. Steven Woody

    Steven Woody Guest

    Thanks for telling me this. The server may not have enough number of 9-pin serial ports, but on its front panel there is an USB port, if the ppp over serial solution can work on an usb2serial port, it would be perfect to me. Do you think is it possible? Thanks a lot.

    Steven Woody, Mar 14, 2015
  5. Hi there

    It might be possible to tell de PPPD to ignore DSR and DCD. You need
    flow control tough.
    It might also be possible to run PPP directly over USB.

    Regards, Rob
    Rob van der Putten, Mar 14, 2015
  6. Hi there

    Lew Pitcher wrote:

    AFAIK Windows expects AT stuff (RING, CONNECT, etc). So the Linux box
    needs to fake these.

    Rob van der Putten, Mar 14, 2015
  7. Steven Woody

    Steven Woody Guest

    Since the Windows side should always be the master or dialling side, so I am not worry about the RING stuff, it there would be RING, that must appear on the Linux side. But for the CONNECT stuff, I want to ask why the Windowside ppp cannot manage to find a way to work out?

    Maybe I did not mention it clearly, that modem to modem is an option and directly serial link via null modem cable is another option, I want to know the setup for the both situations. Thank!

    Steven Woody, Mar 15, 2015
  8. Hi there

    I tried to get MS Windows PPP to work in a true peer-to-peer (no dialin
    - dialout (emulation)) setup some 20 years ago. I never got it to work.
    MS Windows is highly inflexible and just doesn't support PPP over null
    modem cables. It really insists on telephone network related stuff.
    If you want to use modems without some sort of telephone exchange, you
    need modems with leased line capability.
    Modems compress data, so you need RTS-CTS flow control.
    A leased line like setup is just like a null modem cable. However, if
    you set the modems to leased line mode without disabling the
    resultcodes, you might just be able to fool MS Windows.

    Rob van der Putten, Mar 15, 2015
  9. Steven Woody

    Steven Woody Guest

    Dear Rob,

    Why 'modem compress data' can lead to requirement for RTS/CTS flow control?

    Steven Woody, Mar 16, 2015
  10. Steven Woody

    Tauno Voipio Guest

    The asynchronous serial transmission does not, by default, know
    if the receiver is able to get all the data sent, and this is
    the base reason for flow control. It may be effected with hardware
    (RTS/CTS) or software (X-on/X-off).

    If a modem suddenly decompresses a big burst of data, it may
    be too much for the buffers in the receiving unit. With the
    speeds of current computers, the probability is quite low.
    Tauno Voipio, Mar 16, 2015
  11. Steven Woody

    Steven Woody Guest

    I understood, thank you. BTW, do you know if it is possible that analog telephone line also employ data compression? I remembered a long ago read paper said compression should only happen in digital telephone line, not sure if it's true.

    Steven Woody, Mar 16, 2015
  12. Hi there

    A serial port will usually run on 115200 bps. The modem speed is lower,
    E.G. 28800 bps. This will work without flow control, as long as you
    transmit data that can be compressed a lot. It will fail with data that
    is already compressed, such as images.
    Unless of course, when you set the serial port to the same speed as the

    Rob van der Putten, Mar 16, 2015
  13. Hi there

    Compression on telephone lines messes up modem and fax signals.
    VOIP data is compressed. But VOIP is intended for voice only.

    Some info on modems;

    Rob van der Putten, Mar 16, 2015
  14. Steven Woody

    Steven Woody Guest

    Thanks a lot.
    Steven Woody, Mar 16, 2015
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.