..:: PCSX2 Forums ::..

Full Version: DS4Windows -- yet another DualShock 4 driver! (No longer under active development)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, I'm really grasping at straws here. This patch to Beta 6 should make it so that we don't ever try to perform a read operation and write operation on the HID device at the same time. Maybe it will make a difference?
Alright used that new patch to Beta 6. Results:

Code:
A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1256922Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1856923Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6037384Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6337384Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:17.4857683Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:17.5257683Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9557995Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9757995Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> disconnect due to write failure: 995
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.6158239Z> disconnect due to read failure: 1167
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.8958243Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:57.5658266Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0658567Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0858568Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Everything was going great, disconnecting the controller with PS+Options and stopping the server, until I decided to try to leave the server running after a disconnect and Bluetooth reconnect. That's when I got the errors and it acted exactly as it usually does. Just refuses to hook the controller into an XInput device from that moment on until I restart the machine.

Frustrating, but it's getting closer it feels. I did at least 3 or 4 disconnect, server stop, reconnect, server starts and it worked flawlessly for those 3 or 4. It was only when I tried hotplugging that it bugged out again.

And yes, it happens on USB as well if I disconnect the controller.
(04-16-2014, 02:42 AM)DaRkL3AD3R Wrote: [ -> ]Alright used that new patch to Beta 6. Results:

Code:
A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1256922Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1856923Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6037384Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6337384Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:17.4857683Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:17.5257683Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9557995Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9757995Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> disconnect due to write failure: 995
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.6158239Z> disconnect due to read failure: 1167
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.8958243Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:57.5658266Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh
A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0658567Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0858568Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Everything was going great, disconnecting the controller with PS+Options and stopping the server, until I decided to try to leave the server running after a disconnect and Bluetooth reconnect. That's when I got the errors and it acted exactly as it usually does. Just refuses to hook the controller into an XInput device from that moment on until I restart the machine.

Frustrating, but it's getting closer it feels. I did at least 3 or 4 disconnect, server stop, reconnect, server starts and it worked flawlessly for those 3 or 4. It was only when I tried hotplugging that it bugged out again.

And yes, it happens on USB as well if I disconnect the controller.

It's very frustrating trying to figure this one out! What do you mean "a disconnect and Bluetooth reconnect" -- what specific action disconnected it? What were you 'hotplugging'? Can you point out in the log you posted what steps you performed that it suddenly stopped working?
I'll try to label the code as clear as possible. Here we go:

Code:
I turn on the controller with DS4Windows closed. The controller LED lights up white and then I ran DS4Tool.exe from command prompt with > log.txt argument. That's where the log picks up immediately after on the next line of this code block:

A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1256922Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1856923Z> power subsystem octet: 0x02

At this point the controller is connected and working perfectly as an Xbox 360 Controller. All is well. Then I press PS+Options to disconnect the controller and this happens:

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Both controllers disappear from the Controller Panel, and I stop the DS4Windows server from running but I leave the application running. Next I connect the controller with my bluetooth adapter again so the LED goes white, and then I start the server again which is the next line of code:

A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6037384Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6337384Z> power subsystem octet: 0x02

Again, it's working perfectly as an Xbox 360 controller. As with the previous part, it disconnects perfectly with PS+Options and the controllers disappear from the controller panel.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Again, I stop the server and leave DS4Windows running. I then press the PS button to connect it to my bluetooth adapter again and re-start the DS4Windows server.

A4:15:66:7D:F6:1C 2014-04-16T00:38:17.4857683Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:17.5257683Z> power subsystem octet: 0x02

Same story. Xbox 360 controller shows up and it works perfectly. Press PS+Options to disconnect again.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Stop the server and then turn the controller on again, followed by starting the server.

A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9557995Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9757995Z> power subsystem octet: 0x02

Again, I press PS+Options and disconnect the controller.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

This time I LEAVE the server running and attempt to turn the controller on again, to do a Bluetooth hotplug. This is when the glitch happens.

A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> start

At this point, the server is running, it sees my controller and shows it's ID and battery life, but it never turns it into an Xbox 360 controller and the "Wireless Controller" in the panel does not respond to my inputs. I press PS+Options to disconnect it and this happens:

A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> disconnect due to write failure: 995
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.6158239Z> disconnect due to read failure: 1167
Close fs
Close sh

Now I stop the server and close DS4Windows. I turn my controller on and check the control panel, it appears as Wireless Controller and works perfectly. I open DS4Windows now.

A4:15:66:7D:F6:1C 2014-04-16T00:38:55.8958243Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:57.5658266Z> power subsystem octet: 0x02

Again, it shows my controller ID and remaining battery life, but it never shows up as an Xbox 360 controller. It's like this until I restart my PC or reset the SCP Device in the device manager. I do a PS+Options disconnect and stop the server.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

This block is the same as the last one, just doesn't work.

A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0658567Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0858568Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

I hope this is clear enough to read. It seemed like the best way to handle it as I was typing it out.
(04-16-2014, 03:41 AM)DaRkL3AD3R Wrote: [ -> ]I'll try to label the code as clear as possible. Here we go:

Code:
I turn on the controller with DS4Windows closed. The controller LED lights up white and then I ran DS4Tool.exe from command prompt with > log.txt argument. That's where the log picks up immediately after on the next line of this code block:

A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1256922Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:25.1856923Z> power subsystem octet: 0x02

At this point the controller is connected and working perfectly as an Xbox 360 Controller. All is well. Then I press PS+Options to disconnect the controller and this happens:

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Both controllers disappear from the Controller Panel, and I stop the DS4Windows server from running but I leave the application running. Next I connect the controller with my bluetooth adapter again so the LED goes white, and then I start the server again which is the next line of code:

A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6037384Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:37:56.6337384Z> power subsystem octet: 0x02

Again, it's working perfectly as an Xbox 360 controller. As with the previous part, it disconnects perfectly with PS+Options and the controllers disappear from the controller panel.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Again, I stop the server and leave DS4Windows running. I then press the PS button to connect it to my bluetooth adapter again and re-start the DS4Windows server.

A4:15:66:7D:F6:1C 2014-04-16T00:38:17.4857683Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:17.5257683Z> power subsystem octet: 0x02

Same story. Xbox 360 controller shows up and it works perfectly. Press PS+Options to disconnect again.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

Stop the server and then turn the controller on again, followed by starting the server.

A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9557995Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:38.9757995Z> power subsystem octet: 0x02

Again, I press PS+Options and disconnect the controller.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

This time I LEAVE the server running and attempt to turn the controller on again, to do a Bluetooth hotplug. This is when the glitch happens.

A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> start

At this point, the server is running, it sees my controller and shows it's ID and battery life, but it never turns it into an Xbox 360 controller and the "Wireless Controller" in the panel does not respond to my inputs. I press PS+Options to disconnect it and this happens:

A4:15:66:7D:F6:1C 2014-04-16T00:38:55.5658238Z> disconnect due to write failure: 995
A4:15:66:7D:F6:1C 2014-04-16T00:38:55.6158239Z> disconnect due to read failure: 1167
Close fs
Close sh

Now I stop the server and close DS4Windows. I turn my controller on and check the control panel, it appears as Wireless Controller and works perfectly. I open DS4Windows now.

A4:15:66:7D:F6:1C 2014-04-16T00:38:55.8958243Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:38:57.5658266Z> power subsystem octet: 0x02

Again, it shows my controller ID and remaining battery life, but it never shows up as an Xbox 360 controller. It's like this until I restart my PC or reset the SCP Device in the device manager. I do a PS+Options disconnect and stop the server.

Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

This block is the same as the last one, just doesn't work.

A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0658567Z> start
A4:15:66:7D:F6:1C 2014-04-16T00:39:19.0858568Z> power subsystem octet: 0x02
Trying to disonnect BT device
Disconnect successful: True
Close fs
Close sh

I hope this is clear enough to read. It seemed like the best way to handle it as I was typing it out.

So the Touchpad works at that point? What version of ScpVbus are you running? The latest version is available in Scarlet.Crush's thread and is newer than what InhexSTER packaged with DS4Tool.
Touchpad does indeed work when the Xbox 360 controller doesn't show up and the connection is broken. I'm running the latest version of Scarlet.Crush's server. Did not install the accompanied Bluetooth Driver for it.

This is mindboggling. I just tried the same procedure on a fresh boot as I did in my last log.txt block, and after the FIRST PS+Options disconnect I got the duplicate disconnect bug where it shows a disconnect, reconnect and disconnect again all within a split second, that causes it never to setup the controller as an XInput device.

So freaking confused man. I feel like we need a more thorough logging of what's happening here in order to pick this one up.
(04-15-2014, 08:09 PM)electrobrains Wrote: [ -> ]It sounds an awful lot like you're describing the "Hide DS4 Controller" feature that's there as a checkbox on the main window. If you check it, DS4Windows will attempt to acquire exclusive access of the DirectInput/HID device and thus lock out any other programs from also accessing it, so they can only access the Xinput.

That's actually exactly the feature I'm referring to, except I'm hoping for a short-cut to it rather than having to open up the software to toggle it each time. Something along the lines of the combination for toggling the touchpad, though obviously not the same combination (or perhaps a user-configurable one?).
Can I make a small request re: button mode (as it seems to be your preferred input system)?

Would you be willing to add a bit of code in there that says that if "left side" and "right side" touchpad presses are assigned to the same output, the whole touchpad will initiate them? The deadzone makes sense for different gestures but if both are left click it seems kind of silly to have a band in the middle that does absolutely nothing.

Also gonna throw in a +1 for letting the user customize which modes can be cycled through for touchpad mode, and another +1 for "have to hold the pad and button for 1 full second to switch modes", as rapidly cycling through modes is less important when we can limit touchpad modes to our desired selection and it will drastically cut down on accidental switching.

(04-16-2014, 05:10 AM)Thalyn Wrote: [ -> ]That's actually exactly the feature I'm referring to, except I'm hoping for a short-cut to it rather than having to open up the software to toggle it each time. Something along the lines of the combination for toggling the touchpad, though obviously not the same combination (or perhaps a user-configurable one?).

Unfortunately this wouldn't work as you think it would; this is because the circumstances for being able to hide the DS4 are specific, as many programs will snag all active controllers (Steam, for one). But more to the point, why ever NOT hide it? Until we get a version of DS4Windows that supports Gyro/Accel data there's nothing at all being sent by the DS4 that isn't just XInput data, all the buttons are the same (4 face, 2 shoulder, 2 shoulder triggers, 2 sticks, 2 stick clicks, a d-pad, back, start) so there's honestly no reason to NOT simply use "hide DS4" at all times.
I just tried the beta 6 patch, and I'm having the same issues as DaRkL3AD3R. It's really weird, too; I've tried everything I can think of to make it work, but the program just doesn't show the controller if the controller is turned on while the program is already running. I'm completely stumped.
(04-16-2014, 04:22 AM)DaRkL3AD3R Wrote: [ -> ]Touchpad does indeed work when the Xbox 360 controller doesn't show up and the connection is broken. I'm running the latest version of Scarlet.Crush's server. Did not install the accompanied Bluetooth Driver for it.

This is mindboggling. I just tried the same procedure on a fresh boot as I did in my last log.txt block, and after the FIRST PS+Options disconnect I got the duplicate disconnect bug where it shows a disconnect, reconnect and disconnect again all within a split second, that causes it never to setup the controller as an XInput device.

So freaking confused man. I feel like we need a more thorough logging of what's happening here in order to pick this one up.

Yeah, I'm going to have to make another build that adds yet more logging. Try seeing if upgrading ScpVbus does anything. You don't have to do anything with the Bluetooth drivers, just the Xinput Virtual Bus device. Still, though, it does not seem like that is the direct cause. There seems to be some hot-plugging race condition especially if you always avoid it by shutting down the controller before you're initiate the Bluetooth connection.