USB serial gadget documentation and gserial.inf

From: Jüri Reitel
Date: Thu Dec 04 2008 - 03:33:28 EST

Improve linux documentation and add better gserial.inf file, now users will not have to find the usbser.sys by themselves

Signed-off-by: Kristjan Räts <kristjan.rats@xxxxxxxxxxxxx>
Signed-off-by: Jüri Reitel <juri.reitel@xxxxxxxxxxxxx>

diff --git a/Documentation/usb/gadget_serial.txt b/Documentation/usb/gadget_serial.txt
index 9b22bd1..b25e1e8 100644
--- a/Documentation/usb/gadget_serial.txt
+++ b/Documentation/usb/gadget_serial.txt
@@ -162,8 +162,10 @@ Signature="$Windows NT$"
; Copyright (C) 2004 Al Borchers (alborchers@xxxxxxxxxxxxxxxx)
+; Modified to use usbser.sys automatically from Windows installation directory

@@ -172,14 +174,15 @@ DriverVer=08/17/2004,
%GSERIAL%=GSerialInstall, USB\VID_0525&PID_A4A7




@@ -193,8 +196,8 @@ AddService = usbser,0x0002,GSerialService
-ErrorControl = 1 ; SERVICE_ERROR_NORMAL
-ServiceBinary = %10%\System32\Drivers\usbser.sys
+ErrorControl = 0 ; SERVICE_ERROR_NORMAL
+ServiceBinary = %12%\usbser.sys
LoadOrderGroup = Base

@@ -203,37 +206,30 @@ GSERIAL = "Gadget Serial"
GSERIAL_DISPLAY_NAME = "USB Gadget Serial Driver"
-------------------- CUT HERE --------------------

-The "usbser.sys" file comes with various versions of Windows.
-For example, it can be found on Windows XP typically in
- C:\WINDOWS\Driver Cache\i386\
-Or it can be found on the Windows 98SE CD in the "win98" folder
-in the "DRIVER11.CAB" through "DRIVER20.CAB" cab files. You will
-need the DOS "expand" program, the Cygwin "cabextract" program, or
-a similar program to unpack these cab files and extract "usbser.sys".
-For example, to extract "usbser.sys" into the current directory
-on Windows XP, open a DOS window and run a command like
- expand C:\WINDOWS\Driver~1\i386\ -F:usbser.sys .
-(Thanks to Nishant Kamat for pointing out this DOS command.)
+This inf file will tell windows to use its usbser.sys file.
+If the file usbser.sys is not yet installed, Windows will
+find and install it automatically. So there is no need to
+show the location of usbser.sys to Windows.

When the gadget serial driver is loaded and the USB device connected
to the Windows host with a USB cable, Windows should recognize the
-gadget serial device and ask for a driver. Tell Windows to find the
-driver in the folder that contains "gserial.inf" and "usbser.sys".
+gadget serial device and ask for a driver. Tell Windows to use the
+"gserial.inf" file.

For example, on Windows XP, when the gadget serial device is first
plugged in, the "Found New Hardware Wizard" starts up. Select
"Install from a list or specific location (Advanced)", then on
the next screen select "Include this location in the search" and
-enter the path or browse to the folder containing "gserial.inf" and
-"usbser.sys". Windows will complain that the Gadget Serial driver
+enter the path or browse to the folder containing "gserial.inf".
+Windows will complain that the Gadget Serial driver
has not passed Windows Logo testing, but select "Continue anyway"
and finish the driver installation.

+Another way is to install the driver via Winows API function
+::SetupCopyOEMInf(_T("gserial.inf"), NULL, SPOST_PATH,
On Windows XP, in the "Device Manager" (under "Control Panel",
"System", "Hardware") expand the "Ports (COM & LPT)" entry and you
should see "Gadget Serial" listed as the driver for one of the COM

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at