Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Help with Linux application command

    I am new to Linux so please bare with me.

    I need to log all communications between an application and the serial port on the same system.

    I did a little research and found an application called Interceptty that looks like it will do the trick. However, I'm having issues determining the proper sytax.

    Here is a link to the Interceptty webpage...hxxp://

    Here is the command that I thought would work...
    "Interceptty /dev/ttyS0 -o test.txt". It does execute, holds on the command line and creates the output file, but nothing gets logged to the file. I've tried several command line variations to no avail. I also sent an email to the author, but got a bounceback.

    Like I said, I'm new to Linux so I'm sure this will probably be easy one for you guys.


  2. #2
    Just Joined!
    Join Date
    Nov 2011
    Try with setserial (for more option you can use setserial -h) or using minicom for simple to do

  3. #3
    Thanks, but I don't think Setserial will do what I'm looking for. This looks to be more for setting/reading the serial port values. Minicom looks to be more of a communications program.

    I need to capture all communications sent to and received from the serial port from an application.

    Like I said, I think Interceptty will work, but I can't figure out the proper syntax since Linux is pretty much Greek to me at this point.

    The command line I have used is "Interceptty /dev/ttyS0 -o test.txt". The serial port I need to monitor is COM1.

    I'm really under the gun to get this figured out so any help is much appreciated.

    Here is the usage parameters listed on the Interceptty webpage:

    Usage: ./interceptty [-V] [-qvl] [-s back-set] [-o output-file]
    [-p pty-dev] [-t tty-dev]
    [-m [pty-owner,[pty-group,]]pty-mode]
    [-u uid] [-g gid] [-/ chroot-dir]
    back-device front-device
    back-device Use back-device as the device to intercept
    path TTY dev is at /path
    @/path Socket is at /path
    @hostort Inet socket is at hostort
    !prog Run prog for backend
    =rfd[,wfd] Use file descriptors
    front-device Use front-device as the device applications connect to
    path Create symlink at /path
    @/path Socket at /path
    @hostort Inet socket at hostort
    =rfd[,wfd] Use file descriptors
    '-' to prevent creating a front-device.
    Doesn't currently do anything.
    -l Line-buffer output
    -o output-file Write intercepted data to output-file
    -s back-stty Use given settings to set up back-device
    These settings are passed directly to stty(1).
    -m pty-mode Specify permissions for the new pty.
    Format is [pty-owner,[pty-group,]]pty-mode]
    -u uid Switch to given uid after setting up (must be root)
    -g gid Switch to given gid after setting up (must be root)
    -/ chroot-dir chroot(2) to given dir after setting up (must be root)
    -q Activate quiet mode
    -v Activate verbose mode
    -V Print version number then exit
    -p pty-dev Full path to pty device for front-end (used internally)
    -t tty-dev Full path to tty device for front-end (used externally)

  4. $spacer_open
  5. #4
    Your syntax looks all right to my non-interceptty-trained eye. Have you tried the line-buffering output (-l) and verbose (-v) flags? Are you root, in case it is a permissions thing? Anything in dmesg or /var/log/messages about the hardware? Does your command/serial device work as normal, w/o interceptty in between?

  6. #5
    I have tried both the line buffering & verbose commands. No output is displayed on the screen with the -l switch. The -v switch lists "PID xxxxx Monitoring child process" where xxxxx is the PID of the Interceptty program.

    There is nothing reported in messages or dmesg files and the serial device is functioning properly when running Interceptty.

    Yes, I am logged in as root when running this.

    One of the examples lists the following command for monitoring what a program running under VMWare was sending to the serial port
    "Interceptty -s 'ispeed 19200 ospeed 19200' -l /dev/ttyS0 |interceptty-nicedump".

    I'm not running VMWare, but I would think the command should still work under Linux.

    Any ideas?

  7. #6
    Have you tried contacting the author for help? If anybody knows, he should.

  8. #7
    Yes, I sent an email to him last week, but I got a bounceback. Evidently, he no longer has that email address.

  9. #8
    Quote Originally Posted by jjscott View Post
    Yes, I sent an email to him last week, but I got a bounceback. Evidently, he no longer has that email address.
    Sorry, you already said that...

  10. #9
    No problem. Like I said, I'm new to Linux so I'm struggling with the simple things.

    Do you know of another application that will allow me to capture the commincations sent to a serial port that is user friendly? Or at least one where I can get some support?


  11. #10
    Have you tried sniff tty? I was able to install and run it but don't have a good way to test it...

    I'd never heard of it before, but read about it on this thread, courtesy of Rubberman.

    Edit: Another one you might want to check out is SerLook
    Last edited by atreyu; 11-22-2011 at 01:33 PM. Reason: serlook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts