How do I use jpnevulator to capture and log the serial traffic between an application and hardware serial port?
Clash 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 :
reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.
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
add a comment |Â
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 :
reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.
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
add a comment |Â
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 :
reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.
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
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 :
reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file.
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
tty monitoring serial-port pseudoterminal
asked 4 mins ago
AWM
11
11
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password