1

I'm trying to send information via pyusb from host a to host b, the issue is that I can't get my USB crossover cable to show up on either end via lsusb, or even doubly connected to the same host. I don't know how to address/identify the port I've connected to to even send information over. I know its possible to do this, but not how to actually set it up. I would like to make one of the hosts a device, or a slave to the other, as if it was a real USB device, I only care about two way communication in so far as it is needed to set up the device -> host communication

I imagine I'm going to have to create my own device description, but that doesn't explain any part of the process to actually get a linux based system to identify it.

I guess what I'm looking for is a way to address the hosts on either end or the connection itself, something for me to identify and then use with pyusb so I can actually send information over, and then let me use one as an actual usb device.

EDIT: Looking around more it seems like I need to use g_serial some how on the host I intend to make act like a device. That should include the proper drivers and I should be able to hook up both sides that way, however this still seems to require a usb device port, and obviously I'm not using an embedded system on either end, so I don't have access to a device port or both.

I'm open for some sort of host hardware converter to device, but I need to make sure bandwidth is not sacrificed. Bandwidth is also the reason I'm not using Ethernet.

I'm willing to forgo all that though if I'm able to send information straight over the port some how. Clearly this is also possible because there exists special software with other cables that allow file transfer (and windows recognizes my cable when connected to linux). I need the ability to do this as well.

EDIT: dmesg output is too large, but here is something interesting:

usb usb4-port1: Cannot enable. Maybe the USB cable is bad? 

this gets displayed for thousands of lines.

also get this from windows side (not actually what I'm trying to do) enter image description here

9
  • Just because the spec says it's possible for USB 3.0 doesn't mean common PC USB 3.0 host adapters actually implement this part of the spec. And then the host adapter kernel driver will also have to support it (and I don't know of any Linux driver that does that). So chances that it will actually work on your hardware are pretty slim. Commented Jun 7, 2017 at 7:20
  • @dirkt Then I could write a kernel driver... how would I address the port that way? Also what you say basically implies that the cable is completely useless, and that makes no sense. Also this certainly is not a hardware problem... my windows computer can actually recognize the connection to a linux computer via this cable. Commented Jun 7, 2017 at 13:22
  • So you have connected two PCs under Windows this way? What information does the device manager give in this mode? As what kind of USB device does the host controller act? If you connect in to Linux, what do lsusb and dmesg say?I mean, if you got it to work under Windows, that's great news, and will give hints how to implement it in Linux. So please add details to your question. :-) The only usage I've seen for this cable type so far is for debug ports, so it's clearly not useless ... Commented Jun 7, 2017 at 16:09
  • 1
    Please add details to the question, this is all very vague, and nothing to work with. For starters, output of lspci -nn to identify the host adapter hardware, content of dmesg after you plug in the cable (with other plugged into windows machine), screenshots of the Properties window of the USB host adapter in the Windows device manager, all tabs if possible. With that information, I can at least google for datasheets. And yes, if something works under Windows, it gives a lot of hints. How do you think reverse engineered device drivers get written? Commented Jun 7, 2017 at 17:10
  • 1
    Judging from the error messages, your hardware doesn't support it all: You just get errors on both sides. So Windows doesn't "recognize your cable when connected to Linux". If you can show me a working Windows-to-Windows configuration with that cable, maybe one can figure out something from that, but from what you have right now, it just won't work. Commented Jun 7, 2017 at 18:13

2 Answers 2

0

I haven't tested this but according to USB3 debug port one can use an USB 3.x debug cable to set up a serial connection between two linux hosts. This would allow to e.g. run a PPP or SLIP connection on top of the ttys.

0

Yes, it is possible. There's the "USB Gadget" project, and the "Linux IO Target" project. There appears to be a lot of talk about both these projects but very little on how to actually make it work.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.