Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual patch needed to get USB bridge working (AEGHB-97) #39

Open
redfast00 opened this issue Mar 13, 2023 · 5 comments
Open

Manual patch needed to get USB bridge working (AEGHB-97) #39

redfast00 opened this issue Mar 13, 2023 · 5 comments

Comments

@redfast00
Copy link

redfast00 commented Mar 13, 2023

I've tried to compile the wifi_router example in this project, with CONFIG_BRIDGE_DATA_FORWARDING_NETIF_USB=y, but this does not build:

/home/user/esp-iot-bridge/components/iot_bridge/src/bridge_usb.c:30:10: fatal error: tinyusb.h: No such file or directory
   30 | #include "tinyusb.h"
      |          ^~~~~~~~~~~
compilation terminated.

This is with the latest master. It should be noted that this feature is commented out in CI, so it doesn't appear broken: https://github.com/espressif/esp-iot-bridge/blob/master/.gitlab-ci.yml#L69

@redfast00 redfast00 changed the title USB bridge feature does not seem to compile: USB bridge feature does not seem to compile Mar 13, 2023
@github-actions github-actions bot changed the title USB bridge feature does not seem to compile USB bridge feature does not seem to compile (AEGHB-97) Mar 13, 2023
@tswen
Copy link
Contributor

tswen commented Mar 14, 2023

You can temporarily add the following patch to the code, and we will update the example for the NIC solution later.

diff --git a/components/iot_bridge/CMakeLists.txt b/components/iot_bridge/CMakeLists.txt
index 61e8593..6a0d290 100644
--- a/components/iot_bridge/CMakeLists.txt
+++ b/components/iot_bridge/CMakeLists.txt
@@ -30,7 +30,7 @@ if (CONFIG_BRIDGE_DATA_FORWARDING_NETIF_SDIO OR CONFIG_BRIDGE_DATA_FORWARDING_NE
 endif()
 
 if ("${IDF_TARGET}" STREQUAL "esp32s2" OR "${IDF_TARGET}" STREQUAL "esp32s3")
-    list(APPEND requires "esp_modem_usb_dte")
+    list(APPEND requires "esp_modem_usb_dte" "usb_device")
 endif()
 
 idf_component_register(SRCS "${srcs}"
diff --git a/examples/wifi_router/main/idf_component.yml b/examples/wifi_router/main/idf_component.yml
index 12e8b33..8923247 100644
--- a/examples/wifi_router/main/idf_component.yml
+++ b/examples/wifi_router/main/idf_component.yml
@@ -11,6 +11,9 @@ dependencies:
   web_server:
     path: components/web_server
     git: https://github.com/espressif/esp-iot-bridge.git
+  usb_device:
+    path: components/usb/usb_device
+    git: https://github.com/espressif/esp-iot-bridge.git
   # The "esp_modem_usb_dte" component is temporarily disabled in iot_bridge yml file,
   # as idf-component-manager doesn't support uploading components with "rules" entries to the registry.
   # So temporarily place the "esp_modem_usb_dte" "esp_modem" component under examples.

@redfast00 redfast00 changed the title USB bridge feature does not seem to compile (AEGHB-97) Manual patch needed to get USB bridge working (AEGHB-97) Mar 30, 2023
@redfast00
Copy link
Author

@tswen Would you accept a PR that includes your patch?

@tswen
Copy link
Contributor

tswen commented Jun 8, 2023

Hi @redfast00 , there is an internal MR under review and will be released soon.

@chedim
Copy link

chedim commented Feb 10, 2024

how soon, tho?

@tswen
Copy link
Contributor

tswen commented Feb 17, 2024

The current example can already use USB netif normally and does not require any modification to the components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants