feat(Hardware Support): Add AYANEO NEXT 2 device and capability map config - #684
feat(Hardware Support): Add AYANEO NEXT 2 device and capability map config#684pastaq wants to merge 1 commit into
Conversation
…onfig Original Author: Gregory Moore <greg@sysadmin.network> (cherry picked from commit a414f15) Modifications from original: - Add dinput mode support - Add IMU mount matrix - Use Left/RightStickTouch for LC/RC so events are unique with default profile - Add Next 2 to autostart rules Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
e1bf482 to
c314175
Compare
|
@abdullamu please test this updated PR. |
AYANEO NEXT 2 testing report – Elite paddles + gyro working, touchpads unresolved, AYANEO mouse/keyboard mode regression Hi, I spent several hours testing the new AYANEO NEXT 2 InputPlumber support and wanted to provide the complete results. Important context: this is my first time doing this kind of work with Linux/InputPlumber. I performed all testing on my physical NEXT 2, but ChatGPT helped me with the commands, YAML configuration and interpretation of the results. So the observations below are real, but some of my technical interpretation may be incorrect. Device:
Before testing the new NEXT 2 InputPlumber build/profile, the handheld's normal AYANEO controller mode had working mouse/keyboard behavior. For example, in AYANEO mode I could use the controller/stick to control the desktop mouse and use its normal keyboard/mouse functions. After installing/running the new NEXT 2 InputPlumber build/profile, this AYANEO mouse/keyboard controller mode stopped behaving normally. The new build essentially broke the normal AYANEO mouse/keyboard mode on my device while InputPlumber was controlling it. This is separate from the Xbox controller functionality, which continued to work. After reverting away from the new setup, I was able to get the normal AYANEO mouse/keyboard behavior back. So I think this is important to investigate as a possible regression.
During testing, Steam appeared to see two controller devices. One had the normal Xbox controller functionality. The other exposed the additional/rear-button functionality. I do not know whether this is intentional. If this is the intended architecture, please confirm. For my use case, having the controls split this way is problematic because I want Steam to see the NEXT 2 as one controller and allow the rear buttons to be configured normally.
With ChatGPT's help, we created a simplified custom composite that combined the inputs and used Xbox Elite as the target. The relevant profile was: version: 1 single_source: false matches:
source_devices:
options: target_devices:
capability_map_id: aya10 This produced ONE AYANEO NEXT 2 composite containing: /dev/input/event6 This was the best configuration I obtained.
With this configuration I got:
Most importantly, Steam could see the rear buttons as part of the Elite controller instead of requiring the rear controls to exist on another controller. This seems much more useful from the user's perspective.
From evtest testing I identified: F16 = code 186 For the physical rear controls I previously identified: LC = F21 The other rear buttons use F17-F20. There are also AYANEO special/front buttons producing F-key events, including F16/F23 depending on the physical button.
The NEXT 2 IMU on my unit is: bmi323-imu After adding it to the same composite, InputPlumber showed: event6 Direct testing through InputPlumber confirmed that gyro/accelerometer motion events were working. I would appreciate confirmation of the correct production NEXT 2 mount matrix. The matrix we used got the IMU working, but I do not want to claim it is the officially correct orientation.
We also tested: target_devices:
This worked without destroying the composite. InputPlumber successfully created: xbox-elite = Microsoft X-Box One Elite pad However, simply creating these targets did NOT restore the missing physical touchpad functionality.
At the beginning of today's testing, I remember the NEXT 2 controls behaving with: Right touchpad = mouse Later during the testing this functionality disappeared, and I could not reproduce it. The AYANEO composite device currently exposes: event4 = pointer USB ID: event4 advertises: BTN_LEFT However, with InputPlumber stopped, running: sudo evtest /dev/input/event4 and physically using either touchpad produced no output. We also tested the AYANEO hidraw interfaces: hidraw1 = interface 1.0 I tested them with hexdump while operating the physical touchpads and did not observe touchpad data.
At one point we thought REL_WHEEL activity on event4 was coming from one of the touchpads. That interpretation was WRONG. I later determined that the activity was generated by the LEFT STICK when the handheld was placed into AYANEO controller/mouse mode. I am including this correction so nobody investigating this wastes time based on our earlier assumption.
We attempted to add the AYANEO pointer interface as another evdev source. After that change, InputPlumber failed to create the composite and: inputplumber device 0 info returned: Error: "Composite device does not exist with number: 0" We immediately reverted this change. Therefore I do not know the correct way to integrate the physical pointer/touchpad functionality.
I have the physical AYANEO NEXT 2 available and I am happy to help test this further. Please give me exact commands and I can provide raw output from:
I can also test modified YAML files or development builds. Because I am new to Linux development, exact commands/instructions would be helpful and will reduce the chance of me testing the wrong thing. The main useful result from today's testing is that we DID manage to combine: normal controller + rear buttons + special buttons + BMI323 gyro into ONE Xbox Elite composite controller, and that configuration worked. The two remaining issues are:
I hope this testing helps. Please let me know what you want me to test next. |
|
@abdullamu thank you for sticking with this. That is a lot of info, I'll try and cover it all.
To ensure we cover all bases, please provide the following (This is highly specific, please follow directions precisely): Then provide the following for ALL modes using the config from this PR by swapping with Then run inputplumber manually with debug logging: After all testing is done, |
Original Author: Gregory Moore greg@sysadmin.network
(cherry picked from commit a414f15)
Modifications from original:
Signed-off-by: Derek J. Clark derekjohn.clark@gmail.com
Replaces #658
Closes #654