this post was submitted on 02 May 2024
101 points (92.4% liked)

Linux

48083 readers
816 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

So i tried to connect steamdeck to pc using usb and i read its immpossible because steamdeck is a computer and some explanation on quora about strong master slave relationship. But then why is it possible for android phones to connect to pc whilist also having the ability to use USB and other usb c accesories. Also why cant it be a toggle? So that you can change whetewer this usb( or device ) is reciving data ot sending data .

you are viewing a single comment's thread
view the rest of the comments
[–] Rustmilian@lemmy.world 27 points 6 months ago* (last edited 6 months ago)

I found some directions that might help.

Enabling USB-C OTG Device Mode :
Ensure the Linux device has a USB-C port that supports OTG functionality.
In the device tree, set the dr_mode property of the USB OTG controller to "peripheral" or "otg" to enable device mode.
Configure the TUSB320 USB-C controller (or equivalent) to operate in UFP (Upstream Facing Port) mode, which allows the device to act as a USB peripheral.
Configuring USB Gadget Drivers :
Load the appropriate Linux USB gadget driver for the desired functionality, such as g_ether for Ethernet over USB, g_serial for a serial device, etc.
Manually configure the USB network interface, such as assigning an IP address to usb0.
Connecting to a Host :
Use a USB-C to USB-C or USB-C to USB-A cable to connect the Linux device in OTG device mode to a host PC.
The host PC should then detect the Linux device as a USB peripheral, allowing file transfer, network connectivity, or other functionality depending on the configured gadget driver.

Gateworks.com Wiki Linux OTG
Kernel.org Driver-API USB Gadget
Collabora Blog Modern Linux USB Gadget integration with Systemd Part1

A tool : gt
Rust library : usb-gadget
C Library : libusbgx