Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-06-2009, 10:58 PM   #1
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Let's play with Qt Embedded for iLiad!

I just built QT/E 4.5.2 for iLiad and made it running on iLiad. It's Qt Embedded, not just Qt. Qt for iLiad is not a problem now, except not being able to respond to iLiad key-events. For me, I want Qt only because djvulibre and djview rely on Qt. QT/E provides more than Qt. QT/E does not need X, so theoretically, it should be more effective on iLiad. That's why I want to run QT/E on iLiad. If everything goes on, applications for Zaurus may be ported to iLiad by just re-compiling. Of course, the current contentlister and ipdf must be replaced (with what?) if X is removed from iLiad.

This is only a primitive start, and still far from working. I have lots of questions. Any advice or experience about tslib, keyboard, QT, QT/E, Zaurus should be helpful.

I built tslib downloaded from http://tslib.berlios.de/, and use this option to do configure:
Code:
./configure -opensource -nomake tools -nomake demos -nomake docs -nomake translations -qt-freetype -qt-mouse-tslib -no-qvfb -embedded arm -qt-kbd-tty -qt-kbd-usb
The attached image shows the result running a QT/E application. It's a small example bundled in QT/E package. All bundled examples are built and put in dir "examples" in the attached QT/E lilbs package. I leave them for people to try.

People who want to try can download the attached files. "QtEmbedded-4.5.2-arm.part1.rar" and "QtEmbedded-4.5.2-arm.part2.rar" are QT/E libs. qtedemo.rar is the demo program which should generate a screen just as the attached image.
To install:
1. unpack QT/E libs to MMC or CF. (I put it in MMC, so there will be a dir "QtEmbedded-4.5.2-arm" in /media/card)
2. cd /usr/local
3. mkdir Trolltech
4. cd Trolltech
5. ln -s /media/card/QtEmbedded-4.5.2-arm QtEmbedded-4.5.2-arm (you should modify "/media/card/QtEmbedded-4.5.2-arm" to fit your path if not unpacked to /media/card.)
6. unpack qtedemo.rar to anywhere and execute it from contentlister. Wait for several ten-seconds, you will see a screen just as the attached image.
7. Then you have to reset your iLiad because touch-screen is not working.
Attached Thumbnails
Click image for larger version

Name:	DSCN2204.JPG
Views:	625
Size:	811.0 KB
ID:	31772  
Attached Files
File Type: rar QtEmbedded-4.5.2-arm.part1.rar (12.40 MB, 370 views)
File Type: rar QtEmbedded-4.5.2-arm.part2.rar (10.27 MB, 367 views)
File Type: rar qtedemo.rar (28.5 KB, 371 views)

Last edited by ericshliao; 07-06-2009 at 11:29 PM.
ericshliao is offline   Reply With Quote
Old 07-07-2009, 10:50 PM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Some tiny tips:

If the desired screen does not show up after waiting for one or two minutes, try tap on the pagebar button. Don't tap the pagebar button too early.

tslib-0.0.so.0 in QtEmbedded-4.5.2-arm/lib can be removed if you do "ln -s /usr/lib/libts-1.0.so.0.0.0 /usr/lib/libts-0.0.so.0".
(Added: this sentence may be misleading. I meant tslib-0.0.so.0 in QtEmbedded-4.5.2-arm/lib is duplicated and you can remove it after you do "ln -s /usr/lib/libts-1.0.so.0.0.0 /usr/lib/libts-0.0.so.0".)

Added:
By the pagebar tapping action, I guess that on iLiad, even when a QT/E app does write screen data to fbramebuffer, iLiad stiil wait for a command to start drawing e-ink screen. It should be the most tough part. Maybe modifying Qt/E source code is required. I should take a look in the source code of liberdm.

Last edited by ericshliao; 07-10-2009 at 05:37 AM.
ericshliao is offline   Reply With Quote
Old 09-20-2009, 01:46 AM   #3
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Somebody has just started to port QT/E to Kindle DX. See http://www.mobileread.com/forums/showthread.php?t=56457. He has found where to modify QT/E source code to add controlling e-ink screen refreshing. Quite impressive.
ericshliao is offline   Reply With Quote
Old 09-20-2009, 03:13 AM   #4
jonas
Junior Member
jonas began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2009
Device: iliad
I think you can have a look at http://www.onyxcommunity.com/developers
It seems they are using Qt/E.
jonas is offline   Reply With Quote
Old 10-11-2009, 12:45 PM   #5
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
The project porting QT/E on Kindle DX seems go on quite well. Here is the patched sourced code released by cdisou: http://code.google.com/p/qindle/
I should buy a USB keyboard and start playing with QT/E for iLiad.
With cdisou's pioneering efforts, I think it should be easier to port QT/E to iLiad than to Kindle DX, since iLiad has touch screen and attachable USB keyboard.

Last edited by ericshliao; 10-11-2009 at 12:49 PM.
ericshliao is offline   Reply With Quote
Old 10-15-2009, 11:58 AM   #6
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
I've just seen this fortuitously:

1. Qt Extended (discontinued by Qt/Nokia) has a unofficial continuation in "Qt Extended Improved", based on Qt Extended 4.4.3:
http://wiki.openmoko.org/wiki/Qt_Extended_Improved

2. QtMoko (a distribution for the OpenMoko Neo FreeRunner based on Debian and Qt Extended) manages to support both QtE apps and X apps.

I've read two versions: that "QtMoko x4" simply starts both X server and QTE:
http://lists.openmoko.org/pipermail/...ly/050679.html

the other version is that when in QTE , if you launch an X app using QX (a helper program), it launchs a X server for the program:
http://github.com/radekp/qtmoko/blob...ions/qx/qx.cpp

3. The touchscreen problem may be because the env variable TSLIB_TSDEVICE is not correctly adjusted before launching QTE, as in
Code:
export TSLIB_TSDEVICE=/dev/ttyS0
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
See this thread http://forum.irexnet.com/viewtopic.p...7e9654e0b785d5

Also, see "Get touchscreen working" (it's for X, but should also be relevant for QTE) in http://wiki.openmoko.org/wiki/Manual_Debian

Hope this helps .

Last edited by Antartica; 10-15-2009 at 12:00 PM.
Antartica is offline   Reply With Quote
Old 10-15-2009, 01:46 PM   #7
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Antartica, thanx for the above info. I will try the tslib config first.

Just found that QT/E 4.5.3 come out.
ericshliao is offline   Reply With Quote
Old 10-16-2009, 08:20 PM   #8
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Well, I guess that the problem of touch screen not available for QT/E is not caused by wrong tslib config, since I didn't alter the original setting of iLiad. Besides, even after I added the three "export" commands into "run.sh", touch screen is still not available for my QT/E demo application.

Maybe the problem is caused by touch screen events are preempted by X, so that QT/E won't get any touch screen signal.

To make a test, I am going to create a bootable CF with no X. The CF will start a QT/E application after booted. The problem is that I don't have a program to call screen refresh. I think that I for now just need to wait for the demo application loaded and then call a screen-refresh once to see the result. If I can get screen refreshed and touch-screen working, I will try to add screen-refresh code into QT/E. Besides, I am not familiar with the boot script of embedded Linux. I know that I have to edit those script files in /etc/init.d and /etc/rc0.d~rc6.d, but further instructions will be very helpful to me.

Last edited by ericshliao; 10-16-2009 at 08:26 PM.
ericshliao is offline   Reply With Quote
Old 10-17-2009, 08:50 AM   #9
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
I though that you were doing the experiments using a ssh shell from another computer...
To disable X from getting the events first, you have to send a SIGSTOP to the X server in the run.sh, and when you are done a SIGCONT.

ps -efa | grep Xfbdev | sed 's/ */ /g' | cut -d ' ' -f 2 | xargs kill -STOP

or something like that
Antartica is offline   Reply With Quote
Old 10-17-2009, 11:34 AM   #10
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Antartica View Post
I though that you were doing the experiments using a ssh shell from another computer...
I put the QT/E demo program (including run.sh) in MMC card and executed it on iLiad.


Quote:
Originally Posted by Antartica View Post
To disable X from getting the events first, you have to send a SIGSTOP to the X server in the run.sh, and when you are done a SIGCONT.

ps -efa | grep Xfbdev | sed 's/ */ /g' | cut -d ' ' -f 2 | xargs kill -STOP
By my very limited knowledge of shell script, I think that "ps -efa | grep Xfbdev | sed 's/ */ /g' | cut -d ' ' -f 2 | " will get certain process list from "ps" command. Pipes are still unsolved mystery for me.

What does "xargs kill -STOP" do? Killing xserver process? I don't understand what does "xargs kill -STOP" do even after reading man.

To make things simpler, I sshed into iLiad and ran "ps". I got:
Code:
root@ereader:~# ps
  PID  Uid     VmSize Stat Command
    1 root        524 S   init [5]
    2 root            SW  [keventd]
    3 root            SWN [ksoftirqd_CPU0]
    4 root            SW  [kswapd]
    5 root            SW  [bdflush]
    6 root            SW  [kupdated]
    7 root            SW  [kUCB1x00d]
    8 root            SW  [khubd]
   15 root            SW  [tffs1]
  252 root        580 S   /sbin/cardmgr
  280 root        532 S   /usr/bin/displayMgr -p
  281 root        608 S   /usr/bin/erbusyd
  284 root        608 S   /usr/bin/erbusyd
  285 root       2260 S   /usr/bin/Xfbdev -screen 768x1024x8 -3button -dpi 160
  286 root        608 S   /usr/bin/erbusyd
  288 root       4048 S   /usr/bin/matchbox-window-manager -use_titlebar no -us
  289 root       6436 S   /usr/bin/pageBar
  292 root       3876 S   /usr/bin/matchbox-panel --size 39 --no-menu --bgcolor
  333 root            SW  [wlan_main_servi]
  334 root            SW  [wlan_reassoc_se]
  432 root       3568 S   mb-applet-icon-container
  441 root        592 S   /bin/sh /etc/rc5.d/S99start start
  442 root       2332 S   /usr/bin/powerMgr
  444 root      12256 S   /usr/bin/newLister --items 12 --sync
  453 root       2332 S   /usr/bin/powerMgr
  454 root       2332 S   /usr/bin/powerMgr
  486 root            SW  [mmcblockd]
  593 root      12256 S   /usr/bin/newLister --items 12 --sync
  598 root      12256 S   /usr/bin/newLister --items 12 --sync
  607 root            SW  [usbplugd]
  608 root        512 S   /sbin/getty -L ttyS2 115200 vt100
  609 root      12256 S   /usr/bin/newLister --items 12 --sync
  610 root      12256 S   /usr/bin/newLister --items 12 --sync
  611 root      12256 S   /usr/bin/newLister --items 12 --sync
  683 root        580 S   udhcpc -n -p /var/run/udhcpc.eth0.pid -t 4 -i eth0
  686 root        624 S   ./dropbear -d ./dropbear_dss_host_key -r ./dropbear_r
  689 root        448 S   msdisk /dev/tffsa6
  690 root       1148 S   ./dropbear -d ./dropbear_dss_host_key -r ./dropbear_r
  691 root        612 S   -sh
  856 root       1160 S   ./dropbear -d ./dropbear_dss_host_key -r ./dropbear_r
  857 root        768 S   -sh
  864 root        708 R   ps
Using the above output as example, I suppose that I should execute a "xargs kill 285 -STOP" (to send SIGSTOP to Xserver) in console before starting QT/E demo and execute a "xargs kill 285 -CONT" (to send SIGCONT) after QT/E demo quitted. Right? So, my run.sh will go as:
Code:
export scriptdir=`/usr/bin/dirname $0`
export QTDIR=/usr/local/Trolltech/QtEmbedded-4.5.3-arm
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export HOME=$scriptdir
cd $scriptdir
kill 285 -STOP
./application -qws
kill 285 -CONT

Last edited by ericshliao; 10-17-2009 at 11:53 AM.
ericshliao is offline   Reply With Quote
Old 10-17-2009, 11:57 AM   #11
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
My above experiement failed. My iLiad just reboot if I execute the above "run.sh".

Another problem:
I think that I can't refresh screen manually by tapping on the pagebar icon after X server stopped. Can I?
ericshliao is offline   Reply With Quote
Old 10-17-2009, 02:53 PM   #12
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by ericshliao View Post
My above experiement failed. My iLiad just reboot if I execute the above "run.sh".
The kill command should be
Code:
kill -STOP 285
IIRC, if you put first the PID, it sends a SIGTERM, terminating the X, and reboting the iliad in our case.

Quote:
Another problem:
I think that I can't refresh screen manually by tapping on the pagebar icon after X server stopped. Can I?
Contentlister may be "paused" because of the stopped X. It depends on its internal implementation.
Antartica is offline   Reply With Quote
Old 10-17-2009, 06:49 PM   #13
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Antartica View Post
Contentlister may be "paused" because of the stopped X. It depends on its internal implementation.
Can I manualy refresh the screen through command in ssh? I guess I have to create a program to do the task.

Added:
Is it possible to use xepdmgr as a shell command to manually refresh eink screen? I guess that "EinkUpdateFull(sEink *EinkParam, int UseTyping, int Fast)" in xepdmgr_einkfb.c is just what I need. It will make iLiad draw its eink screen based on data in framebuffer, right?

Last edited by ericshliao; 10-17-2009 at 08:05 PM.
ericshliao is offline   Reply With Quote
Old 10-18-2009, 09:48 AM   #14
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by ericshliao View Post
Can I manualy refresh the screen through command in ssh? I guess I have to create a program to do the task.

Added:
Is it possible to use xepdmgr as a shell command to manually refresh eink screen? I guess that "EinkUpdateFull(sEink *EinkParam, int UseTyping, int Fast)" in xepdmgr_einkfb.c is just what I need. It will make iLiad draw its eink screen based on data in framebuffer, right?
You can do what you are requesting using "displayMgrClient", it's a command-line tool from iRex to interface with the displayMgr. You have it already installed on your iliad .

For full refresh:
Code:
# /usr/bin/displayMgrClient
For typing refresh:
Code:
# /usr/bin/displayMgrClient -p
With "displayMgrClient -h" it shows some help text.

If you want to integrate that functionality directly into QTE, what it does is as simple as to send the text "!0,1,0" to UDP port localhost:50555 (original thread with this info).
Antartica is offline   Reply With Quote
Old 10-18-2009, 07:08 PM   #15
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Ah! Thanx. I think that MgrClient is just what I need.
ericshliao is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iLiad Enable non-embedded font pdf on iLiad ericshliao iRex Developer's Corner 7 06-20-2010 02:51 PM
embedded spaces rikm Calibre 1 06-03-2010 04:08 PM
iPad Embedded Fonts JSWolf Apple Devices 24 04-26-2010 03:41 PM
Why doesn't the Iliad play to it's strengths? pdam iRex 25 10-15-2006 01:23 PM


All times are GMT -4. The time now is 07:56 PM.


MobileRead.com is a privately owned, operated and funded community.