Re: [Query] Composite gadget: Issues with interface order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 31 Jan 2011 14:16:39 +0100, Maulik Mankad
<mankad.maulik@xxxxxxxxx> wrote:
On further investigation I found the below code in f_rndis.c
rndis_bind_config() which disables rndis by default.

ifdef CONFIG_USB_ANDROID_RNDIS
        /* start disabled */
        rndis->port.func.disabled = 1;
#endif

It looks like on enumeration with a Windows PC, since the RNDIS
function is disabled, Windows does not know about this interface at
all.

It therefore considers UMS as the first interface and issues SETUP
packet with wIndex = 0. But on the device side UMS is at interface 2
and hence the check in fsg_setup() fails.

Since RNDIS is disabled by default the Configuration descriptor also
shows UMS as the first interface.

Do you agree with my understanding here?

If the function is disabled, it should not be added to configuration
and thus should not occupy any interface numbers.  At least that's
how I remember android gadget was working.

Also if I enable RNDIS by default, Windows sees all the interfaces
correctly i.e rndis(interface 0 and 1), UMS as interface 2 and ADB as
interface 3. Although the enumeration is not complete. Seems like some
issues when all functions are enabled together by default.

Any idea why is RNDIS disabled by default for android gadget?

On Android you can turn individual functions on and off depending on
what user wants.  There is an UI for that.  IIRC RNDIS is only used
for Internet pass-through (sharing PC's Internet connection with
the phone) and so is disabled by default.

--
Best regards,                                       _     _
.o. | Liege of Serenly Enlightened Majesty of     o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz  (o o)
ooo +-<email/jid: mnazarewicz@xxxxxxxxxx>--------ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux