NiyaShy / XB1ControllerBatteryIndicator

A tray application that shows a battery indicator for an Xbox-ish controller and gives a notification when the battery level drops to (almost) empty.
GNU General Public License v2.0
722 stars 52 forks source link

Xbox Series X controllers detect no or incorrect batterie levels when connected via BT #49

Open javsp opened 3 years ago

javsp commented 3 years ago

It detects the controller (I use bluetooth) but it won't show the battery level.

NiyaShy commented 3 years ago

Hey, so far I got neither positive nor negative feedback for the Series X controllers, but unless MS radically changed something on the protocol/API (which is rather unlikely) they should work. Have you tried if they properly work with (older) XB-controller enabled games? That would be a good indicator that they still use the same API. Another test would be if Steam big picture mode can detect a battery level. And we still have the "issue" that it sometimes takes several minutes until a battery level is detected. But that usually clears itself once you actually use the controller and press a few buttons.

javsp commented 3 years ago

The controller works in all games (just like the old XB1 controller). The app detects the controller but it's waiting for data. It shows that message no matter if I wait several minutes and I press some buttons. BTW, I'm using the official Play & Charge Kit instead of the 2 batteries (I don't know if it matters). I obviously don't use the cable (the new USB-C cable) until I need to charge the kit. I can see the current battery level in my bluetooth devices list but I'd like to see this info in the taskbar.

And yes, Steam also shows the warning battery icon but it’s not very useful.

NiyaShy commented 3 years ago

K, thanks for the info. Since it works everywhere there should be no API changes. And when Steam can show the battery level, polling it should also work in general. P&C kit or batteries doesn't matter. And the fact that it's connected via BT should also not matter since I got reports that the XBOne-S controllers worked fine via dongle and BT.

So, the thing is: until someone else who also uses the XBOne-X controller on windows via BT reports back if it works for them, I can't say if it's a general issue with those controllers or just a problem on your side...

javsp commented 3 years ago

Ok, let's wait for more reports. One thing I want to highlight is the fact that I had to update W10 recently. W10 didn't correcly detect this controller in previous versions. My current OS version is: W10 Pro x64 20H2 (19042.630). I think iit's the latest one.

Also, regarding Steam, I have to use the beta version which recently added support to this new XBOX controller via wireless (it's still recognized as an XB1 controller but it works well). So I guess something must have changed.

tandrasi commented 3 years ago

@javsp I can confirm that this is happening to me too. The app constantly waits for data but when plugged in, the app says battery is at 100% (which it is not). The Bluetooth panel jumps between 80%-90% charged (I've been plugging in and out a few times for testing and have left it to charge for 1 hour). Even Microsoft's own "Gamebar" (Win Key + G) reports erroneous information as it might be using the old API too:

image

javsp commented 3 years ago

@tandrasi Yeah, Microsoft's Gamrbar also reports the same thing to me. In fact, I have no way to check the battery level on W10. I think the guide button light is orange while charging on console and turns white when it's fully charged but I don't have the console, :(

tandrasi commented 3 years ago

@javsp yup, really sucks. I too don't have the console, just the new controller and no reliable way of checking battery in W10. Sigh

NiyaShy commented 3 years ago

Thanks for reporting back tandrasi, since it affects at least you 2 it's (for now) safe to assume that it is in fact a general issue. Flagged as bug for now until I find out more. Like I said before, since I can't try it myself (still using "classic" XBOne controllers) it'll be a shot into the dark until I find more info about if there were any changes that can cause this.

tandrasi commented 3 years ago

Thanks @NiyaShy!

javsp commented 3 years ago

Thanks.

I guess Microsoft has also changed something in the protocol with this new controller and that's why it's not correctly reporting the remaining battery level. First, they need to fix that and then (maybe) the 3rd party software will work fine again.

MorbidEden commented 3 years ago

I have this issue as well with the new controller via BT. I don't know if this will help, but when looking at the properties in Windows ( Pro x64 20H2 19042.630) under "Device Information" compared to the old XBOne controller, the new "Model" is "Bluetooth LE Device" with a 12 digit hex number. Not sure if the hex number is device specific.

LukeHx3 commented 3 years ago

Hello, I am having the same problem here, it seems to work fine when connected with the dongle (controller detected and battery level reported) but it only detects the controller when connected with BT and never shows the battery level. It works fine in game in both cases and the battery level is reported in the BT parameters. However the BT menu says it is full when the Windows game bar says it's almost empty (same in Steam). One last thing, I got an update of the controller firmware today, before that it wasn't even detected when connected in BT (also in the XBox Accessories app) and steam saw the controller as generic. It seems to me that there might be some things not working properly when connected in BT

NiyaShy commented 3 years ago

Thanks for the feedback and for the info that it only affects BT and not the XB dongle. I'm already trying out one possible option for tackling this, but that can take a while.

For context if anyone is interested: the component/plugin that is currently used for addressing the XInput API (SharpDX) was discontinued over a year ago. So if there were any changes/updates on the API, they won't get integrated there. I already found an alternative (Vortice.Windows), but using it will require some major changes on the code base. So far the program was based on .NET framework 4.5.2 (or higher), but Microsoft also more or less discontinued it a while ago and wants to migrate to the new variant .NET core which is cross-platform compatible (aka, it can be used on systems that don't run Windows).

tl;dr: I'm experimenting with migrating the program to .NET core, when that works I can switch to Vortice.Windows which should include possible updates to the XInput API which might help with the problem.

As I said, it's a blind shot and not guaranteed to have any effect, but it's worth a try.

Friday-The13-rus commented 3 years ago

I tested BT connection with XBox One controller and battery level displays correctly.

Basically, xinput api does not changing so often. Currently it has 3 versions and no new version released for Series X controller. SharpDX and Vortice use the same dlls and methods. From my point of view, this issue can be fixed by updating controller firmware (when it will be available).

javsp commented 3 years ago

What it surprises me is that the DS4 controller, for example, has a very good wireless support over bluetooth. Of course you need a 3rd party software (basically a XInput controller emulator) to benefit from all these features. On the other hand, it seems this new XBOX controller was designed for the new console in mind and the only reason why it works on W10 is because it has native XInput support (just like the old XBOX controllers). But this support is far from perfect (specially via BT). I hope Microsoft releases a new firmware to improve the compatibility of this controller on W10.

Also, @NiyaShy thanks for the info. I'm following this thread to get informed about this issue.

cannockwolf commented 3 years ago

I have the same issues with the new controller, game bar and this app, but interestingly in the 'bluetooth and other devices' window the battery is shown correctly

tandrasi commented 3 years ago

I have the same issues with the new controller, game bar and this app, but interestingly in the 'bluetooth and other devices' window the battery is shown correctly

@cannockwolf while the 'bluetooth and other devices' windows does show the battery, it is highly inaccurate. From my testing, it seems there is a 10% variance (margin of error) in its reporting (regardless of device). So as it stands, there is no accurate way of getting the battery level :(.

cannockwolf commented 3 years ago

I have the same issues with the new controller, game bar and this app, but interestingly in the 'bluetooth and other devices' window the battery is shown correctly

@cannockwolf while the 'bluetooth and other devices' windows does show the battery, it is highly inaccurate. From my testing, it seems there is a 10% variance (margin of error) in its reporting (regardless of device). So as it stands, there is no accurate way of getting the battery level :(.

Damn 😞

Yousof-N commented 3 years ago

Same issue here with Xbox Series X controller. Hope it gets fixed soon. The battery values reported in Xbox game bar and steam are highly inaccurate indeed.

cannockwolf commented 3 years ago

I bought the xbox wireless adapter, had to manually update the drivers though to get it to work πŸ™„ and connectivity had been 100% rock solid with no issues

the battery level with your app seems to look right too, although I have no way of checking it 100% but it's perfect for me to know when to swap out the rechargeables so I'm a happy bunny now

javsp commented 3 years ago

Would it be possible to add an option to get this value and show it on taskbar? It's not very accurate but at least you would know it's time to charge/replace the battery when that value is (let's say) < 20%. It would be even more great if it shows some kind of warning each time this happens.

NiyaShy commented 3 years ago

Possible: probably. But since Bluetooth connections are a completely different subsystem... The current polling via XInput doesn't care how the controller is connected as long as it registers itself as a controller towards the system. It really just looks for XInput-compatible controllers and asks them to report their battery level (which is determined by the controller itself).

Getting the value from your screenshot on the other hand would require to specifically look for bluetooth controllers and asking them about their battery level via whichever API is used for that.

peterek1983 commented 3 years ago

Battery level work fine with Xbox Series X controller when you will connect it via Microsoft Wireless Adapter. On Bluetooth connection doesn't work, same happen on Windows Xbox Bar battery level.

Wireless Adapter is best option way batter than Bluetooth because controller connect way faster instant, also it can send audio to controller, I heard that also is lower input lag.

But I noticed bug in XB1ControllerBatteryStatus, maybe it's not a bug but problem, when I use program reWASD with Virtual controller mapping then XB1ControllerBatterystatus shows wired connection instead of battery level. Would be nice if you can fix if possible. What do reWASD when use Virtual Controller Xbox 360 on Xbox One joypad, it hide real controller in system, and replace it for this Virtual X360 controller.

javsp commented 3 years ago

Battery level work fine with Xbox Series X controller when you will connect it via Microsoft Wireless Adapter. On Bluetooth connection doesn't work, same happen on Windows Xbox Bar battery level.

There are 2 problems with the Microsoft Wireless Adapter:

1- The most important one. Microsoft stopped selling this product some years ago. It's really hard to find it (al least the official one). If they had the intention that PC players used this controller via bluetooth, damn, make it fully compatible.

2- That adapter is a monolith compared to any current BT dongle.

peterek1983 commented 3 years ago

No, new small adapter is available. It's even sell with new Xbox Series X controller as pack. Check Microsoft Store.

New adapter is small, compare to typical small USB pendrive, of course much bigger thant Bluetooth nano adapters.

Bluetooth connection is much worse, I tested Series X connection with USB Dongle Asus BT-400, and neweset BT-500 Bluetooth 5.0 adapter and this controller connect very long until establish connection 4-9 flashes on controller. On Wireless adapter always connect instantly with one flash. Also I connect my headeset directly to controller and have sound. Also on Bluetooth I had random disconnects on this new Series X controller, that's why I move to Wireless Adapter and was worth. I don't even think back to Bluetooth connection with my PC.

javsp commented 3 years ago

I didn't know Microsoft released a new Wireless Adapter with this new controller. Unfortunately it's out of stock on the Microsoft Store (at least in my country).

I'm not experiencing any of those disconnections, the controller connects in about 5-6 secs (I can deal with it) and I don't connect any headset to the controller but the impossibility to precisely check the battery level with every app it's annoying. I will be aware of the restock of this new Adapter.

peterek1983 commented 3 years ago

They released new small Wireless Adapter some time ago previously not with this new series x controllers.

blackhorse088 commented 3 years ago

On my experience. Since OP said the new controller shows battery in bluetooth setting and percentage, probably it's using different protocols than the previous XBox one S controller, the S controller is not able to show these value, and most likely system is using the same S controller driver, that's probably why the battery reading is wrong.

Might be worth mention. MS is using different driver for the controller when wired connected and when using BT? Xbox accessories was not able to see my controller unless wired, now it did firmware update and it's able to see, test and configure it wirelessly, still doesn't show battery level for me. I can't view battery even on Gamebar, unlike others. Not sure why.

All controller features can be used via bluetooth connection, but Microsoft is poorly putting any efforts on it or even fixing bugs. They are promoting and recommending their adapters instead, I don't believe they are interested investing on PC gaming rather than their console.

As you can see here, the promise to fix controller for W10 from 2018... Image2

So let's keep waiting till the next Xbox generation.. xD Just my guessing.

mati865 commented 3 years ago

@blackhorse088 battery indicator works through Bluetooth with Xbox One controller, it's just issue with Xbox Series controller.

blackhorse088 commented 3 years ago

@blackhorse088 battery indicator works through Bluetooth with Xbox One controller, it's just issue with Xbox Series controller.

That's what I meant, the new Series X is probably using different BT protocols than S and the older ones.

javsp commented 3 years ago

I ordered the new XBOX Wireless Adapter (2nd generation) in AliExpress. I was unable to find that damn thing (separately) in any other shop. I'll tell you if everything works well when it arrives (in about 2 weeks).

blackhorse088 commented 3 years ago

There are bunch of these Chinese adapters on Ebay for around 20$ with similar design to Microsoft dongle. Reviews says they work as good.

javsp commented 3 years ago

Almost every single XBOX Wireless Adapter on eBay comes from China and they are a little bit more expensive than the ones on AliExpress. I payed 11€ for it (I applied a 4€ discount coupon).

peterek1983 commented 3 years ago

I can also confirm, on Microsoft wireless adapter new Series X controller work perfect, 0 random disconnects, show battery level correctly, audio also work through jack output, also connects super fast compare to Bluetooth. So I will not back to Bluetooth even when they fix disconnects problems and battery level on BT connection.

javsp commented 3 years ago

I received the wireless adapter today. It works perfect on every app (this one as well). End of story.

peterek1983 commented 3 years ago

Nice to hear, good choice, same with my, work perfect since two months.

blackhorse088 commented 3 years ago

Blame Mircosoft for their poor to no work at all on their BT driver support. I guess it's part of their marketing for the adapter. But I decided, the next controller for me is going to be PS series, mainly not to support Microsoft anymore.

outlawjake08 commented 3 years ago

That's a Series X/S controller right? I think I have the same issue. Pretty sure its related to the same problem many people had just getting these controllers to work on Windows 10 via BT.

For moment we're just going to have to leave it and hope they fix it with a Windows update. I don't use my Series X controller much on PC as I've got two other Xbox One controllers. 0ed43813-cba3-48dd-bbfa-61c35940a14b

NiyaShy commented 3 years ago

Thanks for all the feedback folks, really seems like MS did a bad job on the BT implementation and that causes the issues...

I'll leave this open so others can easily find it and report back once MS maybe improves the situation.

outlawjake08 commented 3 years ago

Just tried with the two AA batteries included with the controller which I assume are brand new (they were sealed) and it still shows "HID compliant game controller: Critical" in the game bar app. Does this thing just not work and maybe the battery pack is fine? Is there really no way to see your controller's battery percentage in Windows? Please Xbox Series X/S Controller's Update 2021-11-08 (7) By Tekno Blast

MorbidEden commented 3 years ago

@outlawjake08 This program has nothing to do with Microsoft's Game Bar nor Microsoft itself.

teknoblast868 commented 3 years ago

Currently known issues/limitations:

Series X/S controllers connected via Bluetooth won't report any or a completely wrong battery level. This seems to be an issue with Microsofts BT implementation and I can't do anything about it. See Issue #49 for details. initial recognition of a newly connected controller can take a while. It will be displayed as "waiting for battery level data" at first but should switch to battery level after ~10 seconds and a button press. (This might be a limitation of the XInput API.) 2021-11-08 (7)

teknoblast868 commented 3 years ago

Xbox Series X controllers detect no or incorrect batterie levels when connected via BT 99745179-e1ad9a80-2b24-11eb-9f63-c0d6a0fd3906

NiyaShy commented 3 years ago

@teknoblast868 will you actually contribute to the issue/discussion for once and not just copy text and re-post pictures from other people please?

teknoblast868 commented 3 years ago

please controller xbox series update 114027615-3b1e2800-9880-11eb-992c-acd24afb3f99

teknoblast868 commented 3 years ago

Same issue here! I mean there is not even a charging indicator like a simple LED on their hardware. 100% blackbox in terms of anything battery related. BRAVO! 4178f108-bfc5-49a6-8a15-02d4f548bc97

Artstup commented 3 years ago

Hi. Through the "gamepad battery status" (application from the microsoft store), the charge of the xbox SX gamepad is displayed. Tested on the Xbox Play and Charge Kit and the batteries that came with the controller.

mati865 commented 3 years ago

@Artstup just tested and it does not work. Please do not spam this thread.

RenanZX commented 3 years ago

Is there a way to get the information of battery level in bluetooth devices and show it on this indicator software? Because windows bluetooth device apparently shows the correct battery level here:

image

NiyaShy commented 3 years ago

From all I've heard in this thread so far the battery level reported by any program when the controller is connected via BT is totally random/off, so unless Microsoft finally did something to fix that, no chance. I can only repeat what I probably already said earlier: xb1cbi only asks the controller about its battery level (via the XInput API), so anything that gets reported comes from the controller. There's nothing I can do to make the controller report correct values, only MS can.