This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
products:sbc:edge-2l:configurations:usb-gadget [2025/11/25 04:04] gray created |
products:sbc:edge-2l:configurations:usb-gadget [2026/05/11 02:29] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{indexmenu_n> | {{indexmenu_n> | ||
| - | ====== Edge-2L USB Gadget | + | ====== Edge-2L USB gadget |
| - | {{page>/products/sbc/common/configurations/usb-gadget& | + | {{page> |
| ===== Usage of ADB ===== | ===== Usage of ADB ===== | ||
| - | ADB is enabled by default, you can access the device directly via adb: | + | ADB (Android Debug Bridge) |
| <code shell> | <code shell> | ||
| $ adb kill-server | $ adb kill-server | ||
| $ adb devices | $ adb devices | ||
| + | </ | ||
| + | |||
| + | Expected output: | ||
| + | ```txt | ||
| * daemon not running; starting now at tcp:5037 | * daemon not running; starting now at tcp:5037 | ||
| * daemon started successfully | * daemon started successfully | ||
| Line 17: | Line 21: | ||
| List of devices attached | List of devices attached | ||
| 12036c819990 | 12036c819990 | ||
| + | ``` | ||
| + | To obtain a shell on the device: | ||
| + | ```shell | ||
| $ adb shell | $ adb shell | ||
| - | root@Khadas:/# | ||
| - | </ | ||
| - | ===== Enable Other USB Functions ===== | + | ``` |
| + | You should see a prompt like: '' | ||
| - | You can dynamically switch | + | ===== Enable other USB functions |
| - | | + | You can dynamically switch USB gadget functions by writing the desired mode to the file ''/ |
| + | |||
| + | | ||
| <code shell> | <code shell> | ||
| echo usb_rndis_en > / | echo usb_rndis_en > / | ||
| Line 32: | Line 40: | ||
| </ | </ | ||
| - | * **Enable ACM** | + | * **Enable ACM (Serial Port over USB):** |
| <code shell> | <code shell> | ||
| echo usb_acm_en > / | echo usb_acm_en > / | ||
| Line 38: | Line 46: | ||
| </ | </ | ||
| - | * **Enable UAC** | + | * **Enable UAC (USB Audio Class):** |
| <code shell> | <code shell> | ||
| echo usb_uac_en > / | echo usb_uac_en > / | ||
| Line 44: | Line 52: | ||
| </ | </ | ||
| - | * **Enable UVC** | + | * **Enable UVC (USB Video Class):** |
| <code shell> | <code shell> | ||
| echo usb_uvc_en > / | echo usb_uvc_en > / | ||
| Line 50: | Line 58: | ||
| </ | </ | ||
| - | After enabling UVC, run: | + | After enabling UVC, start the UVC gadget application: |
| <code shell> | <code shell> | ||
| uvc-gadget rockchip/ | uvc-gadget rockchip/ | ||
| </ | </ | ||
| - | > Note: Replace '' | + | > Note: Replace '' |
| - | * **Enable UMS** | + | * **Enable UMS (USB Mass Storage):** |
| <code shell> | <code shell> | ||
| echo usb_ums_en > / | echo usb_ums_en > / | ||
| Line 63: | Line 71: | ||
| </ | </ | ||
| - | UMS mode requires | + | UMS mode requires |
| + | |||
| + | ===== RNDIS setup IP address ===== | ||
| - | ===== RNDIS Setup IP Address ===== | + | After enabling the RNDIS function, you need to configure the IP address manually on both the device and the host PC. |
| - | After enabling RNDIS, configure | + | Such as set the IP address |
| <code shell> | <code shell> | ||
| Line 73: | Line 83: | ||
| </ | </ | ||
| - | Also configure the IP on the host PC, for example '' | + | On the host PC, configure the corresponding USB network interface with an IP address |
| - | Test the network | + | Test the connection |
| <code shell> | <code shell> | ||