I previously had the USB Device feature working nicely with Torizon 5.x.x, as described in this post from a few years ago:
Enabling USB Client feature in Torizon - Technical Support - Toradex Community
I’m struggling to get this same approach to work with Torizon 7.x.x.
The information on this page looks like it is still the same as when I had this feature working with Torizon 5.x.x in the past:
USB Device Mode (Linux) | Toradex Developer Center
The module I am currently using has this configuration:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.69-7.1.0-00039-g0f10503b36ba #1-Torizon SMP PREEMPT Wed Dec 11 07:36:24 UTC 2024
Kernel command line: enable_wait_mode=off galcore.contiguousSize=50331648 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.0/torizon/1486769e784382ae271db5a556352ae078906b57e08d273a435e8121d0d79419/0
Distro name: NAME="Torizon OS Upstream"
Distro version: VERSION_ID=7.1.0-build.4
Distro variant: VARIANT="Docker"
Hostname: colibri-imx6-10634753
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Colibri iMX6DL/S on Colibri Evaluation Board V3
Toradex version: 0015 V1.1A
Serial number: 10634753
Processor arch: armv7l
------------------------------------------------------------
The first challenge is that the torizon user does not seem to have enough access to the files in the usb-gadet folder, even when using sudo. That makes it tricky to debug the process step by step. The first few commands in the process do work:
mount -t configfs none /sys/kernel/config
cd /sys/kernel/config/usb_gadget/
mkdir g2
cd g2
But the commands to enter data don’t work:
sudo echo 0x1b67 > idVendor
-sh: idVendor: Permission denied
I also tried the approach from my previous post of having a service run the whole script as root on startup. That does seem to set all the values correctly but the USB device does not seem to start running.
I do have this in my device tree, could that be a problem?
// Disable the USB host power regulator to liberate SODIMM 129
®_usb_host_vbus {
status = "disabled";
};