..:: 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.
(05-23-2014, 05:45 AM)shinra358 Wrote: [ -> ]Pulling this over from other thread because I put it there by accident (couple already answered):

Edit 3: found reproducable issue. whenever it goes into idle timeout on bluetooth and hide ds4 is checked, the service will always say connecting and will never connect until i uncheck (and/or recheck) hide ds4. Then it will work again. Any idea about this (J2K Version)? ~jheb said fix coming

Also, can you move the xmls back to the folder that the program is in? The consumers like to keep track or keep clean their machines and the appdata spot is a troublesome spot to keep going to. Gamers complain about that many times that companies keep putting save files all over their computers instead of in the actual game folder for pc games and that is one of the things Byuu is always criticized for in his emulators. Pretty pweeeease *bats eyes*.

Disconnecting the cord (when in plugged in mode) turns the light off completely (which is good). But pressing the stop service button, keeps the light on (which is not good).

@j2K: earlier you said that the rainbow charging is already there in your version. I clicked the battery level color but it's not happening. Do I have to click the rainbow or is the rainbow a permanent (the whole time) thing? When charging, it always says charged. It doesn't show the percent like when you're on bluetooth.

If the ds4 is fully charged there is no rainbow, only when it's charging does the rainbow show. The rainbow icon is an always on rainbow. It says charged because that's simply the state of the DS4, it's fully charged. Only when it's charging does it show the percent like so:
[Image: YTVSKnY.png]

However the reading of the battery is weird, as of right now, there's not way to get the real reading of the battery, it's an estimate of the voltage, so the percent might read a bit higher when it's charging, making it think it's fully charged.
Ok. On my end, I see (usb), Charged. And it's in rainbow mode. So it's charging but it says charged. It doesn't say Charging: % like your photo. (I'm set up on a non-admin account btw (extra virus protection from things) if that has anything to do with anything.

When I switch over to jheb version, it says battery is at 80%.

When I unplug to go over to bluetooth right after, rainbow lights start on the bluetooth mode (which is probably not supposed to happen right?). Looks like this part is related to the issue that I wrote in orange.


Rainbow part understood.
(05-23-2014, 06:23 AM)shinra358 Wrote: [ -> ]Ok. On my end, I see (usb), Charged. And it's in rainbow mode. So it's charging but it says charged. It doesn't say Charging: % like your photo. (I'm set up on a non-admin account btw (extra virus protection from things) if that has anything to do with anything.

When I switch over to jheb version, it says battery is at 80%.

When I unplug to go over to bluetooth right after, rainbow lights start on the bluetooth mode (which is probably not supposed to happen right?). Looks like this part is related to the issue that I wrote in orange.


Rainbow part understood.

Admin status shouldn't matter, The battery shouldn't read different things on our versions, unless jheb changed something, but the reading of the battery is weird and can't be helped (That's why I believe the ps4 just shows 0, 25, 50, 75, and 100%).

As for the bluetooth thing, is that on my verison or jheb's? and with what on?
I may make a vid tomorrow to show ya.
I think it's both because I also remember that being in the electrobrain's version too. But I commented on it when I saw it on yours.
(05-23-2014, 05:45 AM)shinra358 Wrote: [ -> ]Pulling this over from other thread because I put it there by accident (couple already answered):

Edit 3: found reproducable issue. whenever it goes into idle timeout on bluetooth and hide ds4 is checked, the service will always say connecting and will never connect until i uncheck (and/or recheck) hide ds4. Then it will work again. Any idea about this (J2K Version)? ~jheb said fix coming

Holy crap, seriously? There's a fix for this coming? I wonder if this would fix the connection issue that's identical to this, when I try to turn the controller on while the program is already running. It sounds like the Connecting... thing is identical to what happens to me.
Hi all,

could somebody help me out, I have some trouble to use my DS4 via bluetooth. Via USB everything is fine, there is just that weird stuff that the Controller is not really recognized as Xbox Controller when using bluetooth (see screenshots).
It´s not a DS Tool problem, probably something with windows, but maybe some of you got an idea?

Thank you

PS: The updater of v 7.41 is crashing when I start it. After that all Files are deleted and only Updater.exe remains (screen added)
(05-23-2014, 11:58 AM)pedrovay2003 Wrote: [ -> ]Holy crap, seriously? There's a fix for this coming? I wonder if this would fix the connection issue that's identical to this, when I try to turn the controller on while the program is already running. It sounds like the Connecting... thing is identical to what happens to me.

The fix i have is only (I think) for those having the issue where the program sits in a "Connecting..." state and wont actually accept any connections.

The issue is that bluetooth will always attempt to reconnect to lost devices (caused by range or power state change), but this always connecting causes kind of a feedback loop when the controller is completely off not allowing the application to make its own connection, so all I did was add a timeout to the allowed "reconnect" cycle and if it cannot reconnect it disconnects (frees up) the device to allow for a proper connection... Adding timeouts is typically a good thing in any application so weather or not this will fix issues that it was not intended to is possible but i'm not betting on it, people still have issues with their bluetooth stacks are likely to still have issues until (and if) SCP releases a new driver.

This fix will be included in my build still slated for this weekend but for those of you with forks (including j2k) here is the immediate fix:

-NOTE- For those implementing this fix please change your DS4Control library version number from 1.0.0.0 to 1.0.0.1 to signify this fix.

DS4Control.Control.cs, Add this method:
Code:
public static void TimeoutConnection(DS4Device d)
        {
            try
            {
                System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
                sw.Start();
                while (!d.IsAlive())
                {
                    if (sw.ElapsedMilliseconds < 1000)
                        System.Threading.Thread.SpinWait(500); //If weve been waiting less than 1 second let the thread keep its processing chunk
                    else
                        System.Threading.Thread.Sleep(500); //If weve been waiting more than 1 second give up some resources

                    if (sw.ElapsedMilliseconds > 5000) throw new TimeoutException(); //Weve waited long enough
                }
                sw.Reset();
            }
            catch (TimeoutException e)
            {
                d.DisconnectBT();
            }
        }

In the same file under the getDS4ControllerInfo() method change the following:
Code:
if (!d.IsAlive())
                    return "Connecting..."; // awaiting the first battery charge indication
To read:
Code:
if (!d.IsAlive())
                {
                    var TimeoutThread = new Thread(() => TimeoutConnection(d));
                    TimeoutThread.IsBackground = true;
                    TimeoutThread.Name = "TimeoutFor" + d.MacAddress.ToString();
                    TimeoutThread.Start();
                    return "Connecting...";
                }

As for the rainbow issue, not sure about this, my version does not change any lightbar code or settings nor can I reproduce. A vid would be helpful here.

-EDIT-
Those of you with keen eyes may have noticed that my method said if (sw.ElapsedMilliseconds > 1000) yet described it as if waiting less than 1 second, I had the incorrect comparison in there (">" instead of "<"), has been fixed to reflect.
(05-23-2014, 06:23 AM)shinra358 Wrote: [ -> ]Ok. On my end, I see (usb), Charged. And it's in rainbow mode. So it's charging but it says charged. It doesn't say Charging: % like your photo. (I'm set up on a non-admin account btw (extra virus protection from things) if that has anything to do with anything.

When I switch over to jheb version, it says battery is at 80%.

When I unplug to go over to bluetooth right after, rainbow lights start on the bluetooth mode (which is probably not supposed to happen right?). Looks like this part is related to the issue that I wrote in orange.


Rainbow part understood.

As for your earlier issue in orange, Just because you stop the service or close the program does not mean your controller is disconnected, The light bar will continue to remain active because it is still connected toy your computer as a BT controller, its just no longer mapped as a 360 controller. So as you described it this sounds like normal operation.
-EDIT-
What I can do however is have the application return the color to white to denote normal paired rather than remain the color as set by the application when the service is stopped or application is closed? I may do this anyway unless somebody can think of a reason this isnt a good idea.

As for the rainbow issue can you check to see if your lightbar is set to rainbow mode? see screenshot.
[Image: 05.23.2014-11.48.png]
"What I can do however is have the application return the color to white to denote normal paired rather than remain the color as set by the application when the service is stopped or application is closed? I may do this anyway unless somebody can think of a reason this isnt a good idea."

Sounds good. I'll make a vid today sometime to show what I mean by the other things.


Edit:

Sound level sucks. Didn't feel like redoing it. Phone video sucks so I couldnt show the controller at the same time. But I labeled it in the vid description so you can see what I was talking about at certain points:

[video=youtube]www.youtube.com/watch?v=iIy7t8hcKCw[/video]



0:24 = Charging, Status doesn't give percentage, Only says Charged

0:40 = Start with Windows column is hidden

1:24 = Pressing stop makes the light stay on whatever color was last used by the ds4 controller's lightbar. Should be the bluetooth pairing light color instead; not the connected light color.

3:03 = like the previous, going into bluetooth mode makes whatever the last color used be the current color. It's on bluetooth but the light is shifting through the rainbow colors.

3:31 = Idle timeout on bluetooth. Resuming from bluetooth with hide ds4 checked results in an endless connecting mode. Uncheck and rechecking makes the program read the controller again.


(very very light blue (or white) = bluetooth paired color)
(05-23-2014, 06:27 PM)shinra358 Wrote: [ -> ]"What I can do however is have the application return the color to white to denote normal paired rather than remain the color as set by the application when the service is stopped or application is closed? I may do this anyway unless somebody can think of a reason this isnt a good idea."

Sounds good. I'll make a vid today sometime to show what I mean by the other things.


Edit:

Sound level sucks. Didn't feel like redoing it. Phone video sucks so I couldnt show the controller at the same time. But I labeled it in the vid description so you can see what I was talking about at certain points:

[video=youtube]www.youtube.com/watch?v=iIy7t8hcKCw[/video]



0:24 = Charging, Status doesn't give percentage, Only says Charged

0:40 = Start with Windows column is hidden

1:24 = Pressing stop makes the light stay on whatever color was last used by the ds4 controller's lightbar. Should be the bluetooth pairing light color instead; not the connected light color.

3:03 = like the previous, going into bluetooth mode makes whatever the last color used be the current color. It's on bluetooth but the light is shifting through the rainbow colors.

3:31 = Idle timeout on bluetooth. Resuming from bluetooth with hide ds4 checked results in an endless connecting mode. Uncheck and rechecking makes the program read the controller again.


(very very light blue (or white) = bluetooth paired color)

Pretty mush everything you showcase in the video is normal operation, j2k is likely also correct in pointing out that the battery % differences between in use and plugging in are likely due to battery reported voltage under load and open, when a controller is no longer charging it will display as charged and not show a %. As for the Connecting... issue that is resolved and will be in our next builds. The GUI is a little 'hinky' which is something i've been working on if you see my previous screengrabs. The rainbow when unplugged is because thats what you have it set to do, you don't have it set to a solid color or to display battery level.