The Serial communications saga continues…. Never say die when it comes to serial communications because, like so many things in programming, there are multiple areas where the problem might lie.
Here are the facts as I knew them this morning. Given a hardware configuration (serial port to fiber optic converter to fiber optic converter to Serial to USB converter), I could reliably talk to my device in Mac OS X and Windows XP. In Vista and Windows 7 it failed. The serial port monitor software that I running in Windows was able to see the messages with 100% accuracy while the RB serial control was not.
Sounds like an RB bug, right? I submitted it, with video proof, and had a reasonably happy weekend. The client was not happy, understandably, and after consulting with REAL Software (who, by the way, responded to my email promptly this morning) agreed that it might be a bug and they would be happy to try to reproduce (and ultimately fix it) if we sent them the hardware and a sample program and some money to do it for the R4 release. R4 will come out sometime this fall, by the way.
The client was not happy about the additional cost and the time delay as you can understandably imagine. So I said I’d do some research and figure out if other people are having serial issues too before issuing a recommendation to send all the materials to RS. I’m sure some of you are guessing where this is going.
It just so happens that the specific manufacturer of the Serial to USB Converter (Prolific) has some serious issues with their Windows 7 (and Vista) drivers. After a few more specific web searches I found an alternative (perhaps older) driver that works fine if you do the following in Windows 7: Right click on the properties of the installer, select Run as Administrator and select Vista SP2 under the compatibility popup.
Run the installer, restart Windows 7 and Voila! We now have a fully functioning driver – that works – in Windows 7.
Hindsight, as they say, is always 20/20 and I *should* have thought about this last week. I had “something in the middle” that I assumed worked. I had evidence that it did work (the serial port monitor) but my assumption was false (obviously).
Debugging serial communications (and network communications for that matter) is a royal pain in the behind. When something isn’t working, work the problem backwards. When there’s hardware involved, verify that the hardware works or try to eliminate the hardware. In my case, my Windows 7 doesn’t have a true serial port (it’s running on my Mac in VMWare).
So maybe you’ll learn something from my experience and pain. Maybe you’ll keep yourself from having a bruised forehead (from banging your head up against a brick wall).