o0Zz / sys-con

Nintendo Switch sysmodule that allows support for third-party controllers (XBox, PSX, PC, ...)
GNU General Public License v3.0
74 stars 5 forks source link

[Controller Request]: Y3 (GameStick) Joypad or Arcade Fighter Stick #19

Closed MJr0019 closed 3 months ago

MJr0019 commented 5 months ago

Controller Name:

Y3 Arcade Fighter Stick

https://pt.aliexpress.com/item/1005006317721164.html?gatewayAdapt=glo2bra

Y3 Joypad

https://pt.aliexpress.com/item/1005005458136372.html?spm=a2g0o.cart.0.0.65567f06IJsjck&mp=1&gatewayAdapt=glo2bra

Current Controller Behaviour:

Controller is not successful in pairing with the console

Context:

I thought about these two controllers because they are very popular and cheap.

It comes with a Gamestick, in addition to being a dongle for two controls, there is an issue with the control mission:

https://github.com/ndeadly/MissionControl/issues/818

But it didn't work!

I can test everything I can to help I have both models

o0Zz commented 5 months ago

Why did you create this ticket ?

o0Zz commented 5 months ago

DId you try to install sys-con and to plug your controller ?

MJr0019 commented 5 months ago

Why did you create this ticket ?

Because I wanted to support these two controls. I had tested it and it didn't work.

DId you try to install sys-con and to plug your controller ?

Yes, I installed SYS-CON (https://github.com/cathery/sys-con) but I realized my mistake, I didn't install this fork but the "official version", I'll do the tests this fork, if it doesn't work and I'll reopen the issue.

MJr0019 commented 4 months ago

Hello man, So...

I tested and installed SYS-CON, The official (https://github.com/cathery/sys-con) and its fork (https://github.com/o0Zz/sys-con) the control did not work.

Is there any way for the Switch to recognize this generic control, two in one in just one USB dongle?

o0Zz commented 4 months ago

Please provide the logs in order to understand the issue. Thanks

MJr0019 commented 4 months ago

Hello man again,

I had a defective "usb to usb type c connector", I bought a new one for testing.

so disregard the tests I did previously.

Come on, these are my tests that I did.

A - Xbox One controller (Already supported)

1- I connected the usb cable to the "new usb to usb type c connector" and to the control.

2- The Control has been connected and supported.

image

B - Y3 Arcade Fighter Stick (https://pt.aliexpress.com/item/1005006317721164.html?gatewayAdapt=glo2bra)

1- I connected the usb dongle to the "new usb to usb type c connector".

2- The two Controls were connected and supported individually.

image

PS: So as this controller (Y3 Arcade Fighter Stick) is supported, please disregard this issue request.

C- Y3 Joypad (https://pt.aliexpress.com/item/1005005458136372.html?spm=a2g0o.cart.0.0.65567f06IJsjck&mp=1&gatewayAdapt=glo2bra)

1- I connected the usb dongle to the "new usb to usb type c connector".

2- It was not connected.

image

PS: As if I hadn't connected anything to the "new usb to usb type c connector". I would like this to work the same as Y3 Arcade Fighter Stick .

I make this request to consider supporting option C, that is, Y3 Joypad.

I'm sorry for the wrong tests I did before, wasting your time.

Regarding the Log, is there a tutorial or wiki that I can see to send you the log correctly?

Do I have to go into the app (sys-con.nro) and connect the Y3 Joypad's usb dongle to the "new usb to usb type c connector", which will generate the log?

Thank you for your patience and Thank you very much for your attention

o0Zz commented 4 months ago

Ok good news for all the working controllers. Regarding the one which is not detected, we will need the logs, here is how you can get the logs: https://github.com/o0Zz/sys-con/blob/master/doc/Troubleshooting.md#how-to-attach-a-logs-to-a-ticket-

MJr0019 commented 4 months ago

Here is the log file:

log.log

o0Zz commented 4 months ago

Could you please set the log in debug by changing log_level=2 to log_level=0 in the configuration file.

According to these logs the controller is properly detected thus we will probably be able to do something with it but I will need debug logs ;)

MJr0019 commented 4 months ago

Here is the new log file (I deleted the old one):

log.log

config.ini.txt

o0Zz commented 4 months ago

Thanks for the logs,

Could you try this version and let me know if it change something ? (And provide logs)

sys-con-1.2.2+2-ATMOSPHERE-1.7.x.zip sys-con-1.2.2+2-ATMOSPHERE-1.6.x.zip

MJr0019 commented 4 months ago

I appreciate your work.

Here is the new log, unfortunately nothing has changed.

log[1].log

config.ini[1].txt

o0Zz commented 4 months ago

Ok, we can see that the controller connect successfully and for unknown reason disconnect after 2.5s. I think the controller expecting a certain initialization phase that we don't provide. Let try this driver to see if it change something, otherwise I will probably need a wireshark capture when you plug your controller to your windows machine in order to understand a bit more this controller behavior.

sys-con-1.2.2+2-ATMOSPHERE-1.7.x.zip

MJr0019 commented 4 months ago

Hi,

Here is the new log, unfortunately nothing has changed.

log[2].log

config.ini[2].txt

ON WINDOWS:

image

ON STEAM:

image

ON WIRESHARK:

image

I'm not sure if I'm sending the correct capture from the USB, because USBPcap1, USBPcap2 were completely stopped.

USBPcap3 was crazy with data rolling on the screen all the time.

USBPcap4 didn't modify the data.

USBPcap5 when I pressed a button the data updated but nothing appeared in the filter like "acceleration" as it was in the example (see the image above)

Here is the file anyway:

Y3_Joypad.zip

Thanks

o0Zz commented 4 months ago

Thanks, yes the capture in not correct, it look like you capture the incorrect USBPcap - it look like you capture your mouse input. In worst case, do a capture for each USBPcap and I will let you know where your controller is plugged.

MJr0019 commented 4 months ago

Hello,

I did the following, as I wasn't sure which USB port was interfering so I disconnected all USB ports from my PC.

I just left the mouse and keyboard.

Before each test I did the following.

I disconnected the mouse and keyboard, put the Joypad dongle in and pressed several buttons.

I did this on the 5 USBPcaps.

My guess is that USBPcap05 was capturing the mouse and keyboard and Joypad.

Because when I disconnected the mouse and/or keyboard, I pressed the Joypad and I saw output in the software, remembering that at that moment the only USB thing was my Joypad.

Here are all the ports captured for testing.

Wireshark.zip

Thanks for your patience and help.

o0Zz commented 4 months ago

OK thank you, Yes you are right, USBPCAP5 is the correct one, we can clearly see your controller at addr 5.5.x. Could you try 2 tests:

1) set a driver to your controller:

[20bc-5500] 
driver=xbox360

or

[20bc-5500] 
driver=xboxone

I'm not sure it will change something but just in case (Because I note that windows never read your controller descriptor that make me feel windows know how to interpret the data without knowning the controller - which is actually weird)

2) Try to use discovery_mode=1 (Instead of discovery_mode=0) in the config.ini (AND remove the section [20bc-5500] from your config.ini)

This will force sys-con to detect your controller as a XBOX controller. Again not sure if it will change something, here we will have 2 possible results:

MJr0019 commented 4 months ago

First test:

[20bc-5500] driver=xbox360

Atmosphere gave an error screen:

image

log_Test01.log

config.ini_Test01.txt

Second test:

[20bc-5500] driver=xboxone

Atmosphere gave an error screen again:

image

log_Test02.log

config.ini_Test02.txt

Third test:

I copied the settings from [0810-0001] (here is the Y3 Arcade Fighter Stick that I saw in the log.)

1- I connected the usb dongle to the "new usb to usb type c connector".

2- It was not connected.

353279921-b420e7a1-7949-4229-9283-9a94db5fab2d

log_Test03.log

config.ini_Test03.txt

Fourth Test:

Try to use discovery_mode=1 (Instead of discovery_mode=0) in the config.ini (AND remove the section [20bc-5500] from your config.ini)

1- I connected the usb dongle to the "new usb to usb type c connector".

2- It was not connected.

353279992-c6bf50af-c17f-4790-bcb7-c0dc11f79c43

PS:

In this test I noticed that the control "connected" because the lights at the top stopped blinking, there was a fixed LED for each control, similar to the Y3 Arcade Fighter Stick.

When you connect the Y3 Arcade Fighter Stick:

Player 01 will have a solid green LED.

Player 02 will have a solid red LED.

Something similar happened here, in this test with the Y3 Joypad:

Player 01 will have a solid blue LED.

Player 02 will have a solid red LED.

log_Test04.log

config.ini_Test04.txt

o0Zz commented 4 months ago

Thank you for the tests.

Regarding the crashs, I found on the code why it crash, I will fix it for next time.

Your last test is very interresting, we can see that it can't open the interface BUT we can see that the controller has been detected as an xbox controller and we see this: |D|00:01:22.077|2FB4A0D0| Controller not found in config file, adding it ...

However, In the config file you provide (For test4) I can't see any section like that [20bc-5500]. Are you sure you properly copy the file ? Could you double check on your console what contains this file after running test4.

Thanks

MJr0019 commented 4 months ago

Hello,

Thanks for your attention again,

Yes, I can say that this file (config.ini_Test04.txt) was on my console at the time of testing.

with the correct name of course, "config.ini", I just rename the file to avoid confusion when uploading.

This file (config.ini_Test04.txt) had section [20bc-5500] completely excluded, as is in the file I uploaded.

I did another test (Test 05)

Now I did it similar to test 04 , that is, I'm using discovery_mode=1 and now with section [20bc-5500] empty.

Same thing here:

1- I connected the usb dongle to the "new usb to usb type c connector".

2- It was not connected.

In this test I noticed that the control "connected" because the lights at the top stopped blinking, there was a fixed LED for each control.

In this test with the Y3 Joypad:

Player 01 will have a solid blue LED.

Player 02 will have a solid red LED.

log_Test05.log

config.ini_Test05.txt

o0Zz commented 4 months ago

Multiple things here.

1) Could you try this version (it should avoid the crash) sys-con-1.2.2+16-ATMOSPHERE-1.7.x.zip Procedure:

2) Regarding Test4 and Test5 I think something changed between your 2 tests. On test4 we can see the controller has been found, while on test5 there is no controller detected at all - And we can see in both cases you are using the same discovery mode (1), thus it's not a configuration issue. (For the discovery the section [20bc-5500] empty has no impact, this section is only used after discovery (When you see "Trying to initialize USB device")

image

What did you change in your test protocol ? For exemple, in both case do you plug your controller while the switch is wakeup ?

MJr0019 commented 4 months ago

Hello,

A 1-

Here is the new log, unfortunately nothing has changed for me.

log.log

config.ini.txt

Same thing here:

1- I connected the usb dongle to the "usb to usb type c connector".

2- It was not connected.

A2-

I understood. I don't know what changed then.

I was alternating between the Arcade Stick's USB dongle and the Joypad's USB dongle.

I can't say if that was it ...

Q: What did you change in your test protocol ? For exemple, in both case do you plug your controller while the switch is wakeup ?

A:

Yes, whenever I'm on the "joystick order screen," I insert the USB dongle.

my step by step:

1- I turn off the N.switch and boot into Hekate, in Hekate's "Tools" mode, "USB Tools", SD Card MASS.

2- I delete all the files (Sys-con) from N.switch.

3- I extract its .zip on my PC (sys-con-1.2.2+16-ATMOSPHERE-1.7.x.zip)

4- I copy all the files from the .zip from my PC to N.switch.

5- I boot into emuNand mode.

6- I click the "A" button three times to log in.

7- I click with my finger on the control icon.

8- I click with my finger on the "change order or hold mode" mode

I go to that Nintendo joystick order screen.

9- click on the Joypad's buttons to generate log

o0Zz commented 4 months ago

Could you test this version (The build version is the same but the content is different ;)).

You just need to do 1 test with:

discovery_mode=1
log_level=0

sys-con-1.2.2+16-ATMOSPHERE-1.7.x.zip

thanks

MJr0019 commented 4 months ago

Hello friend, Thanks again for all your work.

Same problem:

1- I connected the usb dongle to the "usb to usb type c connector".

2- It was not connected.

In this test I noticed that the control "connected" because the lights at the top stopped blinking, there was a fixed LED for each control.

In this test with the Y3 Joypad:

Player 01 there will be a solid blue LED.

Player 02 will have a solid red LED.

This time I left it for a few minutes, disconnected the USB dongle and reconnected it to see if anything changes.

Here is the new log

log.log

config.ini.txt

o0Zz commented 4 months ago

Ok thus definitively, it can't be open similarly to xbox. Could you try this configuration now (Same version you already have):

[global]
discovery_mode=0
log_level=0

[20bc-5500]
driver=xbox360

When you originaly test this configuration you got a crash but now with this new verion you should not experience any crash. Thanks

MJr0019 commented 4 months ago

Hello friend,

Same problem:

1- I connected the usb dongle to the "usb to usb type c connector".

2- It was not connected.

In this test now I noticed that the control “DON’T connect” because the lights at the top were blinking again, there was no fixed LED.

Here is the new log:

log.log

config.ini.txt

o0Zz commented 4 months ago

Ok so I think the correct mode is this one:

[global]
discovery_mode=0
log_level=0

[20bc-5500]
driver=

Meaning the generic driver should works. Even if from your point of view the controller don't connect (because you see nothing on the controller) In fact, it connect properly on Switch.

During investigation I found that your controller report an input size of 32 byte while it actually send 21bytes, I wondering if the issue is not there. Try this new version, in this version I force to open the controller with a size of 21 bytes. To be clear, this version will not work with your other controller (it should break the compatibility with others controller), it's just a workarround to see if your controller works or not.

sys-con-1.2.2+16-ATMOSPHERE-1.7.x.zip

MJr0019 commented 3 months ago

Hello friend,

Same problem again:

1- I connected the USB dongle to the "USB to USB Type-C connector".

2- It was not connected.

In this test, the controller also “DID NOT connect” because the lights on the top were blinking again, there was no solid LED.

I tested other controllers such as Xbox One and Y3 Arcade Fighter Stick.

(I know this build was for testing only the Y3 Joypad but unfortunately it didn't work, same result)

The Xbox One had an absurd delay.

but the Y3 Arcade Fighter Stick was normal

Here is the new log:

log.log

config.ini.txt

And sorry for all this work, I appreciate your patience

o0Zz commented 3 months ago

Ok 2 remaining tests ;)

This new library behave similarly than windows (By sending same commands in same order) - Meaning the switch should behave like your windows (thus the expectation is to get same result :P)

If it doesn't works, I have 1 more test to do.

Thanks. sys-con-1.2.2+19-ATMOSPHERE-1.7.x.zip

MJr0019 commented 3 months ago

Hello friend.

You did it.

It worked here.

Here are the images and logs:

A - Xbox One controller (Already supported)

1- I connected the usb cable to the "new usb to usb type c connector" and to the control.

2- The Control has been connected and supported.

IMG_0655

B - Y3 Arcade Fighter Stick (https://aliexpress.com/item/1005006369969745.html)

1- I connected the usb dongle to the "new usb to usb type c connector".

2- The two Controls were connected and supported individually.

IMG_0657

C- Y3 Joypad (Receiver without "empty" code OR GAME STICK 4K LITE SEGAM M8 V4.0) (https://aliexpress.com/item/1005002359869263.html)

1- I connected the usb dongle to the "new usb to usb type c connector".

2- The two Controls were connected and supported individually.

IMG_0656

Here is the new log:

log.log

config.ini.txt

I appreciate your effort and all the work. Soon I will pay you a KO-Fi for your help.

I wanted to ask you for another help.

I wanted to ask you for support for another Y3 controller, it has a similar structure, but it didn't work.

I thought because it was similar it would work, but it didn't.

Here it is ( Y3 Joypad (Receiver YC5) https://aliexpress.com/item/1005005458136372.html ):

IMG_0658

Question:

Should I open another issue for this or should we continue here?

To differentiate the versions, I went to the link:

https://github.com/o0Zz/sys-con/blob/master/doc/TestedControllers.md

I edited it to include the name of the Gamestick that the controller comes with and the model of the receiver

Here is the modified file (TestedControllers.md):

TestedControllers.md

The model that works, and that all tests were done is:

Y3 Joypad (Receiver without "empty" code OR GAME STICK 4K LITE SEGAM M8 V4.0)

I want support for this model:

Y3 Joypad (Receiver YC5)

I have already updated this information in the new file (TestedControllers.md) and with a link in global format, as the previous ones are in Portuguese format for example: pt.pt.aliexpress.com

(https://pt.aliexpress.com/item/1005005458136372.html?gatewayAdapt=glo2bra)

o0Zz commented 3 months ago

Good to see it works. Thank you for your update on TestedControllers.md. I will include it in the main branch. Regarding your new issue, yes please re-open a new ticket and attach the logs as usually ;)

Thanks