Friday, October 29, 2010

Multitouch driver on WeTab

Update Feb 26 2011 please refer to http://wetabz.blogspot.com/2011/02/wetab-ubuntu-installation.html or full details on installing and running Ubuntu on WeTab with touchscreen enabled.
------------------------------------------------------------------------------------------------------------------------------------Update: The directions from the bottom of the More on Multitouch post should be all that is needed. I'm keeping the one below just for record.

I'm still having a hard time with this. My knowledge of Linux internals is not what it should be, I've gotten halfway through the LFS book twice but never had the patience to see it through. In any case, I've followed a bunch of threads around about using the eGalaxTouchDriver but nothing works, I just keep ending up with the cursor jumping up to the upper left corner of the screen when I touch it under Ubuntu Maverick, Lucid and Meego netbook release.

I've started sniffing around the system for clues on how WeTab OS does things. Here are some of my findings:

/etc/X11/xorg.conf.d/99-calibration.conf

ection "InputClass"
Identifier "default"
Driver "evdev"
EndSection

Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "Calibration" "-5 4100 59 4100"
EndSection

This looks like we're depending on evdev for input support...but there's more.

lsusb gives the following output:

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 011: ID 12d1:1404 Huawei Technologies Co., Ltd.
Bus 002 Device 007: ID 04f2:b213 Chicony Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0eef:72a1 D-WAV Scientific Co., Ltd
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Note the 2nd record from the bottom: Bus 003 Device 002: ID 0eef:72a1 D-WAV Scientific Co., Ltd. Most websites mention that there should also exist 'egalax...' at the end of the given string, not sure if that matters.

Futhermore looking at xinput -list output we get the following:

-Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ USB 2.0 Camera id=12 [slave keyboard (3)]
↳ Asus Laptop extra buttons id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ USB Keyboard id=9 [slave keyboard (3)]
↳ USB Keyboard id=10 [slave keyboard (3)]

For more info on the eGalax device we issue:

xinput -list-props 11

Device 'eGalax Inc. USB TouchController':
Device Enabled (132): 1
Device Accel Profile (252): 0
Device Accel Constant Deceleration (253): 1.000000
Device Accel Adaptive Deceleration (255): 1.000000
Device Accel Velocity Scaling (256): 10.000000
Evdev Reopen Attempts (248): 10
Evdev Axis Inversion (257): 0, 0
Evdev Axis Calibration (258): -5, 4100, 59, 4100
Evdev Axes Swap (259): 0
Axis Labels (260): "Abs X" (250), "Abs Y" (251), "None" (0), "None" (0), "None" (0)
Button Labels (261): "Button Unknown" (249), "Button Unknown" (249), "Button Unknown" (249), "Button Wheel Up" (136), "Button Wheel Down" (137)
Evdev Middle Button Emulation (262): 2
Evdev Middle Button Timeout (263): 50
Evdev Wheel Emulation (264): 0
Evdev Wheel Emulation Axes (265): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (266): 10
Evdev Wheel Emulation Timeout (267): 200
Evdev Wheel Emulation Button (268): 4
Evdev Drag Lock Buttons (269): 0

Ok let's see what xorg has to say about all this:

cat /var/log/Xorg.0.log |grep -i egalax

[ 11.935] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/event6)
[ 11.935] (**) eGalax Inc. USB TouchController: Applying InputClass "default"
[ 11.935] (**) eGalax Inc. USB TouchController: Applying InputClass "calibration"
[ 11.935] (**) eGalax Inc. USB TouchController: always reports core events
[ 11.935] (**) eGalax Inc. USB TouchController: Device: "/dev/input/event6"
[ 11.940] (II) eGalax Inc. USB TouchController: Found absolute axes
[ 11.940] (II) eGalax Inc. USB TouchController: Found x and y absolute axes
[ 11.940] (II) eGalax Inc. USB TouchController: Found absolute touchscreen
[ 11.940] (II) eGalax Inc. USB TouchController: Configuring as touchscreen
[ 11.940] (**) eGalax Inc. USB TouchController: YAxisMapping: buttons 4 and 5
[ 11.940] (**) eGalax Inc. USB TouchController: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 11.940] (II) XINPUT: Adding extended input device "eGalax Inc. USB TouchController" (type: TOUCHSCREEN)
[ 11.940] (II) eGalax Inc. USB TouchController: initialized for absolute axes.
[ 11.941] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/mouse0)
[ 11.941] (**) eGalax Inc. USB TouchController: Applying InputClass "default"
[ 11.941] (**) eGalax Inc. USB TouchController: Applying InputClass "calibration"
[ 11.941] (**) eGalax Inc. USB TouchController: always reports core events
[ 11.941] (**) eGalax Inc. USB TouchController: Device: "/dev/input/mouse0"
[ 11.950] (EE) PreInit returned NULL for "eGalax Inc. USB TouchController"
[ 2400.623] (II) eGalax Inc. USB TouchController: Device reopened after 1 attempts.
[ 3907.858] (II) config/udev: removing device eGalax Inc. USB TouchController
[ 3907.860] (II) eGalax Inc. USB TouchController: Close
[ 3990.426] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/mouse0)
[ 3990.426] (**) eGalax Inc. USB TouchController: Applying InputClass "default"
[ 3990.426] (**) eGalax Inc. USB TouchController: Applying InputClass "calibration"
[ 3990.426] (**) eGalax Inc. USB TouchController: always reports core events
[ 3990.426] (**) eGalax Inc. USB TouchController: Device: "/dev/input/mouse0"
[ 3990.437] (EE) PreInit returned NULL for "eGalax Inc. USB TouchController"
[ 3990.437] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/event6)
[ 3990.437] (**) eGalax Inc. USB TouchController: Applying InputClass "default"
[ 3990.437] (**) eGalax Inc. USB TouchController: Applying InputClass "calibration"
[ 3990.437] (**) eGalax Inc. USB TouchController: always reports core events
[ 3990.437] (**) eGalax Inc. USB TouchController: Device: "/dev/input/event6"
[ 3990.440] (II) eGalax Inc. USB TouchController: Found absolute axes
[ 3990.440] (II) eGalax Inc. USB TouchController: Found x and y absolute axes
[ 3990.440] (II) eGalax Inc. USB TouchController: Found absolute touchscreen
[ 3990.440] (II) eGalax Inc. USB TouchController: Configuring as touchscreen
[ 3990.440] (**) eGalax Inc. USB TouchController: YAxisMapping: buttons 4 and 5
[ 3990.440] (**) eGalax Inc. USB TouchController: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 3990.440] (II) XINPUT: Adding extended input device "eGalax Inc. USB TouchController" (type: TOUCHSCREEN)
[ 3990.440] (II) eGalax Inc. USB TouchController: initialized for absolute axes.

finally for good measure I had a look at the loaded modules:
lsmod

Module Size Used by
hid_egalax 2819 0
ath3k 1869 0
fuse 48766 2
uvcvideo 46234 0
pega_ext 2136 0
i2c_dev 4425 0
nls_utf8 989 0
ath9k 59197 0
ath9k_common 4376 1 ath9k
option 12705 0
ath9k_hw 260533 2 ath9k,ath9k_common
ath 7006 2 ath9k,ath9k_hw
usb_wwan 8028 1 option
mac80211 182073 2 ath9k,ath9k_common
usbserial 27143 2 option,usb_wwan
i2c_i801 7159 0
joydev 7182 0
cfg80211 113917 4 ath9k,ath9k_common,ath,mac80211
asus_laptop 11967 0
crystalhd 75313 0
battery 8542 0
sparse_keymap 2393 1 asus_laptop

hid_egalax caught my eye and I ran modinfo

filename: /lib/modules/2.6.35.3-10341.1.4-wetab/kernel/drivers/hid/hid-egalax.ko
license: GPL
description: eGalax dual-touch panel
author: Stephane Chatty
alias: hid:b0003v00000EEFp000072A1
alias: hid:b0003v00000EEFp0000726B
alias: hid:b0003v00000EEFp0000480D
depends:
vermagic: 2.6.35.3-10341.1.4-wetab SMP preempt mod_unload PENTIUMM

Looks like a kernel module.
To confirm how relevant, I ran a modprobe -r hid_egalax and sure enough, my touchscreen went dead. Thankfully my USB keyboard was close and I reloaded the module into the kernel.

Naturally the next thing to do is to look up the author and see what he has to say about all this: http://patchwork.ozlabs.org/patch/46894/in the thread Stephane gives us an answer:

"in order to have the driver up and running, two modifications are
necessary in the hid subsystem:

1. the one described below, in hid.h. This is required for a whole
bunch of multitouch devices but obviously it has to be done only once.

2. the addition of the device's (VendorID, ProductID) couple to a
black list in the hid subsystem's core, so that the new driver can
manage it. This involves changes in hid-ids.h and hid-core.c, for
every new driver.

If hid is compiled as a module, this is fairly straightfowrad. If, as
in Ubuntu, it is statically compiled in the kernel, it means that one
needs to recompile the kernel each time they add a new multitouch
driver.

I was hoping that at least the first patch would be taken into
account for 2.6.33 so as to save work for a lot of people, but it
looks like the patch came too late in the process."

This was sometime in March, a lot might have happened since. The next question is whether this loadable module can be loaded into the other kernel, and how that would be done, where do we get the code for it...too many questions. Well I gotta sleep now, more about this soon, if anyone has a bright idea, please share!



Update Nov 11:
The following forum post discusses enabling touch on On Ubuntu for the WeTab: https://bugs.launchpad.net/utouch/+bug/670795
https://bugs.launchpad.net/ubuntu/+source/utouch-grail/+bug/667802

It looks like the following two packages are needed, I haven't had a chance to test this out yet.
hid-egalax-dkms_1.0.3_all.deb 
hid-dkms_1.0.5_all.deb 


Some glitch with cursor lodging on rthe last touch position still remains to be solved.

Wednesday, October 27, 2010

Chrome Touchscreen capability

After suffering a bit and trying out Firefox on the WeTab, I finally found what I was looking for, a way to make Chrome more friendly to the Touchscreen. Smilkobuta, bless his/her soul made a nifty extension just to get this happening on Chrome: https://chrome.google.com/extensions/detail/ncegfehgjifmmpnjaihnjpbpddjjebme

I'm still seeing about getting Ubuntu to be fully functional on the WeTab. Right now I'm trying a full install to my USB flash disk (instead of just using the startup disk creator which doesn't let you modify boot options; according to many, this is key to getting Ubuntu to correctly calibrate the touchscreen). I'll post again if I have anything positive to report.

Tuesday, October 26, 2010

Ubuntu touchscreen for WeTab

Update Feb 26 2011 please refer to http://wetabz.blogspot.com/2011/02/wetab-ubuntu-installation.html or full details on installing and running Ubuntu on WeTab with touchscreen enabled.
------------------------------------------------------------------------------------------------------------------------------------Update: See http://wetabz.blogspot.com/2010/11/more-on-multitouch-and-wetab.html for the latest about this topic.


As I had reported before, Ubuntu runs fine on the WeTab. The only hurdle I am running into is that the touchscreen doesn't work correctly. All my touches cause the mouse cursor to go to the upper left corner of the screen and click. The same symptoms were reported by JooJoo users trying to run Ubuntu on their systems.

Running lsusb provides the following output which is similar to what I've seen in forums except there is no mention of egalax

Bus 003 Device 002: ID 0eef:72a1 D-WAV Scientific Co., Ltd

Additionally an lsmod shows: hid_egalax

Finally, a boot message further confirms the presence of the driver.

[3.695800] egalax-touch 0003:0EEF:72A1.0001: input,hiddev96,hidraw0: USB HID v2.10 Pointer [eGalax Inc. USB TouchController] on usb-0000:00:1a.0-1/input0
[ 3.739534] Loading crystalhd v3.8.1

I haven't had enough time to experiment but I think Sam's instructions will be key to figuring this out: http://samiux.blogspot.com/2010/07/howto-ubuntu-1004-on-gigabyte-touchnote.html

Ubuntu on the WeTab


Update Feb 26 2011 please refer to http://wetabz.blogspot.com/2011/02/wetab-ubuntu-installation.html or full details on installing and running Ubuntu on WeTab with touchscreen enabled.
------------------------------------------------------------------------------------------------------------------------------------

Having been an Ubuntu user for a while now, it's only natural that I would want to try to bootup my WeTab with Ubuntu. Though I haven't been very successful yet, I think I am getting closer, all thanks to Joker who posted the windows 7 dual boot article on Tablet Faq.

I managed to get plop running, the binary can be got from http://www.plop.at/en/home.html, just unzip it and copy the plpbt.img file to /boot/extlinux/ and add an entry to extlinux.conf like the following:

label plop
menu label ^plpbt
KERNEL memdisk
INITRD plpbt.img

I installed then Ubuntu to a USB flash stick and used plop to boot it. Ubuntu then started up and it was able to detect the wireless card, screen and any usb devices I attached. The multitouch screen does not appear to be recognized although pressing on it causes a mouse click to register with Ubuntu...exciting stuff.

See post Multitouch on WeTab for further info.

Monday, October 25, 2010

WeTab Backup

Before doing much with any of my machine sI usually like to take backups, especially if there is any risk of completely ruining my system.

The only directions I found were from a German article and it basically said to do the following:

You will need a Hard drive large enough to contain the size of the image (16/32GB),
a USB keyboard
a WeTab.

Restart the machine and wait for the WeTab logo to appear. After a bit you will see two dots appear on the upper and lower left corners of the screen. At this point you should press on the top left corner of your WeTab (there should be an Orange LED there with a circle next to it). Hold down for 5 seconds ( a message should appear in German telling you to keep holding it down if you want to enter recovery mode or something to that effect ).

Finally you should get a Terminal window and some options regarding resetting things in the system. You can then connect a USB Drive, mount it and use the dd command to take an image of /dev/sda.

dd if=/dev/sda of=/mnt/mybackup.img

That will probably take a few of hours.

I'm not too sure how useful this backup is however. I'm not sure if the WeTab is loading a small binutils in the beginning before booting up the whole system or what but I wouldn't go crazy experimenting until someone has confirmed a way of restoring the system. I'm still looking around.

Oh yeah and all that Disclaimer stuff applies here, I'm not responsible for anybody messing their system up after reading these posts. I'm only writing this to share my journey through the WeTab with the brave of heart; if you can't handle losing your investment, stick to the official releases and updates.

WeTab wish List

Since there are only a few hours in the day and there is still so much I would like to get out of this thing, I will use this post to keep a record of what I still haven't figure out how to do.

- A good comics viewer
- remote desktop and vncviewer
- ssh/sshd just for fun
- a good PDF reader (Adobe is ok for now but nowhere as useable as the IPad viewers)
- what repositories would be ok to tap into? Do the binaries from other distributions work? I'm not too sure about how yum works so I guess I will have to read up on this.
- Create desktop icons to launch programs like evince, thunar and all that

Installed Programs

Another interesting thing to do is to look through the applications that come by default on the system. It appears that xfce4-taskmanager and a bunch of other useful apps come on the system. To get a better feel for things I ran the following:

yum list > mylist.txt

then vi mylist.txt to see what is installed and what can be installed since this appears also to list what is found in the tiitoo repositories. If any of my findings sound funny to you please feel free to correct me.

One of the programs that caught my eye was evince which is a nice document viewer that you can also start up.

Mounting SMB file shares on WeTab

So I was just messing around with my device again and cool enough, cifs is enabled on the kernel, don't know if I should have known that or not but I'm glad it is either way. This means I can mount my file shares from another pc on my network and view the files that are on that server (videos, photos, documents...etc). So very quick here is how I did it:

sudo mount -t cifs //192.168.0.1/docs /mnt/ -o username=guest,password=xxx,iocharset=utf8,file_mode=0777,dir_mode=0777

You can then run thunar from the terminal window and browse through your mounted file system or use the File Browser that comes with the system. In either case I found this pretty cool.

Sunday, October 24, 2010

WeeeeeeeeTAB!

Finally, the device I've been waiting for all this time is out. I've been following the WeTab news ever since I first heard about it. Having dealt with a lot of Apple devices before I was hoping to find a system that was designed with an Open mindset.

At a first look, some of the features of the device did disappoint me while others made me feel warm and fuzzy inside. Having had the chance to play around with my dad's IPad I've had a chance to compare the two devices.

WEIGHT and HEAT
First off, the WeTab (the 3G enabled one) is definitely bulkier than the IPad (the non 3G one). It has vents on the top and bottom that blow out warm air while the IPad has no visible ventilation routes. The Wetab heats up just a little but doesn't reach unbearable heat, the Ipad however does not heat up to the same extent of the WeTab.

SOFTWARE
The WeTab software is not as resilient as that of the IPad. For me that is not such a big issue since most open systems are community supported and will suffer due to the lack of a defined QA procedure (that's not to say that I know how Apple does its QA but I assume that organizations in general are bound to do a lot more checking than would hobbyist networks). For a normal user, IPad is the way to go, it is more presentable and was designed to be easily useable (atleast as long as you stay within the predefined user capabilities box).

WETAB INITITALIZATION
The install took a while and required that the machine connect to a Wifi network. Also configuring the Pinwand toolbar took forever, I was beginning to the think that the machine had hung.

Finally things were on their way. One step I did forget to mention is that you will have to register before the machine initializes itself and that the password you select becomes your user account's password which you will find quite useful should you ever start playing around with your terminal console (sudo).

Well, being a person that loves to get right under the hood, the first question I had was: how do I launch the Terminal Console. (WeTab run's Meego, a handheld flavor of Linux which I have not had much time to explore yet).

To get the Terminal console running you will have to start up the WeTab Market application which is WeTab's iStore double. There you can go to the Tools Category and choose to install the Terminal App ( it has an icon that says Root, my WeTab is not with me as I write but I'm just dumping what I remember and will take time to clean this up later). You might want to install Adobe Reader and Chrome as well since those will come in handy. I should like to find something nicer for Reading on the Wetab, the Adobe Reader just doesn't make the reading experience as nice as it is on the IPad. I'm optimistic that something out there can fit on the underlying linux system and better the experience.

Well, I haven't had much time to explore yet but I've already thought up a couple of things I'd like to try out. Most resources at the time are in German, very few are in English. I will try to put as much detail here that could be of use to other's experimenting with their WeTab's.

Here is the first article to catch my attention regarding doing cool things with the WeTab:
http://tablet-faq.de/wetab-forum/anleitung-windows-7-wetab-installieren-dual-boot-wetab-os-windows-7-a-355.html

The author discusses running Windows 7 on the WeTab Dual-booting it with the current Meego system. I haven't had much time to try this out yet; my thoughts were more along the lines of installing Ubuntu since it already offers a lot of programs that I find terribly useful (Readers/Dosbox/FireFox...etc.) and is still Open.

OTHER NICE FEATURES
USB connectivity makes dealing with the device a lot easier. You can copy files and access them directly off of a USB stick, hook-up a keyboard and mouse, and do most anything else you can think of that can be done through USB connectivity.

HDMI
There is a mini HDMI slot that allows you to take the output to a nice High Def Output. (Or so I would assume, haven't messed around with that yet.)

I will report more once I've had more time to experiment, this is only my second day with the lovable device, so another few days and I'll be sure to have something more interesting to report.


Cheers :)