Topic: touchscreen woes

i am unable to calibrate my touchscreen.   the unit does not respond to my touch....though it does respond enough to get me into "special options" screen when I touch the screen at startup, which leads me to believe that the internal connection to the screen is fine.   i have tried the ts_settings posted on the chumby tricks wiki page to no avail.   

at this point, i'm kind of stuck as I don't have wireless configured just yet, so i'm unable to drop down to a shell via ssh.   i've tried attaching a usb keyboard as well but how do i get it to go the console instead of starting the control_panel?

i've opened up the unit, and taken out the microsd, and the partitions appear to be as follows (and nothing seems to be corrupted).

/dev/sda1 - boot loader i'm assuming.  can't mount it since it's probably not ext2/ext3/ext4
/dev/sda2 & /dev/sda3 - both contain the same size filesystem and same data.      which one is considered the "primary" OS partition? sda2 or sda3?  i am assuming they are replicated such that if one gets foobar'ed, the device can be booted off the other.  is that correct?

/dev/sdb4 - psp data among other things.  i've tried nuking this partition completely to start from scratch so that the defaults get restored, but still the touchscreen doesn't calibrate.   if i delete this partition , it gets recreated at boot time by chumby scripts with the remaining space available.   

Please help!   i am not quite convince the TS is bad since it does respond at boot time.

other things i've tried include loading up a armstrong silvermoon image, which works fine with a keyboard but my preference is to use the device as is for video playback for the kids .

thanks for your help!

Re: touchscreen woes

wanted to add that if i start up the device normally then it goes through the demo swf file, and then gives me options to "play again, never play again, etc" but i can't select any of those since the touchscreen is so badly calibrated, nothing responds. 

stuck at this point...any pointers?

Re: touchscreen woes

My guess is that you'll need to return it to BBY.

The two partitions you mentioned ping pong - neither is the definitive "primary".  If one fails to boot, or is in the process of begin updated, the other becomes the default boot partition.

Re: touchscreen woes

duane, thanks for the response.   unfortunately, returning the unit is not an option as this was purchased through ebay.   simple question, how can i drop to a shell at boot time?  i don't mind alternating files on the internal microsd OR following whatever procedure is necessary on an external jumpdrive to override /psp/ files.

what i would like to do is run the calibration binary (ts_calibrate?) manually after dropping down to the shell... (dunno if that would make any difference?)

thanks for your help!

Re: touchscreen woes

If it's a Infocast 3.5", you can just plug in a USB keyboard, and you should get a console on the display.

For the Infocast 8", if you have network, then you can start up sshd with a "debugchumby" script on a USB drive.

6 (edited by desidude2000 2011-12-28 17:29:41)

Re: touchscreen woes

thanks for the pointers.  it is the infocast 8" model.

i don't yet have network.  it is getting wifi configured (without having touchscreen!) that has been very troublesome for me.
what can i create on a USB drive (i read about a network_config file) that would put the unit online?  network_config file seems to be a step in the right direction, but not exactly sure about the syntax or it's details.  Any documentation that you have to that extent would help greatly.

for sshd, would an empty file on a USB drive called "start_sshd" do it?  if need be, i can pull out the microSD and touch a start_sshd into the /psp/ directory on /dev/sda4.  (however, doesn't sshd require host certs to be created before it can start?)

thank you for your help.

edited: for typos

Re: touchscreen woes

Yes, if you make a properly formed "network_config" file and use "debugchumby" to copy it to /psp, then sync, you should be able to reboot to get a connection.

It's just an XML file which contains the network settings for the currently configured network.  I've updated the wiki entry to be a bit more helpful.

Something like (untested):

#!/bin/sh
echo "<configuration username=\"\" nameserver2=\"\" nameserver1=\"\" gateway=\"\" netmask=\"\" ip=\"\" allocation=\"dhcp\" key=\"0011223344\" encoding=\"hex\" encryption=\"WEPAUTO\" auth=\"WEP\" hwaddr=\"\" ssid=\"MyAccessPoint\" type=\"\" />" > /psp/network_config
touch /psp/start_sshd
sync
start_network

Re: touchscreen woes

thanks...i'm in!

chumby-29-53-95:~ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               178488    109722     59550  65% /
tmpfs                    62560        48     62512   0% /tmp
none                     32768        32     32736   0% /var
none                     32768         0     32768   0% /mnt
/dev/mmcblk0p4         1520924     35984   1407680   2% /mnt/storage
none                     32768        24     32744   0% /dev

chumby-29-53-95:~ # uname -a
Linux chumby-29-53-95 2.6.28-M2.1.8.12 #1 Thu Dec 9 13:04:27 PST 2010 armv5tejl GNU/Linux


not sure where to go from here though to fix the touchscreen issues.  LOL .

what's the difference between ts_settings and ts_hid_settings (and ts_hid_settings.default)?

also i noticed that when I do a "ps -ef" i don't see the process associated with the touchscreen calibration that is running.  what gives?

9 (edited by desidude2000 2011-12-29 12:35:43)

Re: touchscreen woes

i think i might be onto something here.  /dev/input/ts0 is missing! 


chumby-29-53-95:/mnt/storage/psp/install # tscat
tscat v0.16 - reading from /dev/input/ts0 - fbColor=7cee - ctrl-C to end
Read settings: x,y offset = 136,3835; range = 3768,-3540; flip = 0,0
Error: cannot open /dev/input/ts0 (errno=2): No such file or directory


chumby-29-53-95:/dev/input # ls -l
total 0
drwxr-xr-x    2 root     root            60 Dec 31  1969 by-id
crw-r-----    1 root     root       13,  64 Dec 31  1969 event0
crw-r-----    1 root     root       13,  63 Dec 31  1969 mice
crw-r-----    1 root     root       13,  32 Dec 31  1969 mouse0

will read-up on /dev/input related devices and how they're created....

Re: touchscreen woes

found a script that may help, and here's what i get when i run it.

chumby-29-53-95:/usr/chumby/scripts # ./assert_ts_calibration.sh --force
./assert_ts_calibration.sh - using VIDEO_X_RES=800, VIDEO_Y_RES=600
Calibration not required but --force option specified
Running touchscreen calibration for HID interface
Using 4:3 aspect for 800x600, CONFIGNAME=silvermoon_a0
Adobe FlashLite 3.1.7 Release (Version 9,1,122,0)- Chumby Industries (version 9 build 107-3548 [GCC 4.3.2])
Portions copyright (C) 2005-2010 Chumby Industries, Inc.
Built for: silvermoon; Features: Video ALSA ARM-optimizations
Build time: Thu 09Dec2010 1317
2011-12-29 13:46:00 TRACE: preload.swf v1.02
2011-12-29 13:46:00 TRACE: ts_calibrate v0.15
2011-12-29 13:46:00 TRACE: Original stage width,height = 800 X 600
2011-12-29 13:46:00 TRACE: Flashplayer built for platform silvermoon
2011-12-29 13:46:00 TRACE: using tsdev = 0
2011-12-29 13:46:00 TRACE: screen width = 800; height = 600
2011-12-29 13:46:00 TRACE: Setting initial x range to 0..3200, y range to 0..2400
2011-12-29 13:46:00 TRACE: Setting calibration to xoff,xrange;yoff,yrange;xyswap = 0,3200; 0,2400; 0
2011-12-29 13:46:00 TRACE: Moving target to stage 0
2011-12-29 13:46:02 TRACE: Mouse down at 46,214 (bogus values!)

Re: touchscreen woes

If it's any help, here are the contents of the /psp files for calibration on my I8:

/psp/ts_hid_settings:

177,716,869,-665,0

/psp/ts_settings:

136,3768,3835,-3540

I believe the touchscreen presents as "/dev/input/mouse0".  You should get output if you do:

cat /dev/input/mouse0 | hexdump

...and swipe your finger on the touchscreen.

Re: touchscreen woes

thanks....that helps verify that ts cable is not loose and it is sensing the touch for sure!

chumby-29-53-95:/mnt/storage/psp # cat /dev/input/mouse0 | hexdump
0000000 8118 1872 00d2 b138 088e 1432 5c08 081e
0000010 2157 7308 380f 81a5 0028 08c9 3404 8118
0000020 187f 14cd 7f28 2881 e97f 7f08 0800 006a
0000030 cb38 38f2 eaa4 9038 38ea ee97 9b38 28ef
0000040 d27f 7f08 0800 006c c438 38f2 ee81 fd18

rebooting right now with your ts_settings to see if it helps!

Re: touchscreen woes

thanks...still no go on the touchscreen.   though it's very puzzling since the kernel module (silvermoon_tsb) is loaded properly (tried loading silvermoon_ts instead but it appears that maybe for the 3.5" version, the silvermoon_tsb is the correct driver for the unit), dmesg shows no errors that stand out, and clearly the screen is responding to the touch (as seen by the post above!)

in any case, i hacked around a little more, and updated to chumby 1.8.2 code.  (put rfs.tar.gz from chumby 1.8.2 on /dev/sdb2 and /dev/sdb3).    hacked further by changing "/psp/firsttime" to 0 instead of 1 in an attempt to get it to boot further, and now i have this beautiful (and latest looks like) chumby screen with channels,apps, music,photos&video, alarms, and EVEN chumbrowser! :-)   it says "5.0.34" in the upper right hand corner.   looks amazingly beautiful,  but too bad touchscreen still won't work.  if i touch anything on the screen, it does become "highlighted" but it fails to respond to the command.   arrrrgggghhhhhh!!! i just wish the TS would work!   starting to get frustrated now so will come back to it...

one thing i noticed that was quite interesting is that there is lircd.conf (means at some point someone in the lab loaded LIRCD on this thing and left it's residues on rootfs) plus there is configure_remote.sh script.   if i can't get TS to work, any docs on getting LIRC to work with the chumby UI?    (i use LIRCD on my mythtv setup so i have some experience with it.  would just need to figure out how i can get the lirc kernel modules to compile and then the chumby control panel would need to support lirc and be a lirc client).

truly wish there was something i can do to get this TS working again...

Re: touchscreen woes

Holy digging up an old thread, Batman!

I've got a new (to me) I8 that is exhibiting similar problems.  In regular boot, it appears it doesn't work.  The touchscreen must work in some manor because I can hold it and the bootloader will boot to special options.  Once there, it brings up calibration.  I can press for the corners and center, but when trying to drag the ball from A to B, it seems nowhere on the screen will register a grab of A (I tried a number of places to see if it was inverted or scaled or something).

I then pulled the bottom, got a TTL->Serial converter and started tinkering.

Things I've tried:
• The TS settings Duane listed in this thread to see if they'd help.  They didn't.
• Removing /psp/ts_hid_settings and /psp/ts_settings altogether
• Running "assert_ts_calibration.sh --force"
• Running "cat /dev/input/mouse0 | hexdump -C" to see that it is registering presses

Should I write a quick little C app to read the kernel's input system coordinates to see if it appears the screen is giving valid input, upgrade the firmware version?  Give up and use this as a non-touchscreen photo frame?

What can I run with console to dive into this with more detail?

Linux Guy - Occasional Chumby Hacker

Re: touchscreen woes

I tried a couple more things, still without success.

• I was looking in the scripts and saw that removing the calibration file in /psp only causes a default from /mnt/storage to be copied in place, so I temporarily moved the one from there aside, and changed the line in the "else" block to run "assert_ts_calibration.sh --force".  Upon reboot it did run a slightly different looking calibration which wrote out a file very similar to the original one on /mnt/storage, but still no dice.

It seems like the low-level stuff works, but for some reason the control panel or something isn't happy with what it sees.  Because of this I thought maybe there was some other ts calibration settings nested in some scripts/configuration of the flash player or something, so I:

• Re-imaged the SD card with 1.0.5 from this post.  It booted slightly differently since it was a fresh boot.  On the console I saw a couple runs of fdisk/dd/mkfs before it started playing the "welcome" video, and still no working touchscreen...

Any other suggestions?

# cat /mnt/storage/ts_hid_settings.default
181,706,869,-666,0
# cat /psp/ts_settings
136,3768,3835,-3540

Do those seem sane?  I don't know what the values mean exactly, but I might start digging deeper (touchscreen driver source?).

Linux Guy - Occasional Chumby Hacker

Re: touchscreen woes

Looks like I'm talking to myself here.  I built a custom debug driver from the kernel source tree and think I see the problem.  Looks like the X value is screwed up on this touchscreen.  Not sure how that happens, but it's most likely a straight hardware issue.  I didn't look at the code yet, just built it and loaded with "debug=1":

[ 5914.967516] ts: ---------------pen down
[ 5914.993037] x: 4081, abs_x: 0, y: 70, abs_y: 1
[ 5914.997504] ts: ---------------pen down
[ 5915.023053] x: 4081, abs_x: 0, y: 70, abs_y: 1
[ 5915.027560] ts: ---------------pen down
[ 5915.053046] x: 4081, abs_x: 0, y: 71, abs_y: 1
[ 5915.057521] ts: ---------------pen down
[ 5915.083043] x: 4081, abs_x: 0, y: 74, abs_y: 1

The range in y values from left to right across the screen appear to be between ~55 and ~130 and the range in x values from top to bottom of the screen is between 4080 and 4082.

Looks like this'll be a picture frame.

Linux Guy - Occasional Chumby Hacker

Re: touchscreen woes

You might feel you are talking to yourself. Others are listening, just don't have anything of value to add. Wish I did.

Tar, feathers, congress. Some assembly required.

Re: touchscreen woes

I'm busily being impressed at the expertise being applied to this problem.

I don't usually get down to those depths in hardware, being more of a 'keep the os running' sort of fellow.

I wonder, though, if there might be something repairable in the touchscreen encoder.  I haven't ever tried to disassemble one to see what parts there are, whether there might be a loose connection or something?

my first thought would be to disconnect and clean the ribbon cable attachement between the screen and mobo.

Cleaning up any loose bits and bytes.

Re: touchscreen woes

You might check to see it there's something stuck between the bezel and the touchscreen on the left side.

This might also be fixable by reseating the ribbon cable.

Re: touchscreen woes

Duane wrote:

You might check to see it there's something stuck between the bezel and the touchscreen on the left side.

This might also be fixable by reseating the ribbon cable.

Just did both of these (only reseated the ribbon cable to the mainboard, not if it disconnects from the screen itself).  Unfortunately no change.  The screen range according to my debug driver still has the same values.  This was the first time I've disassembled an I8, pretty easy disassembly.  Any other ideas?

Is there any info on the two large headers I see?  One has a "CP jtag" label (crypto processor?) the other has "CPU jtag".  Both have way more pins than just jtag.  GPIO? I2C? SPI?

The CPU one is where the RTC battery goes, and the CP one is where the CF slot is.

Linux Guy - Occasional Chumby Hacker

Re: touchscreen woes

details on the i8 mainboard: http://www.bunniestudios.com/blog/?p=1140

Cleaning up any loose bits and bytes.

Re: touchscreen woes

Next time I'm at storage, I'll see if there are some I8 parts laying around.

Re: touchscreen woes

Duane wrote:

Next time I'm at storage, I'll see if there are some I8 parts laying around.

Duane, I really appreciate the offer, but I'll say save it for somebody else.  I've had enough karma here in the chumbiverse and knew the touchscreen was damaged when purchasing this I8.  I have other potential projects that don't require the touchscreen.  If it was some simple software fix or something like reseating the connector, I'm in, but if it drains you of stock for somebody who might only have one I8, I'd rather they get their hands on a replacement screen.

Linux Guy - Occasional Chumby Hacker

Re: touchscreen woes

You could donate it to Duane for repair/refurbishment/salvage smile