Comment On Mixed Messages

As a software & electrical engineer, a major part of Nick Johnson’s job is figuring out why some aspect of the complex controlling hardware & software that’s used by industrial-sized equipment isn’t working exactly as it should. Personally, I couldn’t imagine debugging such a beast. Sure, there are plenty of sensors and log files, but they only paint a partial picture: who’s to say the recording equipment isn’t flawed, too? [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Mixed Messages

2007-08-27 15:33 • by Grant P. (unregistered)
seems kinda obvious, no? maybe this guy's job shouldn't be diagnosing problems if it took him so long to figure that one out. duh.

Re: Mixed Messages

2007-08-27 15:37 • by ParkinT
RS-232. Ah... the good old days.

Re: Mixed Messages

2007-08-27 15:41 • by Lysis (unregistered)
Techie cat is not amused.

Re: Mixed Messages

2007-08-27 15:45 • by KattMan
Let me guess, he went on to market this as the first mainframe mouse.

Lesson learned?

2007-08-27 15:48 • by AdT (unregistered)
We all love Microsoft Windows.

Re: Mixed Messages

2007-08-27 15:51 • by MX5Ringer (unregistered)
HHHHHHMMMMMMM!!

Not so much a WTF,

If only he'd plugged in a UPS Serial uplink cable as well that would have been 2 wtf's in 1.

Maybe!

I'm a but drunk!

But still.

Captcha: sanitarium (and I'm a registered user, how terribly apt!!)

Re: Mixed Messages

2007-08-27 15:57 • by Macxdmg (unregistered)
i wish my validation pc had a mouse :(

Re: Mixed Messages

2007-08-27 16:07 • by dan krüsi (unregistered)
Good story. Thanks for the post.

Re: Mixed Messages

2007-08-27 16:20 • by Kemp
So I'm expected to believe that it worked fine sending data to his logging app over the serial port for a while and then suddenly Windows decided it was a serial mouse? Is this even possible? To my knowledge Windows doesn't try to interpret the data being sent back and forth in these scenarios purely because it could be absolutely anything, that's up to the app to know what to do with. Any supposed magic byte sequence would be sent eventually no matter what you hooked up (assuming you were sending purely binary data, text data could most likely hit it too if you used characters outside the A-Z, a-z and 0-9 range).

Re: Mixed Messages

2007-08-27 16:23 • by Steve (unregistered)
So what was causing the issue with the motor?

Re: Mixed Messages

2007-08-27 16:24 • by ebs2002
151359 in reply to 151355
Kemp:
So I'm expected to believe that it worked fine sending data to his logging app over the serial port for a while and then suddenly Windows decided it was a serial mouse? Is this even possible?


Think about Plug-and-play. I plug in my mouse, and Windows knows it's a mouse! I unplug the mouse and plug in a hard drive, and Windows knows it's a hard drive! I have a 4-port USB hub, plug in a mouse and a hard drive, then unplug the hard drive and plug in an external sound card, and Windows recognizes it (even though it didn't know that something was unplugged or plugged back in).

While I don't know this for sure, it logically seems that USB devices send a byte sequence that Windows is constantly sniffing for. I would imagine that any port that has plug-and-play support would do the same (like a serial port).

Re: Mixed Messages

2007-08-27 16:30 • by Karl von L. (unregistered)
I remember that Windows 2000 had a bug in which the mouse would suddenly start doing this anyway. That is, you'd move the mouse slightly, and the pointer would jump around randomly, occasionally clicking on whatever happened to be under it. But it would be fine after a reboot.

Re: Mixed Messages

2007-08-27 16:46 • by Anon (unregistered)
151361 in reply to 151359
ebs2002:

While I don't know this for sure, it logically seems that USB devices send a byte sequence that Windows is constantly sniffing for. I would imagine that any port that has plug-and-play support would do the same (like a serial port).


That's nice, but when did a serial port become plug and play?

Re: Mixed Messages

2007-08-27 16:46 • by unklegwar
Interesting story, sure.

But "Worse Than Failure"? Hardly.

Re: Mixed Messages

2007-08-27 16:55 • by FredSaw
151364 in reply to 151349
MX5Ringer:
I'm a but drunk!
Most people are; but it's good that you recognize it. And by the way, it's spelled with two t's.

Re: Mixed Messages

2007-08-27 16:56 • by yaff
My guess is that something is lost in translation, here. I've seen this happen, but only if Windows is restarted. It performs a serial port scan at boot-up to find serial mice. It used to drive us crazy at my previous job. We developed a piece of equipment that continuously updated a VT-100 GUI via the serial port. Windows found a mouse on that serial port every time.

Solution? We used VT terminals instead of laptops. Mmmm... green phosphor.

Re: Mixed Messages

2007-08-27 17:06 • by Lanth (unregistered)
I had this problem once. Glad I finally know why it actually happened.

I develop routers at my job, which of course get plugged in to the serial port. One day I restarted my computer and the mouse went completely nuts like this - more reboots later and it persisted. Eventually I simply unplugged everything from the back and plugged it all back in - no problem.

The curious thing is that I'd had that router plugged in to the serial port for weeks of restarts and never had the problem once, nor since.

I doubt that anyone would interpret this kind of mouse behaviour as "someone remote desktopping in" - the thing was going crazy frantic, jumping all over the screen and clicking madly.

Re: Mixed Messages

2007-08-27 17:12 • by sxeraverx
I met someone today who told me she didn't like Vista because it was too user-friendly, too easy--she couldn't do what she wanted how she wanted to do it.

Re: Mixed Messages

2007-08-27 17:14 • by jtl (unregistered)
151369 in reply to 151361
"That's nice, but when did a serial port become plug and play?"

Win 95 could do it.

Re: Mixed Messages

2007-08-27 17:21 • by Rowboat Woodpecker (unregistered)
151371 in reply to 151339
Grant P.:
seems kinda obvious, no? maybe this guy's job shouldn't be diagnosing problems if it took him so long to figure that one out. duh.


As soon as you work with automating devices, you run into all sorts of sneaky stuff, that may *seem* obvious once it's already discovered. So let us all know when you find out what made you post such a turd-o-rific remark, and get back to the rest of us "idiot engineers" with the answer.

Thanks.

Re: Mixed Messages

2007-08-27 17:22 • by Jason (unregistered)
I had a similar problem with a Pressure sensor. This was made a bit more interesting due to it being connected to the PC via an 8-port RS232 to Ethernet Adapter.

The comments about "duh! why didn't he find it quicker" are pretty dumb, considering the scope of faults that are possible on kit like this.
Next time around, it could be electrical noise caused by some guy welding in the next room, or a dry joint on a connection.

Re: Mixed Messages

2007-08-27 17:25 • by Tsuki (unregistered)
Ah, I just had one of those wonderful moments where something on the WTF matches up far too well with my own life.

I've had this exact same issue on my current project, with an RS232 GPS receiver...

Re: Mixed Messages

2007-08-27 17:25 • by whicker (unregistered)
151375 in reply to 151358
Steve:
So what was causing the issue with the motor?


Yes, I was wondering that too.

also, is "/noserialmouse" in boot.ini an XP-only thing?
hmm... it's "/noserialmice" to add more confusion for NT4 and below.

Re: Mixed Messages

2007-08-27 17:32 • by Jim (unregistered)
It definitely happens. I've seen it with plain serial ports and with USB serial adapters. You can add /noserialmouse to the boot.ini to stop detection of serial mice at boot up time, but they will still plug&play later on. The only thing to do is wait for them (the serial (ballpoint) mouse) to appear in the device manager and then disable (not delete!) them. Total PITA.
Jim

Re: Mixed Messages

2007-08-27 17:32 • by Anon (unregistered)
151379 in reply to 151369
jtl:
"That's nice, but when did a serial port become plug and play?"

Win 95 could do it.


But I don't think the serial port has ever been hot swappable, i.e. the OS isn't going to look for serial devices except on boot up.

Re: Mixed Messages

2007-08-27 17:51 • by Broz (unregistered)
I'm just glad to see that someone else uses the phrase "remote desktopping" as un-hesitantly as I do...

Also, as I'm typing this, the CAPTCHA word is "riaa". That depresses me.

Re: Mixed Messages

2007-08-27 17:56 • by AdT (unregistered)
151381 in reply to 151379
Anon:
But I don't think the serial port has ever been hot swappable, i.e. the OS isn't going to look for serial devices except on boot up.


Are you perhaps confusing the serial (RS232) port with PS/2?

Re: Mixed Messages

2007-08-27 18:08 • by mexi-fry (unregistered)
1. (not really a WTF) I agree. As a programmer, I often find myself looking at the wrong places for similar reasons... and to those who say it is obvious... I bet you never thought your pc was broken for about an hour until you remembered to take the floppy out. Oversights happen.
2. Yes, plug and play actually initiates with a device and manufacturer ID. The sequence (even through serial) would be recognized should the device mimic the boot up and classification sequence (I am sure that is not the best way to phrase it).
3. (as long as it is sending binary data and not strings...) all control devices are sending binary data which can be interpreted numerically or as strings. Everything is (by definition) typeless until an application construct gives it context.

Re: Mixed Messages

2007-08-27 18:10 • by Lingerance
Reminds me of when I was playing starcraft over a serial cable, my buddy's cursor just started moving and clicking at random making it unplayable for him. Totally not fun.

Re: Mixed Messages

2007-08-27 18:11 • by Twon
151384 in reply to 151373
Tsuki:
Ah, I just had one of those wonderful moments where something on the WTF matches up far too well with my own life.

I've had this exact same issue on my current project, with an RS232 GPS receiver...


We have this problem as well; we use multiple types of RS-232 GPS receivers as well as some of our own custom RS-232 hardware. This is the most irritating Windows-ism ever; there's not even a way to globally specify "LEAVE MY COM PORTS ALONE." You have to hand-hack HKCR for every device you want Plug and Play to ignore (and even this only sort-of works) -- so good luck plugging in a new USB-to-serial adapter with a live device on the end of it.

Re: Mixed Messages

2007-08-27 18:38 • by AdT (unregistered)
151385 in reply to 151355
Kemp:
To my knowledge Windows doesn't try to interpret the data being sent back and forth in these scenarios purely because it could be absolutely anything,


followed by not one, not two, but three accounts of people who suffered the same problem...

So it seems Windows does try to interpret the data even though it could be absolutely anything.

Re: Mixed Messages

2007-08-27 18:45 • by Carnildo
151386 in reply to 151361
Anon:
ebs2002:

While I don't know this for sure, it logically seems that USB devices send a byte sequence that Windows is constantly sniffing for. I would imagine that any port that has plug-and-play support would do the same (like a serial port).


That's nice, but when did a serial port become plug and play?


When Microsoft decided it was.

Re: Mixed Messages

2007-08-27 19:39 • by IV (unregistered)
Who leaves a floppy in for an hour before figuring it out? Did your screen not say "Invalid System Disk error" or "Non system boot disk"? Everything I have ever dealt with has some sort of message of that nature.

Captcha: paint. I like putting all my captchas so someone can program them into a bot. Sure, the odds of guessing right are slim, but they do exist. Help someone make his/her bot dictionary complete!

Re: Mixed Messages

2007-08-27 19:41 • by swordfishBob (unregistered)
151389 in reply to 151355
and then suddenly Windows decided it was a serial mouse? Is this even possible?


Happens to us regularly with weighbridge scales on a serial interface. Usually it gets triggered while Windows is starting up. Easily fixed by disabling the serial mouse service (which used to be simpler when the Devices control panel functioned like the Services one, back in NT4). Easy to forget to do when replacing a PC though.

Re: Mixed Messages

2007-08-27 19:48 • by Kemp
151390 in reply to 151385
AdT:
Kemp:
To my knowledge Windows doesn't try to interpret the data being sent back and forth in these scenarios purely because it could be absolutely anything,


followed by not one, not two, but three accounts of people who suffered the same problem...

So it seems Windows does try to interpret the data even though it could be absolutely anything.


But seriously, there is no device detection and suchlike on the serial port. Example: Start a serial console session, you'll be typing to (and receiving data from) anything that is connected, the OS has no idea. Pull the device out and plug it back in, the session continues as if nothing happened. Hell, random partial connections while plugging the device in will cause odd characters to appear if you do it right (or wrong depending on your point of view). Applications that talk over the serial port have to be started manually, there is no "device driver" for a mobile phone connected via serial for instance, instead you start your phone management program and it sends some data back and forth to figure out if it's really a phone that is connected.

Executive summary:
How did you guys ever manage to bork windows to the point that it spontaneously decided you had a mouse connected? At bootup I can imagine, while running I can't see a way.

Re: Mixed Messages

2007-08-27 20:02 • by Matti Bäckman (unregistered)
151391 in reply to 151390
Kemp:
AdT:
Kemp:
To my knowledge Windows doesn't try to interpret the data being sent back and forth in these scenarios purely because it could be absolutely anything,


followed by not one, not two, but three accounts of people who suffered the same problem...

So it seems Windows does try to interpret the data even though it could be absolutely anything.


But seriously, there is no device detection and suchlike on the serial port. Example: Start a serial console session, you'll be typing to (and receiving data from) anything that is connected, the OS has no idea. Pull the device out and plug it back in, the session continues as if nothing happened. Hell, random partial connections while plugging the device in will cause odd characters to appear if you do it right (or wrong depending on your point of view). Applications that talk over the serial port have to be started manually, there is no "device driver" for a mobile phone connected via serial for instance, instead you start your phone management program and it sends some data back and forth to figure out if it's really a phone that is connected.

Executive summary:
How did you guys ever manage to bork windows to the point that it spontaneously decided you had a mouse connected? At bootup I can imagine, while running I can't see a way.


Maybe there isn't, but Microsoft certainly seems to think there is.

"Plug and Play External COM Device Specification"
http://www.microsoft.com/whdc/resources/respec/specs/pnpcom.mspx

Re: Mixed Messages

2007-08-27 20:09 • by Kemp
151392 in reply to 151391
Matti Bäckman:
Maybe there isn't, but Microsoft certainly seems to think there is.

"Plug and Play External COM Device Specification"
http://www.microsoft.com/whdc/resources/respec/specs/pnpcom.mspx


I stand corrected in a subset of cases. I'll rephrase. Device detection is a breaking change from traditional (and still majority) usage, and according to that spec is useful for a tiny number of devices.

Summary:
Damn you Microsoft =P

Re: Mixed Messages

2007-08-27 20:12 • by Kemp
Of course, that spec also means nothing if their enumerator only runs on startup =P Plus, the spec implies that unless the current device is physically disconnected another one won't be detected, so other behaviour is a broken implementation.

Disclaimer:
I'd need a bit more time with the spec to properly confirm, but this is what it seems to say.

Re: Mixed Messages

2007-08-27 23:31 • by Kuba (unregistered)
151396 in reply to 151339
Grant P.:
seems kinda obvious, no? maybe this guy's job shouldn't be diagnosing problems if it took him so long to figure that one out. duh.


I would like you being in the OPs pants and actually recognizing the problem any faster. It's not as trivial as it sounds.

Re: Mixed Messages

2007-08-27 23:33 • by Kuba (unregistered)
151398 in reply to 151359
ebs2002:
Think about Plug-and-play. I plug in my mouse, and Windows knows it's a mouse! I unplug the mouse and plug in a hard drive, and Windows knows it's a hard drive! I have a 4-port USB hub, plug in a mouse and a hard drive, then unplug the hard drive and plug in an external sound card, and Windows recognizes it (even though it didn't know that something was unplugged or plugged back in).

While I don't know this for sure, it logically seems that USB devices send a byte sequence that Windows is constantly sniffing for. I would imagine that any port that has plug-and-play support would do the same (like a serial port).


Wrong on all counts. Don't say something if you're beyond clueless. Warning for ya: "don't know for sure", in your case, should mean: "let's do the homework first".

Duh.

Re: Mixed Messages

2007-08-27 23:35 • by Kuba (unregistered)
151399 in reply to 151361
Anon:
ebs2002:

While I don't know this for sure, it logically seems that USB devices send a byte sequence that Windows is constantly sniffing for. I would imagine that any port that has plug-and-play support would do the same (like a serial port).


That's nice, but when did a serial port become plug and play?


Since, umm, Windows 95? Google for it. It could automatically detect certain serial printers and modems, for example. The framework was there; even to a point where FTDI's serial-to-usb converter has an option bit in the eeprom, which tells the driver to invoke Windows's plug-and-play mechanism on the serial data stream. I.e. the USB device is plug-and-play, a driver exposing the serial port is loaded, and then another plug-and-play is done on the virtual serial device. Wicked :)

Re: Mixed Messages

2007-08-28 00:08 • by Daniel Beardsmore
151401 in reply to 151396
Kuba:
Grant P.:
seems kinda obvious, no? maybe this guy's job shouldn't be diagnosing problems if it took him so long to figure that one out. duh.


I would like you being in the OPs pants and actually recognizing the problem any faster. It's not as trivial as it sounds.


I doubt very much that the OP would like Grant P in his pants.

Re: Mixed Messages

2007-08-28 00:25 • by amandahugginkiss
151402 in reply to 151343
ParkinT:
RS-232. Ah... the good old days.


Work with electrical engineers and you'll find out that RS-232 is a long way from being 'old'.

Re: Mixed Messages

2007-08-28 00:44 • by Cpt (unregistered)
151404 in reply to 151355
Kemp:
So I'm expected to believe that it worked fine sending data to his logging app over the serial port for a while and then suddenly Windows decided it was a serial mouse? Is this even possible? To my knowledge Windows doesn't try to interpret the data being sent back and forth in these scenarios purely because it could be absolutely anything, that's up to the app to know what to do with. Any supposed magic byte sequence would be sent eventually no matter what you hooked up (assuming you were sending purely binary data, text data could most likely hit it too if you used characters outside the A-Z, a-z and 0-9 range).


If only this were true.... Sadly Mr. Gates and his colleagues have decided that we as consumers are stupid morons who have no idea about the actual configuration of our PCs and they will decide what is good for us. So if data comes in the rs323 port sending data which vaguely resembles a mouse datastream... well... if it walks like a duck, quacks like a duck, so suffer and die! No matter that you already have a mouse installed and we'll perhaps present you with a window asking if it is ok, but just to be sure, we'll assume that you are stupid and default to "yes" in 30 seconds.

Windows is no operating system, it is a game of chance, otherwise why would Microsoft help desk personnel ask you to reinstall your Windows operating system if you report some small problem? Even if you tell them that this will not change the causes of the problem, they are in battling symptoms, not the causes...

well... that's me off my soapbox :)

Re: Mixed Messages

2007-08-28 02:29 • by Doug Burbidge (unregistered)
Add me to the list of people that have had Windows detect their serial device as a mouse. For us, it's only ever happened at startup.

We use the same workaround as the OP: go into device manager and disable the serial mouse. Note: do not delete it, because Windows will just "find" the serial mouse all over again next time -- disabling it, on the other hand, prevents the problem recurring.

Re: Mixed Messages

2007-08-28 02:57 • by theatrus (unregistered)
As a developer of various devices that talk over a USB->serial link (virtual com ports), this is a hugely annoying problem. But, it only occurs if no application has the COM port open (though windows will try to read some bytes on connection to find the device, so if it chatters by its self, you're doomed ;))

And you can't turn it off system wide! MS expects you to run hunt the VID/PID entry in the registry and add a magic key for every device plugged in.

Captcha: burned (appropiate)

Remember DOS iRQ Conflicts?

2007-08-28 04:20 • by bif
This story reminds me of the hours of toil I put in adding devices in the days of DOS! Manually working the BIOS and the CONFIG.SYS to squeeze all my devices on to the precious few IRQs available to me, what fun!

My worst conflict was when I somehow got my printer and SCSI hard drive sharing an IRQ and I had garbage start printing on my Panasonic 1124i dot matrix printer. The print head was jittering and jostling for a minute before I cut the power. Fascinating experience. Always had a boot disk handy back in those days.

As for the various debates on RS232:

RS232 will never die! It is still used all over the place in industry. All you have to do is walk into any manufacturing plant of reasonable size and look at the machines they use that are connected to computers. Serial ports, serial ports, everywhere! Ah!

And programming RS232? Yike. Serious black magic. I programmed a very small machine control application once, and immediately decided to try to stay away from serial ports for the rest of my career. I mean, when I tell a device to rotate 45 degrees, using the exact command specified in the device's "manual", over a completely pristine, three-foot serial cable, I expect it rotate 45 degrees. I don't expect it to do nothing, or to wait ten seconds and then rotate, or to rotate -45 degrees, or rotate 22.5 degrees, and any other number of wacky things. The guys who program this stuff every day must nerves of steel. It would send me over the edge. But guys, can you stop using VB? Just kidding! I'm a kidder.

Re: Mixed Messages

2007-08-28 04:33 • by Hatshepsut
Wouldn't opening the serial port lock out anything else (including the serial mouse driver) from using the port? Or... does the serial mouse driver have a cosy relationship with the serial port driver that ignores whether an app already has the port open?

Or if the driver grabs the port at boot time, wouldn't the test app be unable to open the port? Or... does the test app not check the return value from the open request?

Re: Mixed Messages

2007-08-28 04:45 • by Hognoxious (unregistered)
151411 in reply to 151382
mexi-fry:
As a programmer, I often find myself looking at the wrong places for similar reasons...
Me too. The usual reason is that I assume (despite years of experience to the contrary) that the person who reported the bug actually knows what he's talking about.

Re: Mixed Messages

2007-08-28 04:58 • by Sid2K7 (unregistered)
Well, Windows does lock out other applications from using the serial port if it is already in use (to some extent). Windows, however, is running the driver, and thus has access to the data streaming in from the serial port, even if it is in use (i think). That way, Windows might suddenly decide that the connected device is talking to it, and start interpreting it as a mouse.

I've also seen it happen.
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment