this post was submitted on 02 May 2024
84 points (100.0% liked)

Linux

1257 readers
53 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 .

top 36 comments
sorted by: hot top controversial new old
[–] bjoern_tantau@swg-empire.de 45 points 6 months ago (1 children)

You actually can connect a Steam Deck to another PC. Look for the DeckMTP plugin on Decky Loader.

MTP is the thing Android uses when you connect your phone to a PC. It should be possible to install on any PC. Don't know about Windows but there's probably a solution for that as well.

Don't know what happens when both devices have it. I'd suspect that they would both be able to access each other's drive.

[–] boredsquirrel@slrpnk.net 6 points 6 months ago (1 children)

MTP totally sucks though, it is a pain in the a**.

Would rather use Syncthing or localsend

[–] bjoern_tantau@swg-empire.de 3 points 6 months ago (1 children)

Yeah, that's why I don't have it installed. Sftp is more than enough. But that's not what OP was asking.

[–] szczuroarturo@programming.dev 2 points 6 months ago

Oh yeach i specificaly asked this question due to frustraions in using warpinator. It constantly stopped. Probably because my network is horrible ( the usual case of a crap router provided by isp. And to add to the frustration its the T-Mobile odu idu unit so its also under double NAT alghtough that part shouldnt matter in sending files through local network ).

[–] avidamoeba@lemmy.ca 40 points 6 months ago

We can connect two computers over USB and we do it all the time. E.g. your phone and your PC. One or both of the computers needs to be able to act as a device. Most Android computers can switch between host and device depending on what's plugged in. It all comes down to implementation.

[–] edinbruh@feddit.it 39 points 6 months ago* (last edited 6 months ago) (1 children)

The USB protocol was simple by design, so it could be implemented in small dumb devices like pen drives. More specifically, it used two couples of cables, one couple was for power and the other for data (four wires in total). Having a single half-duplex data line means you need some way of arbitrating who can send data at any time. The easiest way to do it is having a single machine that decides who gets to send data (master), and the easiest way to decide the master is to not do it and have the computer always do the master. This means you couldn't connect two computers together because they would both try to be the master.

I used the past tense because you may have noticed that micro USB have 5 pins and not 4, that's because phones are computers and they use the 5th pin to decide how to behave. If it's grounded they act as a slave (the male micro to male A cable grounds it). If it has a resistor (the otg cable has it) it act as master. And if the devices are connected with a wire on that pin (on some special micro to micro) they negotiate the connection.

When they made usb 3.0 and they realized that not having the 5th wire on the usb-A was stupid, so they put it (along side some extra data lines) that's why they have an odd number of wires. So with usb 3 you can connect computers together, but you need a special cable that uses the negotiation wire. Also I don't know what software you need for it to work.

Usb-c is basically two USB 3.0 in the same cable, so you can probably connect computers with that. But often the port on the devices only uses one, so it might not be faster. Originally they put the pins for two connections so you could flip the connector, but later they realized they could use them to get double speed.

[–] digdilem@lemmy.ml 14 points 6 months ago

And it was a good design - it's universal (aha) adoption proves that.

Those of us old enough to remember the pain of using 9 and 25 pin serial leads and having to manually set baud rate and protocols, along with LPT and external SCSI and manufacturer specific sockets probably agree this was a problem that needed solving, and USB did do that.

[–] rotopenguin@infosec.pub 21 points 6 months ago* (last edited 6 months ago) (1 children)

The reason you can't is "because Intel deliberately designed it that way". Back when USB was just a notion, PDAs were a really cool thing. There was apparently concern at Intel that someday these little things might be all that someone might own. You might connect your PDA directly to the printer, rather than syncing it to your Intel Desktop and printing from there. You might connect your PDA to the modem and collect electronic mailographs directly, instead of syncing with a PC. If you could do enough without the PC middleman, you might even skip on buying an Intel computer altogether.

So, Intel baked into the protocol anything they could think of to make peer-to-peer communications impossible in USB, make life easy for the singular PC communications master, and put a timing onus on devices that forced them to be dumbed-down state machines instead of computers in their own right.

[–] Scipitie@lemmy.dbzer0.com 16 points 6 months ago* (last edited 6 months ago)

Is there anything to support this? I couldn't find anything that really has this intend documented and Intel weren't the only on pushing for usb as the most simple protocol possible ( I recall a lot of excitement about the "u" part.. How naive at least I was back then!).

I'm not knowledgeable enough to really argue against it, looking simply from an Okham point of view as "they wanted everything to connect" - the printer in the same way as that PDA.... Plus Intels de facto (IT) world domination at the time it just seems unlikely.

Edit: some sentences didn't make even less sense, fixed.

[–] GammaGames 15 points 6 months ago (1 children)

Quora isn’t worth its weight in bits

[–] SharkAttak@kbin.social 4 points 6 months ago (1 children)

Quora is the new Yahoo Answers, debate me.

[–] eah@kbin.social 1 points 6 months ago (1 children)
[–] SharkAttak@kbin.social 1 points 6 months ago

Quora is still around, so that's the bottom standard for the moment.

[–] progandy@feddit.de 15 points 6 months ago* (last edited 6 months ago) (1 children)

With usb-c you should be able to load a driver that allows network connectivity regardless of otg mode. Or was it Thunderbolt?

Update: I thought of thunderbolt-net which works with Thunderbolt 3 and probably USB4

[–] 0x0@programming.dev 10 points 6 months ago (1 children)

Because they're both hosts, you need a host and a client iirc.

[–] mbirth@lemmy.mbirth.uk 5 points 6 months ago (1 children)

Most modern Intel chipsets support “Dual Role Device” (DRD) where they can act as host or client as needed.

[–] rotopenguin@infosec.pub 1 points 6 months ago

And if you want to get really funky, Intel also does their JTAG over USB. They are quite secretive about it, your bios should have turned it off, but it is there.

[–] possiblylinux127@lemmy.zip 6 points 6 months ago* (last edited 6 months ago) (1 children)

What are you trying to achieve? If your looking to transfer data I would use a Ethernet connection.

You will need to manually set the IP and netmask on each side. USB isn't designed for what you are trying to do.

[–] Bizarroland@kbin.social 2 points 6 months ago (2 children)

You would also need a type A to type B ethernet cable, AKA a crossover cable.

Without that you will need some sort of switch to act as an intermediary between the two devices.

[–] rotopenguin@infosec.pub 5 points 6 months ago (1 children)

I'm quite sure that all gigabit+ ethernet auto-negotiates. There is no shared ether, there are no dedicated tx/rx pairs anymore. It's all point-to point and constantly negotiating to make the most of every wire it's got.

[–] Bizarroland@kbin.social 3 points 6 months ago (1 children)

Yeah I only learned about that in the comments down below. I was just going off what they taught me when I took my network+ what 3 years ago?

Ethernet being reconditioned to Auto negotiate crossover connections was not covered or if it was it was a blurb and I forgot it in the meantime.

[–] rotopenguin@infosec.pub 3 points 6 months ago* (last edited 6 months ago) (1 children)

Professional accreditation is such a racket lol. I've seen plenty of tax courses with "the last tax year that so-and-so was relevant was 1988, NEVERTHELESS this will be on the test." Zero effort goes into updating the material, just keep on reselling the same crap to a captive audience forever.

[–] Bizarroland@kbin.social 1 points 6 months ago (1 children)

I have taken the A+ certification on two separate occasions and the first time I walked in with no training and aced it. The second time I walked in with no training and I struggled but I still passed.

The CompTIA certifications do get updated on a roughly 3-year cycle, but even so they're never going to cover everything and even if you can pass the test it doesn't actually mean that you are a competent IT person.

[–] N0x0n@lemmy.ml 2 points 6 months ago* (last edited 6 months ago)

Also goes in reverse. Here are probably a lot of good IT specialist who wouldn't pass any comptia test. Not because they are bad IT guys or don't have the necessary skill/knowledge...

No... Just because CompTIA tests are worded in such a way that you actually doubt that every answer could actually be right and fit the question...

They are playing on words and even if you're the best IT guy in the world but lack the reading skills and English collocation of a perfect native Shakespeare writer, you're going to fail ^^.

But that's on purpose 🤑🤑🤑.

Well, that is just not true anymore and hasn't been in a very long time. Probably everything made in the last 20 years has auto detection and doesn't need a crossover ethernet cable. This was introduced as an optional feature sometime in the 100Base-T era and is required for gigabit ethernet.

[–] MonkderDritte@feddit.de 6 points 6 months ago* (last edited 6 months ago) (1 children)

Because USB builds a tree, with the USB-controller as stem.

Isn't there something like that for ethernet?

[–] CosmicTurtle0@lemmy.dbzer0.com 6 points 6 months ago

Crossover cable.

I still have one around just in case but wifi makes it unnecessarily these days.

[–] mbirth@lemmy.mbirth.uk 5 points 6 months ago (2 children)

Back in the days we had these things. But I doubt this would work with USB-C adapters and a Steam Deck.

[–] SteveTech@programming.dev 1 points 6 months ago

If they haven't changed in the last decade, it's basically just 2 USB network adaptors stuck together. So it probably would still work, but I'd also prefer the modern solutions anyway.

load more comments (1 replies)
[–] bloodfart@lemmy.ml 4 points 6 months ago (1 children)

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.

[–] boredsquirrel@slrpnk.net 1 points 6 months ago (1 children)

Would be nice to have a date on that statement in the product description. Seems to be outdated?

[–] bloodfart@lemmy.ml 2 points 6 months ago

Oh no, they say right there that it will not let two computers connect to each other lol.

[–] john89@lemmy.ca 1 points 6 months ago (1 children)

You can't connect a steam deck to your PC?

[–] erwan@lemmy.ml 4 points 6 months ago (1 children)

You can connect your Steam Deck to your PC with USB, but all it's going to do is charge it.

[–] rotopenguin@infosec.pub 2 points 6 months ago

I think that the Deck is able to connect as a device (MTP or CDC?), but there has been trouble with that so the current OS disables it.