Cdc Driver Port Devices Driver

Created on: 12 November 2013

Atmel ARM microcontrollers contain a boot program called SAM-BA. The SAM-BA boot program can be loaded to the Flash memory of the microcontroller by closing a jumper on the microcontroller board and then powering up the board.

In Windows, a class driver is a specific driver that supports a standard, such as CDC, and controls all devices that follow that standard. /dev/cdc-wdmX character deviceĀ¶ The driver creates a two-way pipe to the MBIM function control channel using the cdc-wdm driver as a subdriver. The userspace end of the control channel pipe is a /dev/cdc-wdmX character device. The cdcmbim driver does not. If device is a composite device with one or more CDC class instances then entries not ending with &MIxx should be removed and entries ending with &MIxx should exist for each CDC class instance (example driver contains entries ending with &MI00 and &MI02 which are used for composite device containing two CDC class instances and each instance. Usb cdc serial port emulation com2 driver is a windows driver. It defines windows runtime classes that can use to communicate with a usb cdc device through a serial port or some abstraction of a serial port. Port emulation driver for your usb, drivers 2.

Examples:AT91SAM7S uses the TST (TEST) pin to load SAM-BA (e.g. AT91SAM7S256);
ATSAM3U microcontrollers use the ERASE pin to load SAM-BA (e.g. AT91SAM3U2C).

Once the SAM-BA boot software is loaded to Flash memory, the microcontroller will then run the SAM-BA software when powered up. Microcontrollers that have a USB port and SAM-BA running can then be connected to a PC and programmed via a USB cable using the Atmel SAM-BA PC application.

This article shows how to install the driver in Windows 7 that the SAM-BA PC software uses.

SAM-BA USB CDC Driver

When the Atmel ARM based board is plugged into a PC USB port, the driver makes the Atmel USB microcontroller configure as a USB CDC port that will appear as a COM port in Windows.

The driver will be copied to the PC if the SAM-BA PC software is installed. It can also be downloaded here:

(To save the above driver, right-click and choose Save Link As... or whatever save item your browser uses)

Android Cdc Driver

Installing the Driver

1. Plug the Microcontroller Board into the PC

After plugging in the microcontroller (and powering it if externally powered), Windows will try to install a driver.

Automatic driver installation will fail.


2. Open Device Manager

Click the Windows Start button and then right-click Computer. Click Properties on the menu that pops up.

In the window that opens, click 'Device Manager'.

Usb Cdc Driver

The Atmel microcontroller running SAM-BA will be displayed as an 'unknown device'.


3. Update the Driver

Right-click the unknown device in the device manager and then click Update Driver Software... on the menu that pops up.

In the dialog box that pops up, click Browse my computer for driver software.

Click the Browse... button.

Use the dialog box to navigate to the folder containing the driver.

The correct path will now appear in the dialog box. Click the Next button at the bottom of the dialog box.

In the dialog box that pops up, click Install this driver software anyway.

The driver may take a while to install.

You will be notified when installation is complete.

Back in the Device Manager window, the new device and COM port number assigned to it can be seen.


Testing the Driver and Microcontroller Board

After installing the driver, it can be tested by using the SAM-BA application software on the PC, or by using a terminal emulator as shown here.

Use a terminal software program such as Bray's Terminal.

Connecting with the Terminal Emulator

Android cdc driver install

Start the terminal program, select the COM port shown in device manager, e.g. COM3. Set the Baud rate to 115200 and then click the Connect button.

Requesting the SAM-BA Version

To test that the terminal emulator can communicate with the SAM-BA software running on the microcontroller, the version of the SAM-BA software can be requested. This is done by sending a specific message to the microcontroller / SAM-BA software.

At the bottom of the terminal window, click the +CR checkbox. This will insert a carriage return character at the end of the message to send.

Now type V# into the Send field and then click the Send button to send the SAM-BA version request message.


SAM-BA Version Response

The SAM-BA software will respond with the SAM-BA version information as shown below.

Atmel ARM Microcontrollers

-->

Versions supported

  • Windows 10
  • Windows 8.1

Applies to

  • Device manufacturers of CDC Control devices

Microsoft-provided in-box driver (Usbser.sys) for your Communications and CDC Control device.

In Windows 10, the driver has been rewritten by using the Kernel-Mode Driver Framework that improves the overall stability of the driver.

  • Improved PnP and power management by the driver (such as, handling surprise removal).
  • Added power management features such as USB Selective Suspend.

In addition, UWP applications can now use the APIs provided by the new Windows.Devices.SerialCommunication namespace that allow apps to talk to these devices.

Usbser.sys installation

Load the Microsoft-provided in-box driver (Usbser.sys) for your Communications and CDC Control device.

Note

If you trying to install a USB device class driver included in Windows, you do not need to download the driver. They are installed automatically. If they are not installed automatically, contact the device manufacturer. For the list of USB device class driver included in Windows, see USB device class drivers included in Windows.

Usb Cdc Driver Windows 10

Windows 10

In Windows 10, a new INF, Usbser.inf, has been added to %Systemroot%Inf that loads Usbser.sys as the function device object (FDO) in the device stack. If your device belongs to the Communications and CDC Control device class, Usbser.sys is loaded automatically.You do not need to write your own INF to reference the driver. The driver is loaded based on a compatible ID match similar to other USB device class drivers included in Windows.

USBClass_02

USBClass_02&SubClass_02

  • If you want to load Usbser.sys automatically, set the class code to 02 and subclass code to 02 in the Device Descriptor. For more information, see USB communications device class. With this approach, you are not required to distribute INF files for your device because the system uses Usbser.inf.
  • If your device specifies class code 02 but a subclass code value other than 02, Usbser.sys does not load automatically. Pnp Manager tries to find a driver. If a suitable driver is not found, the device might not have a driver loaded. In this case, you might have to load your own driver or write an INF that references another in-box driver.
  • If your device specifies class and subclass codes to 02, and you want to load another driver instead of Usbser.sys, you have to write an INF that specifies the hardware ID of the device and the driver to install. For examples, look through the INF files included with sample drivers and find devices similar to your device. For information about INF sections, see Overview of INF Files.

Note

Microsoft encourages you to use in-box drivers whenever possible. On mobile editions of Windows, such as Windows 10 Mobile, only drivers that are part of the operating system are loaded. Unlike desktop editions, it is not possible to load a driver through an external driver package. With the new in-box INF, Usbser.sys is automatically loaded if a USB-to-serial device is detected on the mobile device.

Cdc

Windows 8.1 and earlier versions

In Windows 8.1 and earlier versions of the operating system, Usbser.sys is not automatically loaded when a USB-to-serial device is attached to a computer. To load the driver, you need to write an INF that references the modem INF (mdmcpq.inf) by using the Include directive. The directive is required for instantiating the service, copying inbox binaries, and registering a device interface GUID that applications require to find the device and talk to it. That INF specifies 'Usbser' as a lower filter driver in a device stack.

The INF also needs to specify the device setup class as Modem to use mdmcpq.inf. Under the [Version] section of the INF, specify the Modem and the device class GUID. for details, see System-Supplied Device Setup Classes.

For more information, see this KB article.

Configure selective suspend for Usbser.sys

Starting in Windows 10, Usbser.sys supports USB Selective Suspend. It allows the attached USB-to-serial device to enter a low power state when not in use, while the system remains in the S0 state. When communication with the device resumes, the device can leave the Suspend state and resume Working state. The feature is disabled by default and can be enabled and configured by setting the IdleUsbSelectiveSuspendPolicy entry under this registry key:

To configure power management features of Usbser.sys, you can set IdleUsbSelectiveSuspendPolicy to:

  • '0x00000001': Enters selective suspend when idle, that is, when there are no active data transfers to or from the device.

  • '0x00000000': Enters selective suspend only when there are no open handles to the device.

That entry can be added in one of two ways:

  • Write an INF that references the install INF and add the registry entry in the HW.AddReg section.

  • Describe the registry entry in an extended properties OS feature descriptor. Add a custom property section that sets the bPropertyName field to a Unicode string, 'IdleUsbSelectiveSuspendPolicy' and wPropertyNameLength to 62 bytes. Set the bPropertyData field to '0x00000001' or '0x00000000'. The property values are stored as little-endian 32-bit integers.

    For more information, see Microsoft OS Descriptors.

Develop Windows applications for a USB CDC device

If you install Usbser.sys for the USB CDC device, here are the application programming model options:

Cdc Driver Port Devices Driver License Test

  • Starting in Windows 10, a Windows app can send requests to Usbser.sys by using the Windows.Devices.SerialCommunication namespace. It defines Windows Runtime classes that can use to communicate with a USB CDC device through a serial port or some abstraction of a serial port. The classes provide functionality to discover such serial device, read and write data, and control serial-specific properties for flow control, such as setting baud rate, signal states.

  • In Windows 8.1 and earlier versions, you can write a Windows desktop application that opens a virtual COM port and communicates with the device. For more information, see:

    Win32 programming model:

    • .NET framework programming model:

Related topics