How do I use jpnevulator to capture and log the serial traffic between an application and hardware serial port?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the question again in a more specific way, I will be able to get an answer I can understand.



I have some application running in linux that communicates with an external device attached to a serial port. I want be able to capture and log the data sent in both directions between the application and the device, with timestamps at the beginning of each line in the file.



As a test case, I am using minicom as the application I want to monitor, connected via a null modem cable to another computer also running minicom. I have already confirmed that, if I type characters on either of the computers, characters appear in the other computer's terminal. So far, so good.



I then found this question:



How can I monitor serial port traffic?



In the answer to this question, the program jpnevulator is suggested. However, when reviewing the man page, I could not figure out the right way to use jpnevulator to get what I want. Here is what I tried to do:



First, I opened a terminal window and typed the following command:



$jpnevulator --tty=/dev/ttyS0 --pty --pass --read --ascii --timing-print --file=serial.log


I saw the output:
jpnevulator: slave pts device is /dev/pts/18



I then opened another terminal window and typed the following command:



minicom -D/dev/pts/18 -b115200


Minicom opened without complaint.



However, when I typed characters in either terminal (local and remote), nothing appeared in either terminal. jpnevulator only logged the data written to /dev/pts/18.



My expectation is that jpnevulator :



  1. reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.


  2. reads data from /dev/ttyS0 and "passes" this data on to /dev/pts/18 while also writing this data to the specified file.


I am aware of the remark in the faq that says "Jpnevulator was never built to sit in between the kernel and your application. I'm sorry."



However the very same faq states in the second paragraph down: "Now with a little bit of luck some good news: A little while ago Eric Shattow suggested to use pseudo-terminal devices to sit in between the kernel and your application." That is the approach I am trying to take but I am having no success. What am I missing?



Thanks to all in advance.



Cheers,
Allan



p.s.
I was successfully able to capture the back and forth traffic using the socat method mentioned in the existing question I referenced but this method did not offer any way of timestamping the traffic. I was hoping that jpnevulator would have provided this for me.









share

























    up vote
    0
    down vote

    favorite












    OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the question again in a more specific way, I will be able to get an answer I can understand.



    I have some application running in linux that communicates with an external device attached to a serial port. I want be able to capture and log the data sent in both directions between the application and the device, with timestamps at the beginning of each line in the file.



    As a test case, I am using minicom as the application I want to monitor, connected via a null modem cable to another computer also running minicom. I have already confirmed that, if I type characters on either of the computers, characters appear in the other computer's terminal. So far, so good.



    I then found this question:



    How can I monitor serial port traffic?



    In the answer to this question, the program jpnevulator is suggested. However, when reviewing the man page, I could not figure out the right way to use jpnevulator to get what I want. Here is what I tried to do:



    First, I opened a terminal window and typed the following command:



    $jpnevulator --tty=/dev/ttyS0 --pty --pass --read --ascii --timing-print --file=serial.log


    I saw the output:
    jpnevulator: slave pts device is /dev/pts/18



    I then opened another terminal window and typed the following command:



    minicom -D/dev/pts/18 -b115200


    Minicom opened without complaint.



    However, when I typed characters in either terminal (local and remote), nothing appeared in either terminal. jpnevulator only logged the data written to /dev/pts/18.



    My expectation is that jpnevulator :



    1. reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.


    2. reads data from /dev/ttyS0 and "passes" this data on to /dev/pts/18 while also writing this data to the specified file.


    I am aware of the remark in the faq that says "Jpnevulator was never built to sit in between the kernel and your application. I'm sorry."



    However the very same faq states in the second paragraph down: "Now with a little bit of luck some good news: A little while ago Eric Shattow suggested to use pseudo-terminal devices to sit in between the kernel and your application." That is the approach I am trying to take but I am having no success. What am I missing?



    Thanks to all in advance.



    Cheers,
    Allan



    p.s.
    I was successfully able to capture the back and forth traffic using the socat method mentioned in the existing question I referenced but this method did not offer any way of timestamping the traffic. I was hoping that jpnevulator would have provided this for me.









    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the question again in a more specific way, I will be able to get an answer I can understand.



      I have some application running in linux that communicates with an external device attached to a serial port. I want be able to capture and log the data sent in both directions between the application and the device, with timestamps at the beginning of each line in the file.



      As a test case, I am using minicom as the application I want to monitor, connected via a null modem cable to another computer also running minicom. I have already confirmed that, if I type characters on either of the computers, characters appear in the other computer's terminal. So far, so good.



      I then found this question:



      How can I monitor serial port traffic?



      In the answer to this question, the program jpnevulator is suggested. However, when reviewing the man page, I could not figure out the right way to use jpnevulator to get what I want. Here is what I tried to do:



      First, I opened a terminal window and typed the following command:



      $jpnevulator --tty=/dev/ttyS0 --pty --pass --read --ascii --timing-print --file=serial.log


      I saw the output:
      jpnevulator: slave pts device is /dev/pts/18



      I then opened another terminal window and typed the following command:



      minicom -D/dev/pts/18 -b115200


      Minicom opened without complaint.



      However, when I typed characters in either terminal (local and remote), nothing appeared in either terminal. jpnevulator only logged the data written to /dev/pts/18.



      My expectation is that jpnevulator :



      1. reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.


      2. reads data from /dev/ttyS0 and "passes" this data on to /dev/pts/18 while also writing this data to the specified file.


      I am aware of the remark in the faq that says "Jpnevulator was never built to sit in between the kernel and your application. I'm sorry."



      However the very same faq states in the second paragraph down: "Now with a little bit of luck some good news: A little while ago Eric Shattow suggested to use pseudo-terminal devices to sit in between the kernel and your application." That is the approach I am trying to take but I am having no success. What am I missing?



      Thanks to all in advance.



      Cheers,
      Allan



      p.s.
      I was successfully able to capture the back and forth traffic using the socat method mentioned in the existing question I referenced but this method did not offer any way of timestamping the traffic. I was hoping that jpnevulator would have provided this for me.









      share













      OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the question again in a more specific way, I will be able to get an answer I can understand.



      I have some application running in linux that communicates with an external device attached to a serial port. I want be able to capture and log the data sent in both directions between the application and the device, with timestamps at the beginning of each line in the file.



      As a test case, I am using minicom as the application I want to monitor, connected via a null modem cable to another computer also running minicom. I have already confirmed that, if I type characters on either of the computers, characters appear in the other computer's terminal. So far, so good.



      I then found this question:



      How can I monitor serial port traffic?



      In the answer to this question, the program jpnevulator is suggested. However, when reviewing the man page, I could not figure out the right way to use jpnevulator to get what I want. Here is what I tried to do:



      First, I opened a terminal window and typed the following command:



      $jpnevulator --tty=/dev/ttyS0 --pty --pass --read --ascii --timing-print --file=serial.log


      I saw the output:
      jpnevulator: slave pts device is /dev/pts/18



      I then opened another terminal window and typed the following command:



      minicom -D/dev/pts/18 -b115200


      Minicom opened without complaint.



      However, when I typed characters in either terminal (local and remote), nothing appeared in either terminal. jpnevulator only logged the data written to /dev/pts/18.



      My expectation is that jpnevulator :



      1. reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.


      2. reads data from /dev/ttyS0 and "passes" this data on to /dev/pts/18 while also writing this data to the specified file.


      I am aware of the remark in the faq that says "Jpnevulator was never built to sit in between the kernel and your application. I'm sorry."



      However the very same faq states in the second paragraph down: "Now with a little bit of luck some good news: A little while ago Eric Shattow suggested to use pseudo-terminal devices to sit in between the kernel and your application." That is the approach I am trying to take but I am having no success. What am I missing?



      Thanks to all in advance.



      Cheers,
      Allan



      p.s.
      I was successfully able to capture the back and forth traffic using the socat method mentioned in the existing question I referenced but this method did not offer any way of timestamping the traffic. I was hoping that jpnevulator would have provided this for me.







      tty monitoring serial-port pseudoterminal





      share












      share










      share



      share










      asked 4 mins ago









      AWM

      11




      11

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478528%2fhow-do-i-use-jpnevulator-to-capture-and-log-the-serial-traffic-between-an-applic%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478528%2fhow-do-i-use-jpnevulator-to-capture-and-log-the-serial-traffic-between-an-applic%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?