I spoke too soon. The NDIS gadget shows up using lsusb, but doesn't
modprobe correctly, so doesn't register as a working ethernet interface.
Here's the syslog entries from Linux:

[357068.613065] usb 1-2: new high-speed USB device number 43 using ehci-pci
> [357068.778390] usb 1-2: config 1 interface 1 altsetting 0 bulk endpoint
> 0x81 has invalid maxpacket 64
> [357068.778392] usb 1-2: config 1 interface 1 altsetting 0 bulk endpoint
> 0x2 has invalid maxpacket 64
> [357068.790699] usb 1-2: New USB device found, idVendor=584e,
> idProduct=5342, bcdDevice= 0.01
> [357068.790701] usb 1-2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [357068.790703] usb 1-2: Product: RNDIS gadget
> [357068.790704] usb 1-2: Manufacturer: NuttX
> [357068.790705] usb 1-2: SerialNumber: 1234
> [357068.927096] rndis_host 1-2:1.0: skipping garbage
> [357068.954226] rndis_host 1-2:1.0: RNDIS_MSG_QUERY(0x01010101) failed, -32
> [357068.954229] rndis_host 1-2:1.0: rndis get ethaddr, -32
> [357068.957513] rndis_host: probe of 1-2:1.0 failed with error -32
> [357068.964412] rndis_wlan 1-2:1.0: skipping garbage
>

Here's an excerpt from the USB trace on NuttX:

[ 3432.710000] EP 0 Request complete: 0009
> [ 3432.710000] Interrupt decode   15: 0000
> [ 3432.720000] Interrupt exit     22: 0025
> [ 3432.720000] Interrupt entry    22: 0125
> [ 3432.730000] Interrupt decode   25: 0100
> [ 3432.730000] Interrupt decode    1: 0000
> [ 3432.730000] Interrupt decode   26: 8640
> [ 3432.740000] Interrupt exit     22: 0025
> [ 3432.740000] Interrupt entry    22: 0125
> [ 3432.750000] Interrupt decode   25: 0100
> [ 3432.750000] Interrupt decode    1: 0000
> [ 3432.760000] Interrupt decode   27: d400
> [ 3432.760000] Interrupt decode   11: 0038
> [ 3432.760000] Interrupt decode   18: 0080
> [ 3432.770000] Interrupt decode    5: 0000
> [ 3432.770000] Class setup          : 0006
> [ 3432.780000] EP submit            : 0000
> [ 3432.780000] EP 0 IN queued       : 0038
> [ 3432.780000] EP 0 IN write        : 0038
> [ 3432.790000] Interrupt exit     22: 0025
> [ 3432.790000] Interrupt entry    22: 0125
> [ 3432.800000] Interrupt decode   25: 0100
> [ 3432.800000] Interrupt decode    1: 0000
> [ 3432.810000] Interrupt decode   32: 8400
> [ 3432.810000] EP 0 Request complete: 0038
> [ 3432.810000] Interrupt decode   15: 0000
> [ 3432.820000] Interrupt exit     22: 0025
> [ 3432.820000] Interrupt entry    22: 0125
> [ 3432.830000] Interrupt decode   25: 0100
> [ 3432.830000] Interrupt decode    1: 0000
> [ 3432.840000] Interrupt decode   26: 8640
> [ 3432.840000] Interrupt exit     22: 0025
>

Looks like more debugging is necessary.

-adam

On Thu, Jan 2, 2020 at 10:50 PM Adam Feuer <a...@adamfeuer.com> wrote:

> Ok, got USBDEV_TRACE working and got the NuttX NDIS gadget to connect to
> my Linux host, it appears when I do lsusb.
>
> I had to add some NDIS initialization code for the SAMA5D3-xplained board
> and debug it using the SEGGER J-Link in order to get it working. I'll post
> a PR when I get it working all the way.
>
> -adam
>
>
> On Thu, Jan 2, 2020 at 8:47 PM Adam Feuer <a...@adamfeuer.com> wrote:
>
>> I tried enabling the following config options to turn on USB tracing, but
>> didn't get any tracing output when I rebooted:
>>
>> CONFIG_DEBUG_FEATURES=y
>>> CONFIG_USBDEV_TRACE=y
>>> CONFIG_USBDEV_TRACE_NRECORDS=5000
>>> CONFIG_USBDEV_TRACE_STRINGS=y
>>> CONFIG_NSH_USBDEV_TRACE=n
>>> CONFIG_NSH_ARCHINIT=y
>>> CONFIG_USBMONITOR=y
>>> CONFIG_USBMONITOR_STACKSIZE=2048
>>> CONFIG_USBMONITOR_PRIORITY=50
>>> CONFIG_USBMONITOR_INTERVAL=1
>>> CONFIG_USBMONITOR_TRACEINIT=y
>>> CONFIG_USBMONITOR_TRACECLASS=y
>>> CONFIG_USBMONITOR_TRACETRANSFERS=y
>>> CONFIG_USBMONITOR_TRACECONTROLLER=y
>>> CONFIG_USBMONITOR_TRACEINTERRUPTS=y
>>>
>>
>> I got these from this page:
>> http://dontbefooled.nuttx.org/doku.php?id=documentation:usbtrace
>>
>> On Thu, Jan 2, 2020 at 6:25 PM Adam Feuer <a...@adamfeuer.com> wrote:
>>
>>> Hi,
>>>
>>> I am trying to get Ethernet over USB working on the SAMA5D36. I am using
>>> Ubuntu Linux. I configured NuttX as per Alan's video here:
>>>
>>> https://www.youtube.com/watch?v=8noH8v7xNgs
>>> https://www.youtube.com/watch?v=dk3jqhn9XQ4
>>>
>>> I can compile NuttX and get a shell. I have the ping command.
>>>
>>> I don't see the NuttX device show up on my Linux computer's USB bus via
>>> lsusb. Does this mean the USB subsystem is not initialized correctly? Does
>>> anyone have ideas on how to debug? I don't see error messages when booting
>>> NuttX.
>>>
>>> cheers
>>> adam
>>> --
>>> Adam Feuer <a...@adamfeuer.com>
>>>
>>
>>
>> --
>> Adam Feuer <a...@adamfeuer.com>
>>
>
>
> --
> Adam Feuer <a...@adamfeuer.com>
>


-- 
Adam Feuer <a...@adamfeuer.com>

Reply via email to