Serial console program that will show state of modem control pins alongside text

So here's the deal.

I am working with an issue where serial data is coming down the line; I need to monitor the transition of a GPIO line and see the precise point in the serial datastream that the line transitions, if at all. I can put the line on the scope - but that won't interpret the serial. I think my best hope is to use the same device for both, by using one of the modem control lines (one of the 4 inputs - don't care which).

hTerm will show me their status, but that doesn't do what I need - I need to see the state of that modem control line alongside the received characters.

Anyone know of any serial terminal software that will do this? I'm pretty desperate - I'm actually willing to pay for commercial software if that's what it takes.

DrAzzy:
I am working with an issue where serial data is coming down the line;

Coming down the line TO an Arduino or FROM an Arduino?

If it is data being received by the Arduino maybe you could write your own version of "SoftwareSerial" to detect whatever you need?

If the serial data is being received by a PC over a USB cable how can it know when any particular I/O pin is changed?

...R

Both sides are third party application specific AVR boards, though one side is a custom bootloader, and the other side has the AVR acting in a funky bridge configuration; neither of them can really be disturbed without rendering the work irrelevant to the actual issue at hand. So we're stuck with the serial line itself. I guess I could write something to

It's being received by a PC over a USB cable. I can connect the IO line that I care about to one of the 4 modem control inputs on the serial adapter, so it's entirely able to know the state of that pin.

In the past I've done this with hTerm - and it's got those 4 little circles in the UI that turn red or green depending on the state of the pin - it was an incredible asset during my last big project - but now the timing of the pin transition vis-a-vis the characters is critical.

Like, if I had super human eyesight/reactions, and could see what character was being printed at the moment that icon changed from red to green, hTerm would work...

Of course, what I really want is to have a scope that can decode serial and show the serial data alongside the trace...

I'm probably in very deep water here but as nobody else has been foolish enough to jump in ...

Could you use a separate Arduino to monitor the data line(s) and both interpret the data and identify the transitions?

...R

Like Robin says, use a man in the middle Arduino (Mega or Leonardo) to monitor the I/O line and pass through serial data. When the line transitions then inject a control sequence into the Device>PC line so the transition point shows up on the serial monitor. You could then go further and use PC software that strips the control sequence from the incoming stream if needed.
As an example, say you decide on a control sequence of !!!0 or !!!1 depending if the IO goes high or low and your receiving a stream of data/text the result going to the PC would maybe look like...

The quick brown f!!!0ox jumped over the !!!1lazy dog.

The transition points were the f after fox and just before the l in lazy.

I think that's my best hope, I was hoping I could get away with a fancy terminal program and do it with the adapter I already have spying on the serial data. Gotta be super aggressive about reading the UART though and not getting screwed by the receive buffer... At least it's only 9600 baud.

Actually, if I used an 841, I could monitor both directions at once - though then there's the question of what to do with that data... I've already got 4 serial adapters hooked up and am starting to go crosseyed with all the hterm windows, I'd rather not have to add any more than necessary.

It does have to be going to another port; Our world is filled with uncertainty, but one thing of which I am fully confident is that if I injected a bunch of exclamation points into the data stream, it would NEVER work.

Robin2:
I'm probably in very deep water here

Damn right it is, with sharks too - but you need a lot of water if you hope to soak someone, no?

I just hope I can pull it off without having to do some painful software serial implementation (if I find that I need to see whether a transition is happening before, during or immediately after a byte). Ugh... yeah, that's harder than I thought - because I care much more about the state of the pin at the start of a character than I do it's state at the end; by that time, it's too late.

DrAzzy:
I just hope I can pull it off without having to do some painful software serial implementation

I have been assuming that is what you need to do and that you probably know more about that than I do. In case it is any assistance as a jumping off point here is a link to my Yet Another Software Serial

...R

DrAzzy:
Our world is filled with uncertainty, but one thing of which I am fully confident is that if I injected a bunch of exclamation points into the data stream, it would NEVER work.

I picked them as an example based on the debug sequence used in the old bootloader but as the sequence is being sent from the target Arduino to the Pc I would think is does not matter. :smiley: