I'm trying to emulate a wired controller that is normally connected to the console through USB.
I got dumps of communications which are just bytes, whose "phase" is either IN (from the device to the host), OUT (from the host to the device), or CTL (control? I guess that's for the descriptors stuff).
I'd like to get these raw bytes and ideally transmit them to my computer (I own a UART-USB bridge, so I can connect it to my arduino's pins and send data through it), and then I would be able to send back bytes in order to initialize the connection.
I thought there was a bridge between the USB cable and the pins 0 and 1 of the Arduino, but I tried connecting my UART bridge to it and got nothing when reading from it - shouldn't I be able to read at least the descriptors-related communications when I connect my arduino to another host with my bridge on the pins 0 and 1?
I've tried looking into libs like LUFA to emulate HID devices, but it seems very complicated since I just want to access the raw bytes sent from the host, and react to them - I think that should be possible, but I don't see how.
Is that a usb HID type of contrôler ?
Can you describe exactly how you wired stuff ?
If you want to use the serial monitor of your arduino, you need to connect the "bridge" to another Serial port. If you don’t have other ports then use Software Serial for example
Yes, I think it's a HID controller (it's a Nintendo Switch pro controller).
So far I have the arduino connected to the Switch through USB, and my USB-UART bridge connected to my computer on USB on one side, and to the pins 0 and 1 of the arduino on the other, and I tried opening a serial communication using pyserial but I got nothing.
Maybe the arduino is treating the low-level communications by itself?
How can I use the Serial monitor of the arduino without it being connected through USB with the computer? Do I have to upload a simple script using SoftwareSerial? But then, what would I send to the computer since I don't hace access to the USB communication in the code (as far as I know)?
What type of arduino do you have? Are you trying to receive the commands from the controller on the arduino and have the arduino relay those commands somewhere else?
I have an Arduino Uno R3.
Yes, that's what I am trying to do, but I'm not sure how to make the switch think the arduino is actually a controller, so I thought I could try to manage directly the USB communication since I got dumps of real communications - I don't really know how to do that, though.
The uno (without some hacks) cannot appear as a USB HID device.
You would need a 32u4 based board, a Due or a Zero and similar to become an HID device (and then use the HID library)
I think I've already seen some projects doing what I want - emulating controllers with a standard arduino uno and the LUFA lib. However, none of them emulate the pro controller.
I don't really know how to use the LUFA lib and I can't find any good resource online - does anyone know a good tutorial or even documentation?
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.