idf-extra-components icon indicating copy to clipboard operation
idf-extra-components copied to clipboard

fix(usb) compile tinyusb_net.c when RNDIS is enabled (IEC-96)

Open voedipus opened this issue 1 year ago • 7 comments

Checklist

  • [x] Component contains License
  • [x] Component contains README.md
  • [x] Component contains idf_component.yml file with url field defined
  • [x] Component was added to upload job
  • [x] Component was added to build job
  • [x] Optional: Component contains unit tests
  • [x] CI passing

Change description

RNDIS and ECM were not working when selected in menuconfig

voedipus avatar Mar 12 '24 10:03 voedipus

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 12 '24 10:03 CLAassistant

@voedipus Thank you for the PR! Does the RNDIS configuration work with your device?

we did not test RNDIS, only NCM. That is why why enabled NCM only

tore-espressif avatar Mar 25 '24 08:03 tore-espressif

@tore-espressif Actually, it is not working with this MR, but I was able to get RNDIS working with couple of other fixes. I will add changes soon

voedipus avatar Mar 25 '24 16:03 voedipus

@tore-espressif It works now, checked on Linux with esp idf 5.1.3 and Windows 10 (RNDIS)

voedipus avatar Mar 26 '24 16:03 voedipus

@voedipus Thank you for the PR! Does the RNDIS configuration work with your device?

we did not test RNDIS, only NCM. That is why why enabled NCM only

Please do include RNDIS support. The upstream is rewriting the NCM driver and some unstablility will be expected. Also, the current NCM driver is buggy and slower than the RNDIS. If we would like to enable the USB network feature at this moment I think RNDIS is still the way to go

wuyuanyi135 avatar Jul 20 '24 07:07 wuyuanyi135

The current RNDIS driver in TinyUSB does not support FIFO buffering and lacks an effective API to notify the application layer when the previous transmission is complete. Using the more efficient tinyusb_net_send_async function often results in cases where the previous RNDIS transmission hasn't finished. On the other hand, the new NCM driver supports software buffering. I believe the RNDIS driver should also support this feature.

Furthermore, supporting RNDIS is necessary because, in network card applications, Windows 10 does not support the NCM driver.

lijunru-hub avatar Aug 22 '24 08:08 lijunru-hub

Furthermore, supporting RNDIS is necessary because, in network card applications, Windows 10 does not support the NCM driver.

Here's a step-by-step manual how to install NCM driver on Windows 10 , if anyone is interested

win10-native-ncm.pdf

UPDATE: We will update TinyUSB in esp-idf to v0.17 soon. This release brings refactored NCM class and DMA support. If the NCM performs well, we plan to support NCM only, due to our limited resources to maintain 2 USB networking solutions

tore-espressif avatar Sep 06 '24 08:09 tore-espressif