David M. schrieb:
> Das ganze ist wohl ein Bug auf Seiten Windows.
Nein. Wird eine serielle Schnittstelle erkannt, und reagiert das an der
seriellen Schnittstelle angeschlossene Gerät auf eine bestimmte Art
und Weise, wird --dank Plug&Play-- der zugehörige Devicetreiber geladen.
Das ist entweder ein Maus- oder Modemtreiber.
Abhilfe ist entweder das Unterdrücken des seriellen Plug&Play oder aber
ein eindeutig vom Verhalten einer Maus/eines Modems unterscheidbares
Verhalten des angeschlossenen Geräts.
Hier eine Beschreibung des Protokolls:
1 | It turns out that mouse detection in Windows is normally
|
2 | handled by the serenum.sys filter driver.
|
3 | This driver implements support for legacy serial mice
|
4 | along with serial plug-and-play.
|
5 | Microsoft has even provided the sourcecode as a WDK sample.
|
6 |
|
7 | During detection the ports switches to 1200-7-N-1 mode
|
8 | while asserting DTR+RTS to which a response is expected
|
9 | within 200 ms, with a couple of retries in case of failure.
|
10 |
|
11 | Unfortunately for a legacy mouse a single M or B character
|
12 | suffices as identification.
|
13 |
|
14 | In our case the protocol was reworked to avoid these
|
15 | characters and now appears not to be misidentified anymore.
|
16 |
|
17 | However we were using a virtual USB serial port and for
|
18 | a traditional serial port this approach may be somewhat
|
19 | difficult as anything sent at a different baud rate is
|
20 | liable to look like line noise.
|
21 | (...)
|
22 |
|
23 | Alternatively with the serial control signals actually
|
24 | hooked up, or intercepted by a USB CDC device, processing
|
25 | the DTR or RTS signals and holding off on output.
|
Also:
Windows aktiviert DTR+RTS und erwartet binnen 200 msec ein einzelnes
Byte, das ein "B" oder "M" sein kann. Das wird mehrfach wiederholt.