Why is my mouse making random movements?
If you use Scream on a Windows PC which receives data over a serial (RS232) link, you may find that your mouse pointer starts moving erratically around the screen and making random clicks. This is not a fault with Scream: it is a windows bug and it can happen when a Windows PC receives any serial data. This article provides some methods to fix the problem.
This problem first appeared in Windows NT and it affects all subsequent versions. When Windows boots up, it searches for a serial mouse on all built-in COM ports. It does this by looking to see if any data are arriving. If it sees any data at all, it assumes that they are coming from a mouse and loads a mouse driver for that COM port. The COM port then becomes unavailable to other programs (such as Scream) and the data are interpreted as mouse movements and clicks, causing the PC’s mouse cursor to jump erratically and uncontrollably. In some cases, it can start unwanted programs or even cause the PC to crash.
Supported versions of Windows
Microsoft have been aware of this problem for a long time and provide a tool to fix it. You can read about this and download the tool from the Microsoft Knowledge-base article at support.microsoft.com/en-us/kb/819036.
Unsupported versions of Windows
If you use an unsupported version of Windows, such as Windows XP, Windows 2000 or Windows Server 2003, you may have problems using the official solution. If this is the case, you can manually modify a start-up file to prevent device recognition on COM ports. To do this:
- Make a backup copy of the Boot.ini file, which you will find in the root of your C: drive.
- Remove the hidden, system, and read-only attributes from the Boot.ini file.
- Using a text editor such as Notepad, open the Boot.ini file.
- Add the /fastdetect:com-number(s) option to the end of each entry in the [operating systems] section of Boot.ini. See the example below for more information.
- Save Boot.ini and quit Notepad.
- Restore the hidden, system, and read-only attributes to the Boot.ini file.
- Shut down and restart Windows.
The /fastdetect switch turns off serial and bus mouse detection in the Ntdetect.com file for the specified port. You can specify a single COM port by naming it after the colon, as in:
/fastdetect:com1which will disable detection of serial mice on COM1.
If you want to disable serial mice detection on several ports, put their names in a comma-separated list after the colon, as in:
/fastdetect:com1,com2which will disable detection on both COM1 and COM2.
To disable detection on all ports, use
The following is an example of a modified Boot.ini file:
[boot loader] timeout=10 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP" /fastdetect:com1 multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Mode" /safeboot:minimal /sos /bootlog /fastdetect:com1
You must restart the PC before these changes take effect.
Some RS232-USB converters can make the same mistake and identify themselves as Human Interface Devices rather than COM ports. This will cause Windows to mistake them for mice. If you use an RS232-USB converter, try watching Windows' Device Manager while you plug and unplug the converter:
You should see a COM Port appearing and disappearing. If, instead, you see a Human Interface Device appearing and disappearing, you should consult the manufacturer of your converter.
Many popular brands of RS232-USB converter use the FTDI chipset and driver. FTDI provide a switch ("serial enumerator") in their driver to enable or disable this behaviour: see www.ftdichip.com/Support/Documents/AppNotes/AN_107_AdvancedDriverOptions_AN_000073.pdf for details.