This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB-Ethernet / RNDIS connection goes to disabled state on tablet

Other Parts Discussed in Thread: AM3871

My system is linux-2.6.37-psp04.04.00.01-sk running on am3871, I'm using USB-Ethernet / RNDIS gadget to communicate with Windows 7/8.1 PC. It works fine with desktop or notebook PC, but not with tablet. When connecting to tablet Network adapter is created, connection works, but after 1-2 minutes the connection goes to disabled state. I need to reconnect the device to enable it back. This occurs in any case, flowing the data through the connection or not. I tested 2 different tablets and the result is the same.

  • Moving this to the AM387X forum.
  • RNDIS host regularly sends queries (OID_GEN_LINK_SPEED, OID_GEN_MEDIA_CONNECT_STATUS, etc) to device, to know if the link would be still alive or not.

    Enable VERBOSE_DEBUG macro in the RNDIS gadget module (/drivers/usb/gadget/rndis.c). It takes log of OIDs from host and the response of the gadget.
    Which OID does the tablet host queries, just before the connection is lost?
    And how does the gadget respond?

    Tsuneo

  • gen_ndis_query_resp: OID_GEN_RCV_NO_BUFFER
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l76
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    gen_ndis_query_resp: OID_GEN_RCV_NO_BUFFER
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    gen_ndis_query_resp: OID_GEN_RCV_NO_BUFFER
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l36
    g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
    g_ether gadget: rndis req21.00 v0000 i0000 l12
    rndis_msg_parser: REMOTE_NDIS_HALT_MSG
    musb_stage0_irq 690: SUSPEND (b_peripheral) devctl 99 power f0
    g_ether gadget: suspend

  • I also tried to disallow suspend the device like here 10629-presscdn-0-58.pagely.netdna-cdn.com/.../image_thumb36.png But it's no effect. Host still suspending the device in random time (30 sec - 2 minutes) after device plugged in and link established.
  • Atmeg said:
    My system is linux-2.6.37-psp04.04.00.01-sk

    Can you try to apply all the usb related linux kernel patches from the latest version (available at the below link)? Do you observe any change?

    BR
    Pavel