New issue
Advanced search Search tips

Issue 705506 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Mac
Pri: 1
Type: Bug-Regression


Show other hotlists

Hotlists containing this issue:
Gamepad


Sign in to add a comment

Regression: Xbox One S Controllers mapping broken for old firmware

Reported by jesssto...@fastmail.com, Mar 27 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8

Steps to reproduce the problem:
1. have an Xbox One S Controller with the original firmware
2. attempt to use it via Bluetooth with the JS gamepad api

What is the expected behavior?
The controller should have a usable mapping

What went wrong?
The controller mapping for this firmware was removed in 5f47e3fc8435f1f90d88133522067b7669251c2a, and thus the controller cannot be used properly.

Did this work before? Yes 54

Chrome version: 57.0.2987.110 (Official Build) (64-bit)  Channel: stable
OS Version: OS X 10.12.3
Flash Version: 

The controller can only be updated via a Windows computer or via an Xbox One. Additionally, as supporting the newer firmware requires other applications to update their support explicitly, updating is for the most part not desirable, as it breaks the mapping in programs which have not included support.

Given these conditions, it seems to me it’d be better to retain both mappings until either Microsoft allow updating the firmware on other platforms, or support for the updated firmware lands in more programs.
 
Code review related to this issue is at https://codereview.chromium.org/2494823005. Therein the removal of the older mapping was proposed.

Additionally, given the advertised device ID differs between the two versions (02e0 for the old firmware, 02fd for the new ones) keeping support would not require additional detection code, merely restoring the mapping.
Components: Blink>GamepadAPI
Labels: OS-Linux
I'm assuming this affects only Mac and Linux due to the comment on the attached code review description.
Correct! Sorry for not including that context. Windows platforms provide drivers which normalise it to the standard Xinput mapping in both firmware versions.
Labels: TE-NeedsTriageHelp
Labels: -Pri-2 -TE-NeedsTriageHelp Pri-1
Status: Available (was: Unconfirmed)
Summary: Regression: Xbox One S Controllers mapping broken for old firmware (was: Xbox One S Controllers with old firmware now broken)
It does appear that we can restore the mapping for the old device ID. 
Owner: mattreynolds@chromium.org
Status: Started (was: Available)
I have a CL to restore the old mapping, just waiting on hardware to test with.

I've ordered an "Xbox Wireless Controller" (this is how the new Xbox One S controller is branded), hopefully they still ship with the original firmware and product ID.
I have access to a controller on each version of the firmware if I can be of help verifying your patch! I don't have a good build environment set up, however.
jessstokes@: Thanks for the offer! My gamepad came in today and fortunately it's still on the old FW so I think we're set.

Tested on OSX with Chrome 56.0.2924.87 (Official Build) (64-bit) with an old-firmware gamepad (hardware ID is 045e 02e0) connected over Bluetooth. The gamepad was detected by Chrome and used this mapping (reported as [none]):

Button 0: A
Button 1: B
Button 2: X
Button 3: Y
Button 4: LB
Button 5: RB
Button 6: View
Button 7: Menu
Button 8: LS
Button 9: RS

Axis 0: LS X, -1.0 to 1.0 (left to right)
Axis 1: LS Y, -1.0 to 1.0 (up to down)
Axis 2: LT, -1.0 to 1.0 (unpressed to pressed)
Axis 3: RS X, -1.0 to 1.0 (left to right)
Axis 4: RS Y, -1.0 to 1.0 (up to down)
Axis 5: RT, -1.0 to 1.0 (unpressed to pressed)
Axis 6: unused
Axis 7: unused
Axis 8: unused
Axis 9: D-pad inputs are mapped to distinct values

This mapping doesn't follow the recommended ordering for buttons or axes. Some buttons are incorrectly mapped as axes (D-pad, LT, RT). The Xbox button is missing. The trigger values should range from 0.0 to 1.0. The sticks are extremely sensitive with no deadzone.

 Issue 710581  has been merged into this issue.
Tested again using USB (same Chrome, same gamepad). Hardware ID is 045e 02ea, the mapping is reported as "standard". The analog sticks aren't centered (probably due to lack of deadzone) but I didn't observe any mapping issues.
Tested on Linux with Chrome 57.0.2987.133 (Official Build) (64-bit)

Before I could connect the gamepad over Bluetooth, I needed to run the following command as root to disable Enhanced Retransmission Mode.

echo 1 > /sys/module/bluetooth/parameters/disable_ertm

The gamepad (hardware ID 045e 02e0) was detected by Chrome with mapping [none].

Button 0: A
Button 1: B
Button 2: X
Button 3: Y
Button 4: LB
Button 5: RB
Button 6: View
Button 7: Menu
Button 8: RS
Button 9: LS

Axis 0: LS X, -1.0 to 1.0 (left to right)
Axis 1: LS Y, -1.0 to 1.0 (up to down)
Axis 2: LT, -1.0 to 1.0 (unpressed to pressed)
Axis 3: RS X, -1.0 to 1.0 (left to right)
Axis 4: RS Y, -1.0 to 1.0 (up to down)
Axis 5: RT, -1.0 to 1.0 (unpressed to pressed)
Axis 6: D-pad X, -1.0 for left, 1.0 for right, 0 for no input
Axis 7: D-pad Y, -1.0 for up, 1.0 for down, 0 for no input

I see similar issues as on OSX, except there does seem to be a deadzone applied on Linux so the sticks correctly report themselves as centered.
Labels: Needs-Feedback
I upgraded an Xbox One S gamepad to the latest available firmware version using the Win10 Xbox Accessories app, and it now reports its FW version as 3.1.1221.0. However, the USB IDs are still 045e 02e0 and it exposes the same mapping as before.

jessstokes@, can you check the FW versions of your gamepads?
Labels: -Needs-Feedback OS-Android
I have a fix for this (and for Linux and Android) that restores the mappings for the old FW while retaining the new mapping.

I finally got the gamepads to report different device IDs for the different FW revisions. It seems that they only have this behavior on some platforms, for instance on Linux I always see both as 045e 02e0. On OSX they normally report different IDs, but  I once saw them both report 045e 02e0 just after I had disconnected them from a Windows PC. Here's the output from System Report showing both devices with the same product ID:

Devices (Paired, Configured, etc.):
  Xbox Wireless Controller:
    Address:	C8-3F-26-3B-E4-ED
    Major Type:	Peripheral
    Minor Type:	Peripheral
    Services:	Xbox Bluetooth Gamepad
    Paired:	Yes
    Configured:	Yes
    Connected:	Yes
    Manufacturer:	Unknown (0x8, 0x00)
    Firmware Version:	0x0903
    Vendor ID:	0x045E
    Product ID:	0x02E0
    Class of Device:	0x05 0x02 0x0508
    AFH:	On
    AFH Map:	F8FEFFFDFFFFFF3FA07F
    RSSI:	-69
    Role:	Master
    Connection Mode:	Sniff Mode
    Interval:	7.5 ms
    Host Connectable:	Yes
    EDR Supported:	Yes
    eSCO Supported:	Yes
    SSP Supported:	Yes
  Xbox Wireless Controller:
    Address:	C8-3F-26-32-B5-1E
    Major Type:	Peripheral
    Minor Type:	Peripheral
    Services:	Xbox Bluetooth Gamepad
    Paired:	Yes
    Configured:	Yes
    Connected:	Yes
    Manufacturer:	Unknown (0x8, 0x00)
    Firmware Version:	0x0903
    Vendor ID:	0x045E
    Product ID:	0x02E0
    Class of Device:	0x05 0x02 0x0508
    AFH:	On
    AFH Map:	F8FEFFFDFFFFFF3FA07F
    RSSI:	-59
    Role:	Master
    Connection Mode:	Sniff Mode
    Interval:	7.5 ms
    Host Connectable:	Yes
    EDR Supported:	Yes
    eSCO Supported:	Yes
    SSP Supported:	Yes

I tried disconnecting and reconnecting to the new FW gamepad to see if I could reproduce this but was unable, afterward it always reported the new product ID. Strange!
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0901a39d9de30d0a98d483a79b7963cbcf1cfd90

commit 0901a39d9de30d0a98d483a79b7963cbcf1cfd90
Author: mattreynolds <mattreynolds@chromium.org>
Date: Fri Jul 28 20:55:41 2017

Restore mappings for older Xbox One S Bluetooth gamepads on OSX/Linux

Microsoft released a firmware update for Xbox One S gamepads that changed
the button and axis assignments when connected over Bluetooth, requiring a
new mapping in Chrome. In a previous CL, the mappings for the old firmware
were removed under the assumption that soon all gamepads would use the new
firmware mappings. However, this was incorrect as the new mappings are not
exposed on all platforms. Furthermore, Xbox One S gamepads are still
shipping with the old FW and users may not have the means to update.

On OSX, gamepads with the old FW use device ID 045e:02e0 while those with
the new FW use 045e:02fd. This CL re-adds the mapping for the old FW that
was previously replaced. The new mapping will still be applied to gamepads
with the new FW.

On Linux, gamepads with either FW use device ID 045e:02e0 and need the old
mapping which was previously replaced. This CL re-adds the mapping for the
old FW. The new FW mapping is retained for now, but may be removed in the
future as it should now be unused.

On Windows, Xbox One S gamepads are handled by the OS and are exposed to
Chrome as Xbox 360 compatible gamepads. No extra work is required to
support the old FW.

On Android, the default mapping is correct for the new FW but a custom
mapping is required to support the old FW. This will be addressed in a
future CL.

BUG= 705506 

Review-Url: https://codereview.chromium.org/2798933004
Cr-Commit-Position: refs/heads/master@{#490505}

[modify] https://crrev.com/0901a39d9de30d0a98d483a79b7963cbcf1cfd90/device/gamepad/gamepad_standard_mappings_linux.cc
[modify] https://crrev.com/0901a39d9de30d0a98d483a79b7963cbcf1cfd90/device/gamepad/gamepad_standard_mappings_mac.mm

Project Member

Comment 15 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4196f898978a551e070a9274af7a26728db2f959

commit 4196f898978a551e070a9274af7a26728db2f959
Author: Matt Reynolds <mattreynolds@google.com>
Date: Fri Jul 28 23:24:37 2017

Restore mappings for older Xbox One S Bluetooth gamepads on Android

Microsoft released a firmware update for Xbox One S gamepads that changed
the button and axis assignments when connected over Bluetooth, requiring a
new mapping in Chrome. In a previous CL, the mappings for the old firmware
were removed under the assumption that soon all gamepads would use the new
firmware mappings. However, this was incorrect as the new mappings are not
exposed on all platforms. Furthermore, Xbox One S gamepads are still
shipping with the old FW and users may not have the means to update.

On Android, the default mapping is correct for the new FW but a custom
mapping is required to support the old FW. This CL restores the mapping
for devices with the old FW and uses the default mapping for devices with
the new FW.

BUG= 705506 

Change-Id: Iec721fc46935c40787aba904bf72db9e50a17e8e
Reviewed-on: https://chromium-review.googlesource.com/592243
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490538}
[modify] https://crrev.com/4196f898978a551e070a9274af7a26728db2f959/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadMappings.java
[modify] https://crrev.com/4196f898978a551e070a9274af7a26728db2f959/device/gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java

Status: Fixed (was: Started)

Sign in to add a comment