a Linux driver for the Synaptics cPad
rob miller -- rob at janerob dot com

Check out the gallery!

News Flash go to Jan Steinhoff's page for a driver that works with 2.6! (I'm using it!)

Here is a local mirror of Jan's page, but check the link above to make sure my copy hasn't fallen out of date.

driver source: cpad_07.tar.gz rpm: cpad-07-5rvx.src.rpm.

 

Newest contributions to the cPad pages are the cpad-0.7 rpms and these spiffy .xpm images contributed by Alessandro Zarrilli for use on your cPad under Linux (or Windows if you like ;-)

Wish I could draw so well! The xpms are kmfms.xpm and virusfree.xpm.

latest changes:

  • significant clean-ups and enhancements by Ron Lee (0.7)
  • Dean Pentcheff contributed some more work improving motion sensitivity for fine movements -- see the 0.6 version
  • Xavier Granier contributed the source rpms
  • fixed motion sensitivity bug - caused DVD playback problems [thanks Michael Lloyd-Hart]
  • tap-and-drag, motion sensitivity ioctl [thanks Michael Lloyd-Hart]
  • set minimum mouse pressure (sensitivity) ioctl [thanks D. Banas!]
  • ** minor device number now 66 ** (you probably need to rm /dev/usb/cpad0 and mknod again)
  • flash backlight ioctl (usr_cpad -x) now works
  • fixes suggested by usb-dev mailing list participants
  • ioctls now clear response urbs
  • added the xpixmap file to produce the display shown
  • In addition to my 5100, users have reported this working on the 5105, 5105-S701, 5105-S901, 5200, 5200-801, 5205, and 5205-S703. Some 5200 folk (but not a -801 user) seem to need ehci (USB2.0) enabled and 'usb proc fs' compiled in. If it works for your machine that's not on this list, please drop me a line.

    Install:

  • unpack the .tar.gz file
  • make the modules/cpad subdir be /usr/src/modules/cpad (this is the driver)
  • in /usr/src/modules/cpad do 'make' and 'make install'; if you have a problem the compile command is
    'cc -Wall -O2 -L/usr/src/linux/lib -I/usr/src/linux/include -c -o cpad.o cpad.c'
  • get out of X
  • I need to do: 'rmmod cpad mousedev hid input' (see the kernel setup info on my 5100 page)
  • modprobe cpad
  • or just put 'cpad' in /etc/modules before hid/usbmouse and reboot if you're lazy but patient
  • 'modprobe mousedev' and start X if you like
  • 'mknod /dev/usb/cpad0 c 180 66' or use devfs
  • go to the supplied user subdir and compile with 'gcc -o usr_cpad usr_cpad.c'
  • Assuming it worked you should be able to do './usr_cpad -h' and see:

    usage: ./usr_cpad -< opt > < param > [< dev >] 
      -i < file >  display 160x240 xpm file
      -b < 1,0 >   backlight on/off
      -c           read backlight state
      -l < 1,0 >   lcd on/off
      -m           read lcd state
      -r           reset
      -v           print driver version
      -x < n >   backlight flash n * 10 msec
      -s < n >   set minimum touch pressure
      -t < n >   set mouse motion sensitivity
      -d < n >   display load/temp/batt graphs every n secs
    

    If you're using devfs the device may be somewhere other than /dev/usb/cpad0 -- look around ('find /dev | grep -i cpad' should do it), and specify the < dev > explicitly on the usr_cpad command line.

    Please note that the backlight has a finite lifespan, something like 1000 to 3000 hours. That's why the -x and flash ioctl is there.

    The useful range for '-s' is something like 0-127, -t try 0-255

    The '-d' option on usr_cpad needs the ACPI patch as described on my 5100 page. In other words, you should have /proc/acpi/battery/BAT1/info, /proc/acpi/battery/BAT1/state, and /proc/acpi/thermal_zone/THRM/temperature. From right to left the bars are battery %, temperature, and a third bar will appear if the CPU load goes over 1. The trace is of course the CPU load. The backlight will flash if the temperature exceeds 68C or the battery falls below 20%.

    I expect that your tastes in the info displayed may not be the same as mine, and I encourage you to poke around in usr_cpad.c and come up with your own view. The line and bar drawing subroutines sould be pretty clear. Drop me an e-mail with your masterpiece.

    You can vary the sensitivity, default minimum pressure, and length of time for a tap by modifying #defines in the driver -- see the comments.

    The cpad.o module takes a parameter 'absmouse' which will cause the driver to report and work in 'absolute' mouse coordinates. The correct way to support the cPad is probably to have it work this way and have something like gpm translate into relative coordinates, but I chose to lie about it instead and keep the absolute coordinates internal to the driver. Tap-to-click is not implemented for the absolute mouse, however both ways do report the mouse pressure via the input device interface.

    Yes, I would still like to be working on it, but we've moved to Abuja (Nigeria) and my time is pretty happily filled up with bioinformatics research these days... There are a few folks working on modifications and improvements -- one I know about with some major enhancements, others just drop me a few lines of code now and then. I'd love to have any help you'd like to contribute -- drop me a line!

    Especially good things to work on might be:

  • send the image in 1 or 2 big URBs.
  • port to 2.5 (then it might go into the kernel source).
  • add a framebuffer device interface.
  • The shape of things to come: Ron's work.

    Check out Dietmar Kuehl's Xcpad X11 server that displays on the cPad!

    I've found two versions of .xpm format and made both work -- here's one and another .

    This page has been accessed times since 13 Nov 2002.