Open-PS2-Loader icon indicating copy to clipboard operation
Open-PS2-Loader copied to clipboard

[ISSUE] PADEMU with DS3 issues [PADEMU]

Open rickgaiser opened this issue 6 years ago • 34 comments

After pairing a DS3 controller the mac address of the BT dongle and the DS3 controller should match. Re-inserting the DS3 controller seems to give different mac addresses each time, but never the same as the BT dongle.

Pairing does work.

Here's a screenshot of the mac addresses after pressing the "Pair" button: vlcsnap-2017-12-03-16h29m19s982

rickgaiser avatar Dec 03 '17 15:12 rickgaiser

@rickgaiser Is this happening with original ds3? On which console model? This problem occurred with older commits but I fixed it in latest (looks like not totally). Commands for setting/reading mac address can't be issued with led-rumble cmd (needs some delay between?) so simple fix was to disable led-rumble cmd (which is called together with pad data request) before calling mac cmd. You can disable led-rumble cmd fully by commenting out line 203 in src/pad.c and see if that helps. From my test on console SCPH-50004 with latest OPL I have no problem at all (with original and fake ds3s). It only happens if ds3 was reconnected really fast.

belek666 avatar Dec 06 '17 09:12 belek666

I test with an original ds3 controller (CECHZC2E). I tested on SCPH-30004, 77004 and 90006. The problem is consistent on all models. I have compiled the latest OPL version.

I also tried the latest Beta release. It's r1027 (no git hash?!), so it does not have the latest ds34 additions. That version does show the mac address correctly, but has a slow gui response when using BT.

I also tried commenting out line 203 (ds34usb_set_rumble(pad->port, 0, 0)), but it has no effect.

rickgaiser avatar Dec 06 '17 18:12 rickgaiser

@rickgaiser Could you test this build: OPNPS2LD-0.9.3+.1008-Beta-c8205b0-dirty.ZIP

I have CECHZC2E ds3 also and only sometimes opl shows wrong mac address (when pairing and fast reconnecting). With fake one no problem at all.

belek666 avatar Dec 09 '17 12:12 belek666

I tried the build on an SCPH-90006, with 2 different ds3 controllers (CECHZC2E and CECHZC2U). The result is the same :-(.

rickgaiser avatar Dec 10 '17 16:12 rickgaiser

It's hard to guess what may be wrong. Have you tried to pair controller without bt dongle connected to ps2?

belek666 avatar Dec 12 '17 11:12 belek666

What kind of BT-Dongle do you have @rickgaiser? Do you have another BT-Dongle you can try it with?

TnA-Plastic avatar May 10 '18 14:05 TnA-Plastic

AFAIR the code hasn't been changed since then, but I thought I'd ask... Is this still happening?

If I remember correctly, this happened to me as well (in a similar fashion)! I had to press 'pair' a second time and when I pressed that OSD-Field again and again for a few times, it wouldn't change anymore and afterwards worked.

TnA-Plastic avatar Oct 06 '19 13:10 TnA-Plastic

AFAIR the code hasn't been changed since then, but I thought I'd ask... Is this still happening?

If I remember correctly, this happened to me as well (in a similar fashion)! I had to press 'pair' a second time and when I pressed that OSD-Field again and again for a few times, it wouldn't change anymore and afterwards worked.

I haven't worked on it for a long time but there is commit on my repo with minor changes. You could check it if issue still exist. It may be caused also by damaged cable or port.

belek666 avatar Oct 06 '19 16:10 belek666

Would you mind making a PR on the ifcaro-repo? ;)

TnA-Plastic avatar Oct 06 '19 16:10 TnA-Plastic

This PR might help, because I also have this problem: https://i.postimg.cc/02CkDr63/Pair-DS3.png

https://i.postimg.cc/Jz1h2jVM/Compatible-BT.png

Tested with SL-7410-TTBK & CECHZC1E on OPL 1386.

J013k avatar Oct 06 '19 19:10 J013k

Have not seen this issue last time I used and I forgot this issue was still open, so closing it.

rickgaiser avatar Jan 05 '21 07:01 rickgaiser

From what I remember there weren't any changes recently in\to PADEMU... Anyway a photo from v1.0.0-rc1: https://i.postimg.cc/FzRpWXS6/Pair-DS3.png

J013k avatar Jan 05 '21 09:01 J013k

I've tested this using v1.0.0-rc1 with 2x DS4 controllers and it worked fine. But then this issue must be somewhere in the details. I'll reopen this issue and make sure to test it with DS3 also.

rickgaiser avatar Jan 05 '21 09:01 rickgaiser

Sorry, I forgot to mention that I tried to pair DS3 with a bluetooth adaptor.

J013k avatar Jan 05 '21 09:01 J013k

Pressing pair twice seems to "fix" this issue, AFAIK.

TnA-Plastic avatar Jan 05 '21 10:01 TnA-Plastic

I tried it more than two (2) times and nothing seems to be fixed (at least with DS3).

J013k avatar Jan 05 '21 10:01 J013k

With DS4 I have no issues, but with DS3 I see more issues:

  • MAC address has too many '00' fields, this can't be a true MAC addresses.
  • Pairing fails, but no error message
  • After pairing the MAC is sometimes different

Something seems to go wrong in communicating with DS3 controllers via USB. The MAC seems almost random, as if the data is received wrong.

rickgaiser avatar Jan 05 '21 10:01 rickgaiser

After some testing there seems to be A LOT of issues in the communication to both DS3 and DS4 controllers. To see what I mean, add a debug line in the timeout function: https://github.com/ps2homebrew/Open-PS2-Loader/blob/1f2f266a054b4abce004264af6c782894c2c15a3/modules/ds34usb/iop/ds34usb.c#L464-L469

There's almost as much timeouts as there are messages. But the messages still arrive, and also do SignalSema(sema); so the locking and synchronisation of messages is completely out of sync. Both for DS3 and DS4.

So what happens when we request the BT address? The request is made, but then 1 or 2 "get_data" or "ledrum" replies (from previous requests) arrive, and we try to interpret is as a MAC address. Later when the MAC address is replied, we try to interpret is as button presses.

I've made local changes that fully fix the issue, and no longer need a timeout function at all. But the changes have to be made in 2 places (I've only tested with 1, used for the OPL GUI):

  • modules/ds34usb/iop/ds34usb.c
  • modules/pademu/ds34usb.c

And I know there's also a new modular PADEMU (here) in the works, so making changes here would later have to be merged (and is possibly difficult).

I'm not sure what the best approach to fixing this is, @belek666 what do you think?

rickgaiser avatar Jan 07 '21 08:01 rickgaiser

rickgaiser

I am struggling to get 2 DS3 controllers to pair. I have a good BT dongle, but for the life of me they always time out. How did you fix your issue and how would I go about doing the same? Also I am having the same issue where the MAC address seems almost random.. and changes anytime I push pair to what seems like a random address.

fmg3656 avatar Mar 25 '21 05:03 fmg3656

I was under the impression @belek666 was working on a modular PADEMU and I didn't want to make changes to the same code at the same time. But in the end I did, here: https://gitlab.com/ps2max/Open-PS2-Loader/-/commit/b9a7e7a8e2bc970c47a32de5ebf59121a0e7a638

It's in my main branch master-ps2max and I've used this many times. It works perfectly with all my controllers but has not been tested by others.

Perhaps if @belek666 is no longer working on a new version we can merge my changes?

rickgaiser avatar Mar 26 '21 07:03 rickgaiser

Rickgaiser,

Please forgive me...I'm great at soft modding using tools and directions, but I'm not a coding guy. I'd love to learn how to make your modifications usable. Right now my ds3 controllers just sync when they want to and always timeout. How do I go about integrating your code to make this functional?

fmg3656 avatar Mar 26 '21 12:03 fmg3656

@fmg3656 if you're not a developer then you'll just have to use DS2 controllers (or whatever works for you) untill this problem is fixed.

rickgaiser avatar Mar 26 '21 13:03 rickgaiser

Disappointing, but understandable. Wish I had the skills to do more. I appreciate you are at least working on a fix and I'll be eager to get hold of the working nightly if and when it is released.

fmg3656 avatar Mar 26 '21 13:03 fmg3656

@rickgaiser So i spent the day learning to compile OPL from scratch successfully. I was able to integrate your code in place of the files in the modules/ds34usb/iop/ds34usb.c and modules/ds34usb/iop/ds34usb.h. It compiled successfully and fixed the ability for the MAC addresses to match correctly, but it doesnt seem to have helped the controllers actually sync. any suggestions?

fmg3656 avatar Mar 26 '21 22:03 fmg3656

Congratulations on compiling OPL.

The github issue described in the first post is resolved by my changes. I understand it also resolves that specific issue for you (pairing and mac address now works, always). But then you seem to also have another issue.

Please describe your issue in more detail:

  • What BT dongle do you use?
  • What DS3 controller do you use? CECH??? Original or third-party?
  • When does the issue start? immediately after pairing? or after some time?
  • What is "just sync when they want to"? Randomly connect via BT when pressing the home button?
  • What is "always timeout"? Randomly disconnect? Light of controller turns off?

As for suggestions. I think you may have an incompatible BT dongle or controller. So the first thing to do would be to find out which one of the 2 is incompatible.

rickgaiser avatar Mar 29 '21 09:03 rickgaiser

@rickgaiser

So have a couple dongles that "say" they are compatible. One is a sabrent. And one is just a generic bt 4.0 that also says it's compatible in OPL

I only use real ds3 controllers. CECH2C2U and CECH2C2UB1. I have also tried some dualshock 4 with better success, but only because they tend to fail faster and are easier to reset. They still so not connect quickly or accurately.

The issue is immediate. When attempting to pair it is random if they connect at all. The controller will blink for over a minute sometimes and might connect...might not. Sometimes will connect immediately, but usually not at all, or someone's even after a minute. Very random.. sometimes ina a2 player game when trying to connect a second controller, both will turn off and then they will rarely reconnect.

I have tried this on several ps2s I have, with over 8 dualshock 3s and even with multiple bt adapters, all with the same results.

I compiled the newest nightly with your ds34usb modifications. I have also compiled jay jay with the same results.

fmg3656 avatar Mar 29 '21 12:03 fmg3656

Do you have a link to a known good bluetooth adapter? I'd be willing to buy one to see if I still have issues or not.

fmg3656 avatar Mar 31 '21 01:03 fmg3656

@rickgaiser

SmartSelect_20210401-145156_Amazon Shopping Ordered a slew of BT adapters from Amazon. Will try each next week and see if I have better results with any of these.

fmg3656 avatar Apr 01 '21 19:04 fmg3656

Theoretically a problem with matching mac address of the BT dongle and the DS3 controller has been fixed: https://i.postimg.cc/59znrvLW/DS3-OPL.png

Unfortunately once I am disconnecting DS3 from a PS2 console (by a USB cable), it does not seem to work. I mean it works when a USB cable is connected, but not through Bluetooth.

J013k avatar Aug 05 '21 12:08 J013k

@J013k can you try the latest build from this branch? https://github.com/rickgaiser/Open-PS2-Loader/tree/for-ps2h-pademu

I'll make the PR if it works for you.

rickgaiser avatar Aug 06 '21 14:08 rickgaiser