Ryochan7 / DS4Windows

Like those other ds4tools, but sexier
https://ryochan7.github.io/ds4windows-site/
GNU General Public License v3.0
6.98k stars 807 forks source link

DS4 gets automatically disconnected and reconnected via Bluethooth #705

Closed Kiru-Ufo closed 4 years ago

Kiru-Ufo commented 5 years ago

After a few minutes being connected with Bluetooth, the controller gets "disconnected", and 1-2 seconds later automatically reconnected. Then it won't happen anymore, so it's a one time thing per controller session. I've tried to mess around with settings, but I don't think anything should effect it anyway. Automatic disconnect is disabled, and that shouldn't immediately reconnect the controller afterwards anyway. It's not a bluetooth issue, as the controller remains connected to the PC during this time, how else would it immediately "reconnect" in DS4 Windows. There's no "red blinking" or anything either. The sounds of "(dis)connecting a device" is also playing, DS4Windows also writes it in its log. I... don't think it happened before the last update. I could be wrong though, as I don't have this controller that long yet. But I remember things working flawlessly at some point.

Currently I'm trying to simply have the program started a good while before I connect the controller, to see if there's simply something the program does after x minutes after starting. It's weird that it only happens once, and can then work for hours without issue.

-OS: Win 7 professional 64bit -Bluetooth: USB-BT400 from Asus (I can use the controller from anywhere in this place with that, so there are no connection issues or lags as long as the controller is connected) -DS4Windows is on the latest version. Based on the update folder, only 1.7.5 and 1.7.8 are in there, so if it worked before, then it was probably on 1.7.5. -Game I play doesn't affect it.

Ryochan7 commented 5 years ago

There is likely something happening outside of DS4Windows. The controller never disconnects from the PC but hotplug events are being generated by Windows anyway. I have only seen that type of situation when first connecting a BT controller. That is why there is the initial delay after a hotplug event before devices are checked. You might want to have Device Manager open and check what happens when it happens again.

Kiru-Ufo commented 5 years ago

It's going to be hard to test this, as it only takes 1-2 seconds for the controller to reconnect. Looking right at that moment at the device manager window isn't going to be easy, and it needs time to refresh as well. Might just be impossible.

That said, your post gave me an idea, and I tested something else. Normally I always started DS4Windows first, then connected the controller normally with BT. (hitting the PS button) So this time I first connected the controller and started DS4Windows a few seconds later. I just used the controller for an hour, and no disconnecting happened. Could still be just a random thing, but it could also explain, why I had no problems at some point.

As for the device manager: When I connect the Controller normally via BT without having DS4Windows started, there's no Windows jingle for a "connecting device" or anything, though the connection gets established. (Light of the Controller first blinks and then is at full force without blinking after a while signalizing that the connection is established) After disconnecting the controller from BT now, Windows still lists the controller under BT devices as "connected" though. Actually, while writing this it changed to "authenticated". I don't think anything in the device manager changes at all though. When starting DS4Windows with the connected Controller, a usb input device entry is added, which is basically the "x360" controller the system considers this as I guess. (I use the hide DS4 option)

mooms06 commented 5 years ago

I have the same issue since a few months, a fresh install of Windows last month didn't change anything.

The controller disconnect usually when I launch an emulator (Cemu) then reconnect itself after 2 or 3 seconds. DS4Windows is launched at start as a task.

Windows 7 x64 DS4v2 BT dongle is CSR 4.1 from eBay.

TotoLastro commented 5 years ago

I had the same issue (controller did not connect to my PC and if it did, i got lag of 50ms then disconnect 2 seconds after...). I have connected an antenna for my Wifi card (was included with my motherboard) and since this moment, it works perfectly ! I thought it was only boost the Wifi area... but the Bluetooth works MUCH better with it (only 2 meters from my PC to my controller and it does not work without this antenna...).

So, I think it is only a problem of reception

Kiru-Ufo commented 5 years ago

It's not a reception problem. It's a problem of order. When I connect the controller with Windows, wait two seconds and then start the program, everything works flawless. If I'd start the program first, it has this issue exactly once. Latency is never bad though.

Given that I figured this out, I didn't check it any further and it doesn't affect me much. If it's worth fixing I don't know.