Skip to content

WinUSB bulk in/out device #49

@rundekugel

Description

@rundekugel

I created an small embedded WinUSB device which offers 2 bulk endpoints. This device can communicate with Linux and with Windows10 without installing driver, or a .inf file. And it's not recognized as serial com port.

Now I try to build an embedded Linux gadget with your libusbgx. It must respond to OS_DESC (0xee) as WinUSB device. And must not be recognized as serial com port. It shall behave like a g_serial with param "use_acm=no"

If I build it with filesystem commands. Then the os_desc setting in Window10 it's recognized in registry settings

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags<VIDPID>
osvc = 01 bc
SkipContainerIdQuery = 01 00

But not recognized as WinUSB device

It looks like, the os_desc feature does only fully work for RNDIS.

This is the respond to vendor request, which works when I send it from my embedded WinUSB to Windows:

const U8 u8ExtendedCompatIDOSFeatDesc[] =
{
0x28, 0x00, 0x00, 0x00, /* dwLength Length of this descriptor / //(40 bytes)
0x00, 0x01, /
bcdVersion = Version 1.0 /
0x04, 0x00, /
wIndex = 0x0004 /
0x01, /
bCount = 1 /
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /
Reserved /
0x00, /
Interface number = 0 /
0x01, /
Reserved /
0x57, 0x49, 0x4E, 0x55, 0x53, 0x42, 0x00, 0x00, //string = "WINUSB"
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /
subCompatibleID /
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /
Reserved */
};

I tried with a modified example of your code:
myWinusbGadget.zip
diff:
winusb-diff.zip

I get error when trying to usbg_set_interf_os_desc() :

Error setting function OS desc
Error: USBG_ERROR_NOT_FOUND : Not found (file or directory removed)

How can I make it working for gser ? Is it possible with changing your src? Or do I have to change the kernel gadget files?
Can you help me to add this feature to your lib?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions