Closed PizzaPino closed 2 weeks ago
Maybe this will fix it : BetterJoy.zip
If it still happens, set "DebugType" to "all" and upload the logs after it happens.
it didn't fix it
here's the log: https://pastebin.com/KE1skKME
For some reason you don't have the disconnected notification from hidapi after the power off...
Is the light on the home button off on your controller after the automatic disconnect ? Does the controller still appear as connected in the bluetooth panel of Windows ?
It's hard to fix without using a debugger. Do you have steps to reproduce the issue consistently since I haven't been able to reproduce it even once ? (I tried with a pro controller in bluetooth and autopower off enabled)
Now I just noticed that sometimes I can't even connect before the first time (at least since the version you gave me). The light is always off after the automatic disconnect and it still appears as connected in the bluetooth panel. I don't really have steps to reproduce it, it seems random to me.
Here I tried to connect the controller at 16:32.
2024-07-19 12:25:50 [DEBUG] BetterJoy v8.4.6
2024-07-19 12:25:50 [DEBUG] OS version: Microsoft Windows NT 10.0.22631.0 x64
2024-07-19 12:25:52 [INFO] HIDHide is enabled.
2024-07-19 12:25:52 [DEBUG] Task UDP receive started.
2024-07-19 12:25:52 [INFO] Motion server started on 127.0.0.1:26760.
2024-07-19 12:25:52 [INFO] All systems go.
2024-07-19 12:25:52 [DEBUG] Task devices notification started.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:25:52 [DEBUG] Notification Connected received.
2024-07-19 12:25:52 [DEBUG] Notification Connected handled.
2024-07-19 12:27:06 [DEBUG] Notification Connected received.
2024-07-19 12:27:06 [DEBUG] Notification Connected handled.
2024-07-19 12:27:09 [DEBUG] Notification Disconnected received.
2024-07-19 12:27:09 [DEBUG] Notification Disconnected handled.
2024-07-19 12:27:09 [DEBUG] Notification Connected received.
2024-07-19 12:27:09 [DEBUG] Notification Connected handled.
2024-07-19 14:21:10 [DEBUG] Notification Disconnected received.
2024-07-19 14:21:10 [DEBUG] Notification Disconnected handled.
2024-07-19 14:25:17 [DEBUG] Notification Connected received.
2024-07-19 14:25:17 [DEBUG] Notification Connected handled.
2024-07-19 14:25:19 [DEBUG] Notification Disconnected received.
2024-07-19 14:25:19 [DEBUG] Notification Disconnected handled.
2024-07-19 14:25:19 [DEBUG] Notification Connected received.
2024-07-19 14:25:19 [DEBUG] Notification Connected handled.
2024-07-19 14:52:22 [DEBUG] Notification Disconnected received.
2024-07-19 14:52:22 [DEBUG] Notification Disconnected handled.
2024-07-19 15:02:27 [DEBUG] Notification Connected received.
2024-07-19 15:02:27 [DEBUG] Notification Connected handled.
2024-07-19 15:02:30 [DEBUG] Notification Disconnected received.
2024-07-19 15:02:30 [DEBUG] Notification Disconnected handled.
2024-07-19 15:02:30 [DEBUG] Notification Connected received.
2024-07-19 15:02:30 [DEBUG] Notification Connected handled.
2024-07-19 15:13:01 [DEBUG] Notification Disconnected received.
2024-07-19 15:13:01 [DEBUG] Notification Disconnected handled.
2024-07-19 15:15:23 [DEBUG] Notification Connected received.
2024-07-19 15:15:23 [DEBUG] Notification Connected handled.
2024-07-19 15:15:24 [DEBUG] Notification Disconnected received.
2024-07-19 15:15:24 [DEBUG] Notification Disconnected handled.
2024-07-19 15:15:24 [DEBUG] Notification Connected received.
2024-07-19 15:15:24 [DEBUG] Notification Connected handled.
2024-07-19 15:30:56 [DEBUG] Notification Disconnected received.
2024-07-19 15:30:56 [DEBUG] Notification Disconnected handled.
2024-07-19 16:32:48 [INFO] Closing...
I believe I'm having the same issue; I'll describe my experience: When the inactivity timeout triggers, the controller is powered off (leds included) but it does not disconnect from Windows. This happens every single time for me. When I turn it on, it reconnects to the PC but it is unable to communicate with it. I have then to turn the controller off manually, which Windows recognizes unlike the automatic power off, and then turn it on again for the PC <> controller communication to resume.
These are my logs:
I found a bug in hidapi which could cause this (I still can't reproduce on my end). Try this build @PizzaPino @jesuscc1993 and make sure to replace the x64 and x86 folders which contain hidapi.dll : BetterJoy.zip
I stopped the app, replaced all files and tried again. It didn't work the first time, so I tried a second one and the result is the same. There is no visible difference in behavior and the issue remains.
This new build didn't fix it for me either.
Also I think the stuck at closing is a separate issue because I just got it without evening connecting a controller.
I've made many changes to power off/disconnect and some fixes, hope it helps : BetterJoy.zip
@jesuscc1993 If you still have issues, make a separate one as it's probably not related. The above changes could help both cases thought.
The new build fixes half of the issue. It does properly disconnect on timeout, every time. However, the next time I power off the controller it connects but it doesn't show on Betterjoy nor Windows. If I turn it off and on again, then both pick it up again. I'll attach logs in a sec.
Edit: here are the logs:
There are no new logs when I turn the controller on again for the first time. When I turn it off and on again, this logs:
Please make a separate issue as it's not related. Also it looks like the issue #18
Edit : Nvm it's a different issue the #18
Well for me it seems to have fixed the issue!
Describe the bug Sometimes when my controller is automatically disconnected, the change isn't displayed in Betterjoy. Betterjoy still shows the controller as connected and ready even though it is off. Further I can't connect the controller anymore. Also pressing X leaves me forever at "Closing...". Only ending Betterjoy through the task manager fully disconnects the controller and lets me connect to it again.
Controller (please complete the following information):
Connection: BT
Logs