Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

I try to write a USB connection, but it does not work well... #23

Closed
rushairer opened this issue Oct 30, 2018 · 10 comments
Closed

I try to write a USB connection, but it does not work well... #23

rushairer opened this issue Oct 30, 2018 · 10 comments

Comments

@rushairer
Copy link
Contributor

https://github.com/rushairer/Noexes/blob/usb/server/source/noexs/source/usb.cpp

I get right idProduct

0x057e: 0x3000

but the interface index is 0, READ_ENDPOINT is 0x81 , WRITE_ENDPOINT is 0x01, it that right?

@rushairer
Copy link
Contributor Author

rushairer commented Oct 30, 2018

Bus 020 Device 010: ID 057e:3000

Configuration Descriptor:
  bLength                  9
  bDescriptorType          2
  wTotalLength            32
  bNumInterfaces           1
  bConfigurationValue      1
  iConfiguration           0
  bmAttributes          0xc0
    Self Powered
  bMaxPower              500mA


Interface Descriptor:
  bLength                  9
  bDescriptorType          4
  bInterfaceNumber         0
  bAlternateSetting        0
  bNumEndpoints            2
  bInterfaceClass        255 Vendor-specific
  bInterfaceSubClass     255
  bInterfaceProtocol     255
  iInterface               0

endpoints  0 => 1, 1 =>  -127

When runing at Debugger.java line 57, throw a exception :

javax.usb.UsbPlatformException: USB error 8: Transfer error on bulk endpoint: Overflow

then I try client connection again, get new exception:

javax.usb.UsbPlatformException: USB error 7: Transfer error on bulk endpoint: Operation timed out

try more times, still error 7.
when i restart swtich, first connection get error 8, other connections get error 7. 😂

@mdbell
Copy link
Owner

mdbell commented Oct 30, 2018

Awesome to see someone helping out with Noexes! All the client sided usb code I wrote is actually untested right now, and besides the vendor ID and product IDs they were borrowed from the usb4java examples. I unfortunately can't look I to it right now (besides feedback) as I'm having some problems with my PC, and I won't have new hardware till the end of this week.

@mdbell
Copy link
Owner

mdbell commented Oct 30, 2018

Actually, in UsbConnection.java I have wrong endpoint IDs (going by your lsusb stuff)

ENDPOINT_READ should be 0x80
ENDPOINT_WRITE should be 0x00

@rushairer
Copy link
Contributor Author

rushairer commented Oct 30, 2018

read = iface.getUsbEndpoint(READ_ENDPOINT);
if 0x80 get null

write = iface.getUsbEndpoint(WRITE_ENDPOINT);
if 0x00 get null

Maybe something wrong in my server-side code?

@mdbell
Copy link
Owner

mdbell commented Oct 30, 2018

That is possible but, I've also only had limited exposure with interfacing with usb devices and I've probably initialized it wrong client sided.

@mdbell
Copy link
Owner

mdbell commented Oct 30, 2018

Andi think I have your endpoints wrong .. try setting READ to 0x81 and WRITE to 0x01

@rushairer
Copy link
Contributor Author

I tried https://github.com/jakibaki/sys-netcheat, It search from memory of switch.
It's a faster way than Noexs.

@mdbell
Copy link
Owner

mdbell commented Oct 31, 2018

Please try to stay on topic when talking about issues, and yeah it is faster to search console sided, however it also creates more overhead on the console. Noexes was designed to be as small and non-invasive as possible.

@joicoss
Copy link

joicoss commented Dec 5, 2019

Good afternoon, thank you very much for this program in advance, I just wanted to ask if there is still no way to connect via USB.

@mdbell
Copy link
Owner

mdbell commented May 6, 2021

@joicoss not currently, please follow issue #5 for when/if it get's implemented

@mdbell mdbell closed this as completed May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants