monitoring /dev/ttyS0 - Unix

This is a discussion on monitoring /dev/ttyS0 - Unix ; Hi I have a modem using the ttyS0 serial port. This port is used by a java application X. I would like to log the data on /dev/ttyS0 when everything is running (modem and java application). So I tried interceptty ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: monitoring /dev/ttyS0

  1. monitoring /dev/ttyS0

    Hi

    I have a modem using the ttyS0 serial port. This port is used by a java
    application X. I would like to log the data on /dev/ttyS0 when
    everything is running (modem and java application). So I tried interceptty
    which is a program that can sit between a serial port and an
    application, recording any communications between the application and
    the device.

    ####> /interceptty -o test.log /dev/ttyS0 /dev/toto &
    ####> stty -F /dev/toto cs8 -cstopb -parenb crtscts ispeed 115200 ospeed
    115200

    ####>tail -f test.log | ./interceptty-nicedump

    the link /dev/toto to a pseudotty is created and is set in the java
    application.

    My problem is that the java application can not open /dev/toto

    [root@dockserver19 interceptty-0.6]# ls -l /dev/toto
    lrwxrwxrwx 1 root root 10 Oct 10 10:51 /dev/toto -> /dev/pts/3

    Thanks for any advice
    Cheers

    G.

  2. Re: monitoring /dev/ttyS0

    gliderman writes:
    > ####>tail -f test.log | ./interceptty-nicedump
    >
    > the link /dev/toto to a pseudotty is created and is set in the java
    > application.
    >
    > My problem is that the java application can not open /dev/toto
    >
    > [root@dockserver19 interceptty-0.6]# ls -l /dev/toto
    > lrwxrwxrwx 1 root root 10 Oct 10 10:51 /dev/toto -> /dev/pts/3


    Additionally posting why (ie which error) the Java application could
    not open the pty would be necessary to enable anything except wild
    guesses. The wild guess would be 'Are you perhaps trying to open a
    lone pty-slave?'.


+ Reply to Thread