code8825 / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Serial port driver don't exhibit proper WM_DEVICENOTIFICATION behavior. #934

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Arduinos equipped with the Atmel16u2 for USB communications
do not exhibit the behavior of a properly installed COM port.

It's likely this affects all devices not equipped with the
FTDI USB serial converter chip, though I can't confirm if
the bug is expressed on e.g UNO R1/R2, or newer Windows
(that may have an updated 'usbser' driver).

What steps will reproduce the problem?

1. Attach an UNO R3 to USB on a WinXP box.
2. Probably affect all the Atmel8u2/16u2 USB programs.

What is the expected behavior ?

Expected DBT_DEVICEARRIVAL.DBT_DEVTYP_PORT (e.g 'COM7')
This is the notification for a properly installed COM port,
whether it's physical or virtual.

What do you see instead ?

Only DBT_DEVICEARRIVAL.DBT_DEVTYP_DEVICEINTERFACE 
  \\?\USB#Vid_2341&Pid_0043#749343030303517191D0
  #{a5dcbf10-6530-11d2-901f-00c04fb951ed}
This is merely a raw USB device with no specific properties.

What version of the Arduino software are you using?
> Affects all versions I've checked.

On what operating system?
> Misbehavior present on WinXP, can't confirm other versions.

Which Arduino board are you using?
> Duemilanove, Nano, and UNO R3
> The bug is present with UNO, not with 2oo9 and Nano.

Best Regards
  Love Nystrom
  Senior software engineer

Attachments: 
1) FINDINGS.txt    Annotated log of a few device attachments.
2) DevNfyTest.rar  Source and executable for notification logger.

Additional info (sorry abt the wrapped lines, not my fault):
##--------------------------------------------------------------------
## LOG of WM_DEVICENOTIFICATION for different Arduinos and Upload BUBs
##--------------------------------------------------------------------

# Duemilanove attached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A900ceDU#{219d0508-57a8-4ff5-97a1-bd86587c6c7e}'
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A900ceDU#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A900ceDUA#0000#{4d36e978-e325-11ce-bfc1-08002be10
318}'
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A900ceDUA#0000#{86e0d1e0-8089-11d0-9ce4-08003e301
f73}'
[W.T.F] DBT_DEVICEARRIVAL (3) - Port 'COM3'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0

# Duemilanove detached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A900ceDUA#0000#{86e0d1e0-8089-11d0-9ce4-08003e301
f73}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (3) - Port 'COM3'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A900ceDUA#0000#{4d36e978-e325-11ce-bfc1-08002be10
318}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A900ceDU#{219d0508-57a8-4ff5-97a1-bd86587c6c7e}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A900ceDU#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'

# UNO R3 attached (Presents itself only as a generic USB device)

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_2341&Pid_0043#749343030303517191D0#{a5dcbf10-6530-11d2-901f-00c04fb
951ed}'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0

# UNO R3 detached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_2341&Pid_0043#749343030303517191D0#{a5dcbf10-6530-11d2-901f-00c04fb
951ed}'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0

# Nano attached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#10KP0585#{219d0508-57a8-4ff5-97a1-bd86587c6c7e}'
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#10KP0585#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+10KP0585A#0000#{4d36e978-e325-11ce-bfc1-08002be10
318}'
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+10KP0585A#0000#{86e0d1e0-8089-11d0-9ce4-08003e301
f73}'
[W.T.F] DBT_DEVICEARRIVAL (3) - Port 'COM10'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0

# Nano detached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+10KP0585A#0000#{86e0d1e0-8089-11d0-9ce4-08003e301
f73}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (3) - Port 'COM10'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+10KP0585A#0000#{4d36e978-e325-11ce-bfc1-08002be10
318}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#10KP0585#{219d0508-57a8-4ff5-97a1-bd86587c6c7e}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#10KP0585#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'

# Modern Device BUB 2 attached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A40119EJ#{219d0508-57a8-4ff5-97a1-bd86587c6c7e}'
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A40119EJ#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A40119EJA#0000#{4d36e978-e325-11ce-bfc1-08002be10
318}'
[W.T.F] DBT_DEVICEARRIVAL (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A40119EJA#0000#{86e0d1e0-8089-11d0-9ce4-08003e301
f73}'
[W.T.F] DBT_DEVICEARRIVAL (3) - Port 'COM8'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0

# Modern Device BUB 2 detached

[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A40119EJA#0000#{86e0d1e0-8089-11d0-9ce4-08003e301
f73}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (3) - Port 'COM8'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\FTDIBUS#VID_0403+PID_6001+A40119EJA#0000#{4d36e978-e325-11ce-bfc1-08002be10
318}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A40119EJ#{219d0508-57a8-4ff5-97a1-bd86587c6c7e}'
[W.T.F] DBT_DEVICEREMOVECOMPLETE (5) - Interface 
'\\?\USB#Vid_0403&Pid_6001#A40119EJ#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'
[W.T.F] WM_DEVICECHANGE.DBT_DEVNODES_CHANGED (7) lp=$0

Original issue reported on code.google.com by Love.Nystrom on 31 May 2012 at 9:24

Attachments: