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 .

  • bloodfart@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Universal Serial Bus.

    Serial communication between two hosts requires either robust auto negotiation or a crossover cable.

    Usb doesn’t have good auto negotiation between two hosts so you gotta use a crossover cable.

    heres one

    But… there’s no guarantee that the computers usb controllers and operating systems will support it.

      • bloodfart@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        Yeah but like if instead of usb it was a db9 you’d need the tx and rx crossed over.

        That was called a uh null modem back in the day

      • Rustmilian@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        5 months ago

        Possibly. But from my research it seems to really depend.

        the USB-C ports on the two PCs need to support USB OTG (On-The-Go) functionality, which allows the ports to dynamically switch between host and device modes. This is what enables the direct PC-to-PC communication over the USB-C connection.

  • Rustmilian@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 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.

  • hperrin@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    In general, because what everyone thinks of when they say USB is a host-device protocol, and you’re trying to connect two hosts together.

    But USB is a blanket term for a number of protocols, and there are protocols that allow a host to switch roles and become a device, depending on what it’s connected to.

    If you see a PC being advertised with “dual role USB ports” or support for “USB-OTG”, then you can connect it to another PC. Otherwise, you almost certainly can’t.

    If all you want to do is transfer files, you can use something like QuickDAV to transfer files over your local network.