Parallax Serial Terminal missing recv bytes
RockyD
Posts: 17
I saw characters being sent to the serial terminal where there were characters missing. At some point the serial terminal locked up on me and I had to terminate the process. I relaunched a new instance of the serial terminal and all of the problems went away.
I think there might be a rarely hit bug with the serial terminal. I searched the forums and could not find any posts about it. I have not been able to repro it again. I thought I would mention this experience in case it might be helpful in tracking it down in the future.
I was working on a project where the propeller was sending values to the PC using FullDuplexSerial. I was receiving these values using Parallax Serial Terminal. The speed was 1200 baud, and I am using a 5Mhz crystal. I am also using a Max3232.
In this case I have no reason to think the hardware is setup wrong or the hardware is programmed wrong. It had worked before and after with no problems.
Rocky
I think there might be a rarely hit bug with the serial terminal. I searched the forums and could not find any posts about it. I have not been able to repro it again. I thought I would mention this experience in case it might be helpful in tracking it down in the future.
I was working on a project where the propeller was sending values to the PC using FullDuplexSerial. I was receiving these values using Parallax Serial Terminal. The speed was 1200 baud, and I am using a 5Mhz crystal. I am also using a Max3232.
In this case I have no reason to think the hardware is setup wrong or the hardware is programmed wrong. It had worked before and after with no problems.
Rocky
Comments
So how old is the system? Is it underpowered? What processes are running in the background? These are the questions you should be asking yourself and then taking a look.
Sure, it might be a bug in the terminal and I could be wrong but I'm more likely to be right that it's not the terminal. Did you try another serial terminal? Use TeraTerm as it is full featured and free, if you stiil have problems then it's your PC.
What is the possibity of this just being a bad cable? Just curious.
@Rocky, don't assume anything, just meter the connections, especially the ground from your board to the PC. The other possibility is the MAX3232 if the caps are not soldered correctly or I could keep guessing. You know that a photo tells a story, until then we are just imagining what your system looks like. Schematics+photo+software ---> better answers!
The things I notice:
Baud rate 1200: The baud rate is so slow, are you sure you are not seeing a simple buffer overrun? - not likely, but have to ask.
Restarting the process fixed the symptom, and the issue is not reproducible. This could point to the INSTANCE of the terminal program. For example, the process did not grab the port properly, and/or another process was interfering with the port.
I saw possibly similar issues when I recycled an old PC for lab use. I did not want clutter the PC with every update and feature from windows update (I just wanted a serial port) and things did not work right. Eventually I found it had something to do with .NET and service pack 3 (?) so I reinstalled windows and allowed a full windows update (required several restarts) and it worked.
In any case, if you can't reproduce the issue, you probably can't fix it, because you cannot determine if any change you make causes it to go away. Unless you can determine a "root cause" that explains the symptom and its non-reproducible nature, it might be difficult to figure out what to fix, and whether it worked.
I really did not have any particular thoughts on the subject. However, whenever I have a peripheral problem that mysteriously appears and just as mysteriously disappears, I have found that many problems can be resolved by swapping the cable, but this experience is mostly with printers, scanners, etc....
Bruce
@Peter, My system is a dual Xeon quad core. It is unlikely my system ran out of resources. It is not underpowered, I have a 1000W supply. The serial terminal did lock up on me and I had to end process on it. This is why I think there might be a small bug with that program. And, you are right that it could also be a Windows issue (Server 2008 R2). It has worked fine before and continues to work fine immediately after. And sorry, my digital camera no longer takes pictures. That is another story involving connecting the propeller to it.
@Bruce, This cable is an RJ45 serial cable I made. The serial port on my motherboard uses an RJ45 connector rather than a DB9. The other ends of the cable are connected to my bread board directly. The cat5 copper wires fit great into the bread board. While the serial terminal was having problems, I reinserted the wires into the breadboard as well as re-connected the the RJ45 plug. This did not change the behavior of characters still missing.
@Prof_braino, I do not think that there was a buffer overrun. I did suspect this at first, but then I remembered that FullDuplexSerial waits for room in outgoing buffer before it copies to it. And you are right that I cannot fix a problem that will not reproduce anymore. I just posted hear in case someone has seen this before or might in the future.
Thanks,
Rocky
'Sorry if this seems obvious, but I have to ask: You do realize that the PST disables itself when you click in another window, right?
-Phil
Also I did notice another thread:
http://forums.parallax.com/showthread.php?133582-Parallax-Serial-Terminal-Possible-Bug
But, I only had the lock up once.
That looks like a "surgical fix" to the problem I experienced. But as you see, it is difficult to determine all the registry keys that need attention, I think it can vary depending on machine and installed software. Reformat and reinstall is more like "fall back to the ship and nuke them from orbit, its the only way to be sure". Reformatting from scratch is still the only general fix for windows as it addresses all issues, even those indirectly related to the symptoms. Unless you know the exact cause and steps to correct, reinstall is the fastest and easiest fix.
But as you point out, since your issue is not reproducible, it might be different. I still recommend "nuke them from orbit", that way if you ever do see the problem again (and I bet you won't) you can eliminate OS configuration issues from your investigation.