Capacitive touch support for Manga Screen on BeagleBone Black

Manga touch

The first evidence of working touch functionality for Manga Screen can be seen in the video below.

Currently I have only gotten this working on Ubuntu 13.04 with LXDE as the desktop environment. The touch screen is controlled via I2C at the moment, so four separate wires are going to the display in addition to the HDMI cable. This has all been fixed in the Rev A2 of the Manga Screen where  all communication is done via USB.

There was quite a bit of work that had to be done in order to get the Synaptic ClearPad 3000 series touch screen controller working with X on the BeagleBone Black.

- Port the Synaptics driver from kernel version 2.6 to 3.8.13

- Recompile the tslib library module

- Recompile the tslib input module

- Write a device tree overlay

Below are the details for reproducing this. I’m sure a lot of steps have been left out, but at least this is better than nothing.

Compile the tslib module

The tslib driver consists of both a shared library and a Xorg input module.

I don’t know if this is normal or not, but it appears that the tslib xorg module is dependent on
libts.so and is compiled in statically.The changes that were made to the module are currently in the git repository of the Manga Screen.

./configure
sudo make && sudo make install

If the default install dir is used, the .so-file has to coped to the location where the xorg input module expects to find it:

sudo cp /usr/local/lib/libts-1.0.so.0.0.0 /usr/lib/arm-linux-gnueabihf/

Compile the Xorg tslib input module

Here is a post explaining how to get the source code and recompile it:
http://boundarydevices.com/debian-in-more-depth-adding-touch-support/

Since there is no dependency information in the tslib lib (libts.so), you need to fix that:
http://stackoverflow.com/questions/11238134/dpkg-shlibdeps-error-no-dependency-information-found-for

I used the last solution.

Recompile the package:

sudo debian/rules binary

To re-install the debian package, do this:

sudo dpkg -i ../xserver-xorg-input-tslib_0.0.6-7build3_armhf.deb

The file /usr/local/etc/ts.conf is the overwritten, so remember to update it.

After that, you can compile with:

sudo make && sudo make install

You need to get the source for the tslib
ts_error(“line in %s is %s\n”, conffile, line);

 Rotation of screen with tslib does not work

With the tslib installed and the screen rotated, it turns out that X crashes, look:
http://patchwork.freedesktop.org/patch/1256/

I have been unable to get tslib 0.0.6 to work with Rotation=CCW on the screen. I get the error:

X: /usr/include/xorg/privates.h:123: dixGetPrivateAddr: Assertion `key->initialized' failed.

Instead I have had to hard code the rotation into the driver:

Rotation rotation = RR_Rotate_90;//rrGetScrPriv (pScrn->pScreen) ? RRGetRotation(pScrn->pScreen) : RR_Rotate_0;

Other errors: 

tslib: Selected device is not a touchscreen (must support ABS and KEY event types)

Make sure the right input device is selected try evtest /dev/input/event1. IF this reports these two symbols, it is the right device.

More info:

I’ve written up much of the process on the Replicape wiki as well, so if you want to reproduce this or expand on it, have a look at that as well: http://wiki.replicape.com/index.php?title=Installing_Ubuntu

2 thoughts on “Capacitive touch support for Manga Screen on BeagleBone Black

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>