Device misdetected as serial mouse

前端 未结 9 1573
囚心锁ツ
囚心锁ツ 2020-12-24 05:59

I\'m working on a device which communicates with a PC through a (virtual) serial port. The problem is that the data we are sending occasionally gets incorrectly identified b

相关标签:
9条回答
  • 2020-12-24 06:04

    I also encountered this problem, fixed it by disabling "serial enumerator" in the advanced properties of the FTDI driver (properties of COM ports in Device Manager). This is described in http://www.ftdichip.com/Support/Documents/AppNotes/AN_107_AdvancedDriverOptions_AN_000073.pdf.

    0 讨论(0)
  • 2020-12-24 06:11

    Maybe this helps: We had the same problem with FTDI FT232RL.We found out, that it was a hardware issue of our PCB.

    FTDI-Datasheet says about #RESET-Pin: Active low reset pin. This can be used by an external device to reset the FT232R. If not required can be left unconnected, or pulled up to VCC.

    RESET-Pin was not required in our application, so we connected it to Vcc via 1k Pull-Up. It seemed that the pull-up of #RESET-Pin caused an undefined start-up of the FT232RL, at least every second converter, we connected to a USB-socket caused a serial-ball-point in the devive manager. We removed the pull-up-resistor at #RESET-Pin, therewith the #RESET-Pin is unconnected. Since then every interface worked proberly and didn't any longer create serial-ball-points in the Windows device manager.

    0 讨论(0)
  • 2020-12-24 06:12

    It turns out that mouse detection in Windows is normally handled by the serenum.sys filter driver. This driver implements support for legacy serial mice along with serial plug-and-play. Microsoft has even provided the sourcecode as a WDK sample.

    During detection the ports switches to 1200-7-N-1 mode while asserting DTR+RTS to which a response is expected within 200 ms, with a couple of retries in case of failure. Unfortunately for a legacy mouse a single M or B character suffices as identification.

    In our case the protocol was reworked to avoid these characters and now appears not to be misidentified anymore.

    However we were using a virtual USB serial port and for a traditional serial port this approach may be somewhat difficult as anything sent at a different baud rate is liable to look like line noise. In this case I suppose the easiest workaround is probably, as has already been suggested, to avoid making any unsolicited transmissions.

    Alternatively with the serial control signals actually hooked up, or intercepted by a USB CDC device, processing the DTR or RTS signals and holding off on output. Actually implementing the plug-and-play protocol would be an even niftier option. Supposedly there are cheap RS232 cables around without a full complement of control signals though so this approach might still fail.

    0 讨论(0)
  • 2020-12-24 06:13

    I had this problem since 2010 with serial scale heads connected to the pc. Usb to serial converter or not.. I use onkly SILABS device's CP2102 or the like.. I worked around it by simply allowing the driver to install and then in device manager look for the ballpoint driver under mouse/HIDA and then simply DISABLE the driver, DO NOT UNINSTALL IT simply disable it. Then when you reboot even with the driver instaled it seems windows ignores the comport as serial mouse and uses the data from the input. You will also find that if the ballpoint driver is active then that COMport is in use and sometimes returns a COM PORT not accessible... hope this helps some one out there :) Tx Ben

    0 讨论(0)
  • 2020-12-24 06:19

    In my development environment, I've simply disabled Microsoft Serial Mouse from the Device Manager.

    This seems to solve the culprit of my problem. Before doing so, the CH340G chip I've used in my design used to lower the DTR five times before initiating the connection, effectively rebooting my Arduino-based board and render it useless.

    0 讨论(0)
  • 2020-12-24 06:19

    Code tot stop GPS from being detected as serial mouse.

    Below is the code for a subroutine in C#.net. It checks if the registry key is set to 4 and if not it issues the configuration command to disable sermouse. Embed this subroutine in a program which runs at startup and it will correct the setting after a windows update.

    Maybe useful if you get annoyed when this problem happens time and again

    private void Stop_sermouse()

        {
            string k =
            "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\sermouse";
    
            object v = Microsoft.Win32.Registry.GetValue(k, "Start", null);
            if (v==null)
                {
                MessageBox.Show("No Registry Key for sermouse");
                    }
            else
            {
                string sr = v.ToString();
                if (sr == "4")
                {; }
                else
                {
                    DialogResult mbox = MessageBox.Show("disable sermouse ? " + v.ToString(), "Found sermouse enabled! ", MessageBoxButtons.YesNo);
                    if (mbox == DialogResult.Yes)
                    { 
                        // prepare a small job to issue confuguration command
            ProcessStartInfo s = new ProcessStartInfo("cmd.exe", "/c sc config sermouse start=disabled");
                        Process p = new Process();
                        s.Verb = "runas"; // Must run as administrator
                        s.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                        p.StartInfo = s;
            // and run the command
                        p.Start();
            //check if the registry is modified indeed
                        v = Microsoft.Win32.Registry.GetValue(k, "Start", null);
                        sr = v.ToString();
                        if (sr == "4")
                        {
                            MessageBox.Show("finished ''sc config sermouse start=disabled'' but not succesfull in registry!");
                        }
                        else
                        {
                            MessageBox.Show("sermouse is disabled");
                        }
                    }
                }
            }           
        }
    
    0 讨论(0)
提交回复
热议问题