2011-12-25, 01:22
Bob,
Nice work. This make many of my old devices usable.
Had enough success I thought I'd try it on a device I'd given up on, Fisher Price Digital Studio. So far this maps all of the buttons but they repeat and the learn tool sees changes in the pen but I can't figure out how to map them. But the key presses for this thing has 4 more bytes. For the button presses the are all ff but for the mouse movements the numbers vary. I suppose those are to describe the movement of the pointer.
I'm hopeful you or someone else can point me in the right direction to being able to map the pen movements, too.
Here is map for the buttons
# Power Button
47100000000002ffffffff:KEY_W
# Print
47000000040002ffffffff:KEY_PRINT
# Home
47000004000002ffffffff:KEY_HOME
# White
47010000000002ffffffff:KEY_A
# Black
47000000000202ffffffff:KEY_B
# Brown
47000000020002ffffffff:KEY_C
# Purple
47000002000002ffffffff:KEY_D
# Blue
47000200000002ffffffff:KEY_E
# Green
47020000000002ffffffff:KEY_F
# Yellow
47000000000102ffffffff:KEY_G
# Orange
47000000010002ffffffff:KEY_H
# Red
47000100000002ffffffff:KEY_I
# Color Wheel
47000001000002ffffffff:KEY_J
# Landscape Picture
47000800000002ffffffff:KEY_K
# Stamp Tool
47080000000002ffffffff:KEY_L
# Paint Bucket Tool
47000000000402ffffffff:KEY_M
# Redo or goback?
47040000000002ffffffff:KEY_N
# Star Burst
47000000000802ffffffff:KEY_O
# Shooting Star
47000000080002ffffffff:KEY_P
# ABCD
47000008000002ffffffff:KEY_Q
# Pencil
47001000000002ffffffff:KEY_R
# Paint Brush
47000010000002ffffffff:KEY_S
# Spray Can
47000000100002ffffffff:KEY_T
# Eraser
47000000001002ffffffff:KEY_U
# Toggle button
47000000000003ffffffff:KEY_V
And here is a sample of the learn for the pen movements. 47 00 00 00 00 00 02 is when the pressure tip is not pressed and 47 00 00 00 00 00 00 is when it is pressed.
47 00 00 00 00 00 02 7c 02 a6 01
47 00 00 00 00 00 02 6d 02 a3 01
47 00 00 00 00 00 02 56 02 b0 01
47 00 00 00 00 00 02 49 02 b3 01
47 00 00 00 00 00 02 38 02 b8 01
47 00 00 00 00 00 02 29 02 c0 01
47 00 00 00 00 00 00 08 02 d0 01
47 00 00 00 00 00 00 de 01 e2 01
47 00 00 00 00 00 00 af 01 f0 01
47 00 00 00 00 00 00 87 01 f4 01
47 00 00 00 00 00 00 66 01 eb 01
47 00 00 00 00 00 00 54 01 d2 01
47 00 00 00 00 00 00 4e 01 ac 01
47 00 00 00 00 00 00 54 01 80 01
47 00 00 00 00 00 00 5b 01 55 01
47 00 00 00 00 00 00 6d 01 37 01
47 00 00 00 00 00 00 85 01 28 01
47 00 00 00 00 00 00 97 01 29 01
jason@jason-lenovo:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 018: ID 0813:1006 Mattel, Inc.
Bus 002 Device 016: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 005: ID 04f2:b1c1 Chicony Electronics Co., Ltd
udevadm info --attribute-walk --name=/dev/hidraw0
looking at device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:0813:1006.000F/hidraw/hidraw0':
KERNEL=="hidraw0"
SUBSYSTEM=="hidraw"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:0813:1006.000F':
KERNELS=="0003:0813:1006.000F"
SUBSYSTEMS=="hid"
DRIVERS=="generic-usb"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0':
KERNELS=="2-1.2:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usbhid"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bNumEndpoints}=="01"
ATTRS{bInterfaceClass}=="03"
ATTRS{bInterfaceSubClass}=="00"
ATTRS{bInterfaceProtocol}=="00"
ATTRS{supports_autosuspend}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2':
KERNELS=="2-1.2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bMaxPower}=="100mA"
ATTRS{urbnum}=="1472"
ATTRS{idVendor}=="0813"
ATTRS{idProduct}=="1006"
ATTRS{bcdDevice}=="0092"
ATTRS{bDeviceClass}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{speed}=="12"
ATTRS{busnum}=="2"
ATTRS{devnum}=="18"
ATTRS{devpath}=="1.2"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Fisher-Price"
ATTRS{product}=="DACS"
ATTRS{serial}=="DACS0000001"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1':
KERNELS=="2-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="475"
ATTRS{idVendor}=="8087"
ATTRS{idProduct}=="0020"
ATTRS{bcdDevice}=="0000"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="2"
ATTRS{devnum}=="2"
ATTRS{devpath}=="1"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="8"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="31"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0301"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="2"
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="3"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 3.1.0-1-686-pae ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:1d.0"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.0':
KERNELS=="0000:00:1d.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x8086"
ATTRS{device}=="0x3b34"
ATTRS{subsystem_vendor}=="0x17aa"
ATTRS{subsystem_device}=="0x38b8"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="23"
ATTRS{local_cpus}=="ffffffff"
ATTRS{local_cpulist}=="0-31"
ATTRS{dma_mask_bits}=="32"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
ATTRS{uframe_periodic_max}=="100"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Nice work. This make many of my old devices usable.
Had enough success I thought I'd try it on a device I'd given up on, Fisher Price Digital Studio. So far this maps all of the buttons but they repeat and the learn tool sees changes in the pen but I can't figure out how to map them. But the key presses for this thing has 4 more bytes. For the button presses the are all ff but for the mouse movements the numbers vary. I suppose those are to describe the movement of the pointer.
I'm hopeful you or someone else can point me in the right direction to being able to map the pen movements, too.
Here is map for the buttons
# Power Button
47100000000002ffffffff:KEY_W
47000000040002ffffffff:KEY_PRINT
# Home
47000004000002ffffffff:KEY_HOME
# White
47010000000002ffffffff:KEY_A
# Black
47000000000202ffffffff:KEY_B
# Brown
47000000020002ffffffff:KEY_C
# Purple
47000002000002ffffffff:KEY_D
# Blue
47000200000002ffffffff:KEY_E
# Green
47020000000002ffffffff:KEY_F
# Yellow
47000000000102ffffffff:KEY_G
# Orange
47000000010002ffffffff:KEY_H
# Red
47000100000002ffffffff:KEY_I
# Color Wheel
47000001000002ffffffff:KEY_J
# Landscape Picture
47000800000002ffffffff:KEY_K
# Stamp Tool
47080000000002ffffffff:KEY_L
# Paint Bucket Tool
47000000000402ffffffff:KEY_M
# Redo or goback?
47040000000002ffffffff:KEY_N
# Star Burst
47000000000802ffffffff:KEY_O
# Shooting Star
47000000080002ffffffff:KEY_P
# ABCD
47000008000002ffffffff:KEY_Q
# Pencil
47001000000002ffffffff:KEY_R
# Paint Brush
47000010000002ffffffff:KEY_S
# Spray Can
47000000100002ffffffff:KEY_T
# Eraser
47000000001002ffffffff:KEY_U
# Toggle button
47000000000003ffffffff:KEY_V
And here is a sample of the learn for the pen movements. 47 00 00 00 00 00 02 is when the pressure tip is not pressed and 47 00 00 00 00 00 00 is when it is pressed.
47 00 00 00 00 00 02 7c 02 a6 01
47 00 00 00 00 00 02 6d 02 a3 01
47 00 00 00 00 00 02 56 02 b0 01
47 00 00 00 00 00 02 49 02 b3 01
47 00 00 00 00 00 02 38 02 b8 01
47 00 00 00 00 00 02 29 02 c0 01
47 00 00 00 00 00 00 08 02 d0 01
47 00 00 00 00 00 00 de 01 e2 01
47 00 00 00 00 00 00 af 01 f0 01
47 00 00 00 00 00 00 87 01 f4 01
47 00 00 00 00 00 00 66 01 eb 01
47 00 00 00 00 00 00 54 01 d2 01
47 00 00 00 00 00 00 4e 01 ac 01
47 00 00 00 00 00 00 54 01 80 01
47 00 00 00 00 00 00 5b 01 55 01
47 00 00 00 00 00 00 6d 01 37 01
47 00 00 00 00 00 00 85 01 28 01
47 00 00 00 00 00 00 97 01 29 01
jason@jason-lenovo:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 018: ID 0813:1006 Mattel, Inc.
Bus 002 Device 016: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 005: ID 04f2:b1c1 Chicony Electronics Co., Ltd
udevadm info --attribute-walk --name=/dev/hidraw0
looking at device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:0813:1006.000F/hidraw/hidraw0':
KERNEL=="hidraw0"
SUBSYSTEM=="hidraw"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:0813:1006.000F':
KERNELS=="0003:0813:1006.000F"
SUBSYSTEMS=="hid"
DRIVERS=="generic-usb"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0':
KERNELS=="2-1.2:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usbhid"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bNumEndpoints}=="01"
ATTRS{bInterfaceClass}=="03"
ATTRS{bInterfaceSubClass}=="00"
ATTRS{bInterfaceProtocol}=="00"
ATTRS{supports_autosuspend}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2':
KERNELS=="2-1.2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bMaxPower}=="100mA"
ATTRS{urbnum}=="1472"
ATTRS{idVendor}=="0813"
ATTRS{idProduct}=="1006"
ATTRS{bcdDevice}=="0092"
ATTRS{bDeviceClass}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{speed}=="12"
ATTRS{busnum}=="2"
ATTRS{devnum}=="18"
ATTRS{devpath}=="1.2"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Fisher-Price"
ATTRS{product}=="DACS"
ATTRS{serial}=="DACS0000001"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1':
KERNELS=="2-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="475"
ATTRS{idVendor}=="8087"
ATTRS{idProduct}=="0020"
ATTRS{bcdDevice}=="0000"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="2"
ATTRS{devnum}=="2"
ATTRS{devpath}=="1"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="8"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="31"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0301"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="2"
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="3"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 3.1.0-1-686-pae ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:1d.0"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.0':
KERNELS=="0000:00:1d.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x8086"
ATTRS{device}=="0x3b34"
ATTRS{subsystem_vendor}=="0x17aa"
ATTRS{subsystem_device}=="0x38b8"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="23"
ATTRS{local_cpus}=="ffffffff"
ATTRS{local_cpulist}=="0-31"
ATTRS{dma_mask_bits}=="32"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
ATTRS{uframe_periodic_max}=="100"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""