Re: Asus illuminated numpads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

On 9/11/20 9:11 PM, Dmitry Tunin wrote:
Hi,

Could anyone push me in the correct direction with this?

New Asus 14' laptops have fancy touchpads. On Windows if you press a
button on the touchpad a built-in led illuminates and shows a numpad
on the touchpad, that can be used to enter numbers. I have an Asus
X415DA one. Other ZenBooks and Vivobooks have this touchpad.

It's kinda detected by kernel. An input device called "ELAN1401:00
04F3:30F2 Keyboard" is detected that has LEDs,buttons, etc.

I: Bus=0018 Vendor=04f3 Product=30f2 Version=0100
N: Name="ELAN1401:00 04F3:30F2 Keyboard"
P: Phys=i2c-ELAN1401:00
S: Sysfs=/devices/platform/AMDI0010:01/i2c-0/i2c-ELAN1401:00/0018:04F3:30F2.0001/input/input12
U: Uniq=
H: Handlers=sysrq kbd event9 leds
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

root@pilot6-X412DA:/sys/bus/i2c/devices/i2c-ELAN1401:00/0018:04F3:30F2.0001/input/input12#
ls
capabilities  event9  input12::capslock  input12::kana
input12::scrolllock  name  power       subsystem  uniq
device        id      input12::compose   input12::numlock  modalias
          phys  properties  uevent

So kernel sees the LEDs, etc.

root@pilot6-X412DA:/sys/class/leds# ls /sys/class/leds
asus::kbd_backlight  input12::compose  input12::numlock
input4::capslock  input4::scrolllock
input12::capslock    input12::kana     input12::scrolllock
input4::numlock   phy0-led

But nothing works. I tried to write 1 to 'brightness', also emulated
Num_Lock event on the keyboard, etc.

So I found some pictures and when you say "press a button on the touchpad"
you mean touch the icon in the top right corner of the touchpad I assume?

So not really a physical button, right ?  Given that there is a keyboard
HID interface on the touchpad, I guess that that corner-button is handled
in software by the Windows driver and the Windows driver then sends a command
to the touchpad to switch to numpad mode and then the rest is handled by
firmware in the touchpad.

Which leaves the challenge of switching the touchpad to numpad mode
(and back again).

BTW what is the top left corner icon on the touchpad supposed to do ?

There is a Windows driver at asus.com that handles the touchpad. Some
time ago we could reverse engineer a Windows driver for Focaltech
touchpads and find out how it worked. We installed a virtual Windows
and sniffed some data.
But that was a PS/2 device. I am not very much familiar with i2c, but
it is fixable ;-)

Is there a way to do something similar?

Yes, sniffing the Windows i2c traffic is possible, see:

https://github.com/bentiss/SimplePeripheralBusProbe

Getting that to work is somewhat tricky do, if you get
stuck it is probably best to directly email bentiss about
this, I've added him to the Cc do you have his email address,
feel free to blame me for directly contacting him.

What might help is as root, with secure-boot off, do:

cat /sys/kernel/debug/hid/0018:04F3:30F2.0001/rdesc > rdesc

This will give us the HID descriptors of the touchpad,
which will help interpret the i2c traffic.

WARNING before you read the below, writing the wrong
feature report might put the touchpad in firmware update
mode. I've had a Logitech keyboard where there was no
"handshake" to confirm you really wanted to enter firmware
update mode, it just went into that mode and for good
measure also erased its current firmware as part of that
(not good).

There will probably be some feature output reports there
using vendor specific usage codes and chances are we need
to set one of those feature reports to 0/1 to enable/disable
the numpad mode.

If there is like a 1 byte vendor-specific usage code there,
you could even directly try poking it through the matching
/dev/hidraw interface for the touchpad, but see the above
warning!

Regards,

Hans




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux