Home
%3CLINGO-SUB%20id%3D%22lingo-sub-270882%22%20slang%3D%22en-US%22%3EUsing%20UsbCApiCmd%20for%20basic%20USB%20Type-C%20validation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270882%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Feb%2001%2C%202017%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3EAuthored%20by%20Michelle%20Bergeron%20%5BMSFT%5D%20%3CBR%20%2F%3E%3CBR%20%2F%3EUsbCApiCmd%20is%20a%20simple%20tool%20that%26nbsp%3Byou%20can%20use%20for%20basic%20validation%26nbsp%3Bof%20your%20Type-C%20implementation%20on%20Windows.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1512030105%22%20id%3D%22toc-hId-1535839657%22%3EWho%20can%20use%20UsbCApiCmd%3F%3C%2FH3%3E%0A%3CP%3E%3CBR%20%2F%3EUsbCApiCmd%26nbsp%3Bis%20applicable%20only%20to%26nbsp%3BUSB%20Type-C%20Connectors%20which%26nbsp%3Buse%20Microsoft's%20USB%20Type-C%20Stack%2C%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fusbcon%2Fbring-up-a-usb-type-c-connector-on-a-windows-system%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20USB%20Connector%20Manager%3C%2FA%3E.%20UcmCx.sys%20needs%20to%20be%20loaded%20and%20running%20on%20the%20system.%26nbsp%3BThe%26nbsp%3Btool%20is%20not%20applicable%20to%20systems%26nbsp%3Bwhich%20use%26nbsp%3Bother%20methods%20to%20manage%20the%20USB%20Type-C%20ports.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1040126856%22%20id%3D%22toc-hId--1016317304%22%3EHow%20to%20get%20UsbCApiCmd%3C%2FH3%3E%0A%3CP%3E%3CBR%20%2F%3EUsbCApiCmd%20is%26nbsp%3Bincluded%20in%26nbsp%3Bthe%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fusbcon%2Fmicrosoft-usb-test-tool--mutt--devices%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20MUTT%20Software%20Package%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-702683479%22%20id%3D%22toc-hId-726493031%22%3EHow%20to%20use%20UsbCApiCmd%3C%2FH3%3E%0A%3CP%3E%3CBR%20%2F%3EOpen%20a%20command%20prompt%20or%20PowerShell%20window%20on%26nbsp%3Bthe%20system%20with%20the%26nbsp%3BUSB%20Type-C%26nbsp%3Bconnector(s)%20you%20wish%20to%20validate.%20Run%20UsbCApiCmd.exe.%20%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20as%20long%20as%20the%20program%20is%20running%2C%20the%26nbsp%3Bconsole%20will%20print%20out%20information%20about%20the%20USB%20Type-C%20connectors%26nbsp%3Bon%20the%20system%20that%20are%20registered%20with%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fusbcon%2Fbring-up-a-usb-type-c-connector-on-a-windows-system%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20USB%20Connector%20Manager%20%3C%2FA%3E%20(UcmCx).%20It%20will%20also%20print%20out%20information%26nbsp%3Babout%20detected%20Attach%2FDetach%20events%20on%20a%20connector.%20You%20can%20use%20it%20to%20validate%20that%20the%20Type-C%20software%20is%20seeing%20the%20events%20that%20you%20expect%20it%20to.%20%3CBR%20%2F%3E%3CBR%20%2F%3ETo%26nbsp%3Bstop%20execution%2C%20you%20may%20press%20Ctrl%2BC.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20below%20example%20is%20from%20a%20system%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fusbcon%2Fucsi%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20UCSI%20%3C%2FA%3E%20to%20manage%20its%20connectors%20with%20Windows.%26nbsp%3BIt%20has%20not%26nbsp%3Bdetected%20any%20attach%20or%20detach%20events%20since%20the%20program%20started%20running.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20833px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F56284i21E059962A9C161F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-270882%22%20slang%3D%22en-US%22%3E%3CP%3EFirst%20published%20on%20MSDN%20on%20Feb%2001%2C%202017%20Authored%20by%20Michelle%20Bergeron%20%5BMSFT%5DUsbCApiCmd%20is%20a%20simple%20tool%20that%26nbsp%3Byou%20can%20use%20for%20basic%20validation%26nbsp%3Bof%20your%20Type-C%20implementation%20on%20Windows.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-270882%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eusb%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eusb%20type%20c%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

First published on MSDN on Feb 01, 2017
Authored by Michelle Bergeron [MSFT]

UsbCApiCmd is a simple tool that you can use for basic validation of your Type-C implementation on Windows.

 

Who can use UsbCApiCmd?


UsbCApiCmd is applicable only to USB Type-C Connectors which use Microsoft's USB Type-C Stack, the USB Connector Manager. UcmCx.sys needs to be loaded and running on the system. The tool is not applicable to systems which use other methods to manage the USB Type-C ports.

 

How to get UsbCApiCmd


UsbCApiCmd is included in the MUTT Software Package.

 

How to use UsbCApiCmd


Open a command prompt or PowerShell window on the system with the USB Type-C connector(s) you wish to validate. Run UsbCApiCmd.exe.

For as long as the program is running, the console will print out information about the USB Type-C connectors on the system that are registered with the USB Connector Manager (UcmCx). It will also print out information about detected Attach/Detach events on a connector. You can use it to validate that the Type-C software is seeing the events that you expect it to.

To stop execution, you may press Ctrl+C.

The below example is from a system using UCSI to manage its connectors with Windows. It has not detected any attach or detach events since the program started running.