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

  • 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. – dirkt Jun 7 '17 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. – opa Jun 7 '17 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 ... – dirkt Jun 7 '17 at 16:09
  • @dirkt A: I've gotten usb 3 crossover cables with custom software before to work with two windows devices. B: the current cable I'm using gets recognized by windows if I connect to a linux device, I do not have two windows devices atm. This does not mean I can natively transfer files however. C: Device manager screws up in linux connection and deletes/readds the device constantly, window to windows mode I never needed to check device manager, so i have no clue there. D: What are you on about? This also isn't about windows to linux. its about linux to linux. – opa Jun 7 '17 at 16:38
  • @dirkt E: I already told you want they said, nothing, they can't find anything. Theres just no entry point to go on from here on that end. F: No, the fact that something works on windows did not, in any way, give any hints on how it would work on linux. monitoring messages sent via wireshark physically can't help in this situation if that's what you were thinking. G: Debug ports, you mean via power? That alone isn't much debug help if you can't send information in any direction. – opa Jun 7 '17 at 16:39
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.