Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serial Port Demons
#1
I've recently come to discover a wonderful "feature" in Windows, been there forever from what I read that I had not been affected by it until very recently. The feature I speak of is the serial port demon.  In short, M$ in their infinite wisdom (I'm sure some engineer thought this was a good idea) will automatically assign an input device to a serial port streaming recognizable data to the port when the operating system boots. And it's random, so if you boot and there happens to be no data coming in port at the time of initialization the system starts normally and the CQC driver serial port assignment(s) work correctly. However if you are really lucky then the undesirable assignment occurs and boom the driver doesn't work since it can't obtain it's assigned serial port.

I'm thinking about trying a delayed start on the serial port device service and CQC to see if I can trick Windows to not do the undesirable assignment.  

Dean, which service(s) would I need to delay along with the serial port service to test this theory out?

BTW this is a brand new system with performance room to spare, it's probably too damn fast.

I'm also considering a different serial input method, like a multi-port card (I need 7) but they are big $$$ for anything of quality.
Reply
#2
Couldn't just just disable the serial port service altogether? I'm assuming nothing you are doing actually depends on it, right?
Dean Roddey
Explorans limites defectum
Reply
#3
No, I need the port(s) for my CQC device drivers. Windows falsely assigns a bogus device it thinks is correct to one or more serial ports thus preventing the driver in CQC from starting up correctly, it sits at a Waiting to Connect for the device status.

Which CQC service(s) do I need to put on delayed start to test this out?
Reply
#4
Oh, you mean it assigns a device name to the ports? If so, yo should be able to make it stop doing that. If you go the device manager and find the serial ports, right click and tell Windows what you know to be the right COM port names. I'd think that should make it happy, right?

Anyhoo, there's only one service really, the application shell. Delayed start is one of the install options these days, so just run the installer and select delayed start to have it be permanently that way.
Dean Roddey
Explorans limites defectum
Reply
#5
It's not a name, it's a bogus device, for example, a Microsoft Stylus. I've actually disabled that particular one but now something else is grabbing the damn port on occasion and it's not showing up in the device list (tried showing hidden devices as well, no dice.) M$ is assigning a device based on a stream pattern it is seeing on the port. Lucky me, either my DSC Alarm, UPB or Zwave serial ports can all manifest this problem. None of these serial devices utilizes any sort of hardware handshaking so when the the PLC spews serial data Windows at boot time sees it and tries to interpret and assign what it thinks is the correct device with no easy way to prevent said helpfulness.

As a manual hack I can disable the serial port(s) that are hijacked, pause the CQC driver that is victimized by the drive by port snatch, re-boot, re-enable the serial port, resume the CQC driver, everything happy. (except for me, I'm not happy as this is a PITA)

I'll try setting delayed start manually first before rerunning the installer to set (never noticed that before)

I'm surprised more people aren't seeing this but then again given it's randomness maybe it's attributed to a temporary glitch and goes away if the system is restarted.
Reply
#6
But, wouldn't that make it worse? You are putting off CQC's startup even longer, giving whatever it is a chance to grab the serial port, right?

Are you sure it's what you think it is grabbing the port? I think there's a way to see what process has a port open. Worst case it could give you clues as to what to service to stop. Looks like the PortMon utility from their SysInternals toolkit will do this:

https://technet.microsoft.com/en-us/sysi...96644.aspx
Dean Roddey
Explorans limites defectum
Reply
#7
Some other discussion indicates that it will be often seen as a serial mouse. So, go to the device manager and check if a serial mouse is there. If so, don't uninstall it. Disable it, so that it won't try to reload the driver again, and it wont' try to take over the serial port again.

Those folks also said that this only happened if the device was connected at startup and causing serial data.
Dean Roddey
Explorans limites defectum
Reply
#8
(02-20-2017, 12:52 PM)Dean Roddey Wrote: But, wouldn't that make it worse? You are putting off CQC's startup even longer, giving whatever it is a chance to grab the serial port, right?

Are you sure it's what you think it is grabbing the port? I think there's a way to see what process has a port open. Worst case it could give you clues as to what to service to stop. Looks like the PortMon utility from their SysInternals toolkit will do this:

https://technet.microsoft.com/en-us/sysi...96644.aspx

The test will be to delaystart both the serial port service for the USB serial devices I have as well as CQC.  In theory Windows will have finished booting and it won't pick the port up.

Thanks Dean, I'll try the portmon but it looks like it's just going to tell me what is flowing, not what app / service has control of the port.

I believe I have already also disabled serial mouse though It's not showing up in the device list (show hidden to see disabled items)
Reply
#9
I think PortMon shows the process. If it doesn't, then the Process Explorer from SysInternals will.
Dean Roddey
Explorans limites defectum
Reply
#10
Any luck?
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Intermittent Serial Connection LesAuber 4 7,377 08-02-2020, 09:18 PM
Last Post: LesAuber
  Question on CQC / WSE 2016 / Port 443 kblagron 3 5,757 11-15-2017, 09:06 PM
Last Post: Dean Roddey
  What is being used for TV Serial control bobskie708 14 12,874 08-16-2017, 08:38 PM
Last Post: potts.mike
  cheap single port TCP/Serial? SomeWhatLost 15 8,579 08-22-2016, 08:12 PM
Last Post: Dean Roddey
  Consensus on Current Serial Controlled TVs zpollock 21 10,307 06-10-2016, 07:15 PM
Last Post: DaveB
  8 port relay board with RS232 or Ethernet - Cheap znelbok 2 3,407 02-03-2015, 11:33 AM
Last Post: znelbok
  Trouble with Generic Serial Passthrough/StarTech RS232 hub pbohannon 7 5,047 06-04-2014, 04:08 AM
Last Post: LesAuber
  serial splitter zane 10 5,629 09-12-2013, 12:39 PM
Last Post: sic0048
  Serial Control Questions jbh5000 10 7,092 06-05-2013, 12:14 PM
Last Post: jbh5000
  Serial Server help needed ellisr63 19 8,653 03-02-2013, 06:24 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)