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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2010, 01:53 AM   #1
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
Qt Platform for Kindle 2 & DX, plus Sudoku!

Okay, so here it is!

QtEmbedded compiled for the Kindle, all packaged up for the Kindle 2 and DX (thanks to the great package tool by Igor and Jyavenard)

I've only been able to try this out with v2.3 software. It's also only been able to try it on a Kindle 2 Global Wireless and a Kindle DX U.S. Wireless. It seemed to work, but there are no guarantees (and the next update could easily cause a problem).

Normal disclaimers about bricking your Kindle apply.

The Qt platform and plugins are free to use for Kindle app development. I'll be putting up a simple sample app with source code and a few scripts to go along with the packager soon.

I'm also including a Sudoku game, which is really great for this platform.

Please let me know how it goes for you.

Darron
darron is offline   Reply With Quote
Old 01-30-2010, 03:58 AM   #2
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi


I didn't even know there is an edition for the framebuffer Let's see how difficult it is to write a simple text editor and to handle the update area right

Edit: And I wasted the last week toying with the java framework on the kindle *argh*

Last edited by jft; 01-30-2010 at 04:08 AM.
jft is offline   Reply With Quote
Old 01-30-2010, 05:06 AM   #3
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
F***. Can't wait to start programming Also saw, that there is a texteditor demo included in the embedded SDK.

So your HotkeyManager implements Pointer Management, Display Management and Character Input and all I have to to is write an app, start it with the -qws -display KindleFb option as client and I am done. Right?

Last edited by pshrynk; 02-03-2010 at 09:03 AM. Reason: Please keep it PG rated! Thanks!
jft is offline   Reply With Quote
Old 01-30-2010, 05:25 AM   #4
whitepaper
Member
whitepaper began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jul 2009
Device: Kindle DX
This is good work! Any efforts in building a more universal runtime on DX is attractive. Does this mean there is a clear layer for E-Ink display manipulation? It looks like some other guys also had made improvements on this, but there is still no clear API revealed.

Also it is interesting to see what SDK can be released by Amazon later, it should be not so powerful that QT ..

Last edited by whitepaper; 01-30-2010 at 05:40 AM.
whitepaper is offline   Reply With Quote
Old 01-30-2010, 10:25 AM   #5
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
jft: yeah, that's about it. Just copy the su.sh hotkey script in /usr/local/Trolltech/hotkey-scripts to some other hotkey combination, and point to your app.

The fiveway as a pointer is pretty bad. It's a worse hardware interface than the keyboard in that the keyboard at least can track multiple keys at once. The fiveway will release say the up key when it starts with the left key... so you can't even go diagonally. I tried to implement a little pointer acceleration, but the delay with the screen updates makes it pretty hard to use.

A generic text implementation would need some popup menu for the symbol key... I don't implement that in the keyboard driver. About the only place Sudoku would have benefited was the save game text boxes, so I haven't done that yet. I may take a stab at it in the same app.

You can do whatever you want with the screen now.

The only serious limitation is really in that the Java framework currently has to be shut down and restarted when you quit your app. It'd be nice if there was a little Java booklet that would let you select apps, and throw up a blank screen that never updated so the framework wouldn't have to be killed... although making sure it quit last and allowed the home screen to repaint correctly might be a little tricky. I also thought about altering the display, keyboard, and fiveway Linux drivers to allow one handle to disable all the others temporarily...

I also don't currently have any hooks into notification that the device is going to sleep. Without the framework, there's no screensaver. So, it could look to the user like it locked up. Sudoku throws up a "your Kindle may be asleep" screen at 4 minutes and 50 seconds without keyboard activity.

If you forget to wire up your script correctly, then F + W does that for you. N + F if you forget to shut it down first.
darron is offline   Reply With Quote
Old 01-30-2010, 07:30 PM   #6
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
Okay, It made Slashdot.org!

How's it working for people? I need to know if it's horribly broken pretty soon now!
darron is offline   Reply With Quote
Old 01-30-2010, 11:17 PM   #7
kawaisoonano
Member
kawaisoonano began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2010
Device: kindledx
can anyone tell me what the advantage with applying QT platform?
just to play shudoku game?
kawaisoonano is offline   Reply With Quote
Old 01-31-2010, 12:45 AM   #8
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
Well, Sudoku is written for Qt, so it's required if you want to try it out. Qt is simply a great library programmers can use to help them write applications.

The thing here is that the Qt library was made to work on the Kindle, and that in turn was used to make Sudoku. There will probably be at least a few more apps using it from other people in a while.

If you don't care much about Sudoku, and you aren't a programmer... I'd wait until there was a more compelling reason to potentially void your warranty. Let some early adopters figure it out, improve on it...
darron is offline   Reply With Quote
Old 01-31-2010, 03:40 AM   #9
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
Sorry no progress here atm. Tried to build my own cross compiling toolchain yesterday but no success (somebody noticed there isn't an arm target in the glibc 2.5 library supplied by amazon??) So I will also use scratchbox.

Are you thinking about publishing the code of your drivers? Or do you have a vcs hosting the code somewhere? I think it would be great to have an organised platform so other can contribute to that project and improve it. At least I am interested
jft is offline   Reply With Quote
Old 01-31-2010, 11:13 AM   #10
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
I'm going to publish the keyboard and fiveway code, that's almost a certainty. We'll see about the e-ink plugin.

The keyboard and fiveway code could use some work. They're bare bones right now. The keyboard obviously could use a popup for the SYM key, for starters.

I've got a little bit to work on first, but I'll set up probably a SourceForge project in a few days/weeks.
darron is offline   Reply With Quote
Old 02-01-2010, 01:03 AM   #11
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
DairyKnight's Avatar
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
This is great work!

If possible, I'd like to learn more about how the e-ink driver was implemented.
Porting qt embedded to Kindle is not really a new thing, and someone has already done this (http://code.google.com/p/qindle/ - seems this project's dead). But fully functional e-ink driver and keyboard with sample program is a true breakthrough.

Hope details would be published soon. And more people would join the Kindle development community. It'll be cool to see programs like Poppler ported to Kindle.





Quote:
Originally Posted by darron View Post
Okay, so here it is!

QtEmbedded compiled for the Kindle, all packaged up for the Kindle 2 and DX (thanks to the great package tool by Igor and Jyavenard)

I've only been able to try this out with v2.3 software. It's also only been able to try it on a Kindle 2 Global Wireless and a Kindle DX U.S. Wireless. It seemed to work, but there are no guarantees (and the next update could easily cause a problem).

Normal disclaimers about bricking your Kindle apply.

The Qt platform and plugins are free to use for Kindle app development. I'll be putting up a simple sample app with source code and a few scripts to go along with the packager soon.

I'm also including a Sudoku game, which is really great for this platform.

Please let me know how it goes for you.

Darron
DairyKnight is offline   Reply With Quote
Old 02-01-2010, 01:27 AM   #12
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
I just updated my download page to include a sample project. You'll need a cross-compiling environment to use it. (Scratchbox works well) It's got some simple packaging script and a hotkey (D + M for demo) to run once installed.
darron is offline   Reply With Quote
Old 02-01-2010, 09:31 AM   #13
jft
Enthusiast
jft began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jan 2010
Location: Germany
Device: Kindle DXi
Got everything working. Even the demos work like a charm. I haven't found a README in your packages describing the keymap.

So for everybody else:

Home -> Home
Prev -> Page Up
Next -> Page Down
Back -> Backspace
Menu -> Menu
Sym -> Tab
aA -> Super L

Only modifier is Shift.

The problem with the framework is kind of frustrating. Just an idea:

I think it is possible to change the name for the /dev/input devices - lets say event[23]. Now our hotkey_manager listens on them and retrieves all the events. If there are other qws clients just the app gets the key events. If there is no other client we pipe the original data into our named pipes /dev/input/event[01]. So we stop the framework form interfering with our Qt apps but have a working framework after Qt app shutdown.

Last edited by jft; 02-01-2010 at 09:51 AM.
jft is offline   Reply With Quote
Old 02-01-2010, 05:28 PM   #14
jyavenard
Zealot
jyavenard has a complete set of Star Wars action figures.jyavenard has a complete set of Star Wars action figures.jyavenard has a complete set of Star Wars action figures.jyavenard has a complete set of Star Wars action figures.
 
Posts: 141
Karma: 383
Join Date: Sep 2009
Device: Kindle 2
Quote:
Originally Posted by jft View Post
Sorry no progress here atm. Tried to build my own cross compiling toolchain yesterday but no success (somebody noticed there isn't an arm target in the glibc 2.5 library supplied by amazon??) So I will also use scratchbox.
For the toolchain ; use
OSELAS.Toolchain-1.99.3/arm-1136jfs-linux-gnueabi/gcc-4.1.2-glibc-2.5-binutils-2.17-kernel-2.6.18 built with

http://www.oselas.com/software/ptxdi...st-1.99.11.tgz
http://www.oselas.com/software/ptxdi...11-patches.tgz
http://www.oselas.com/oselas/toolcha...99.3.1.tar.bz2

You could also use the buildroot tools ; everything is automated ; no need to worry about the 3 stages of GCC compiling etc...
jyavenard is offline   Reply With Quote
Old 02-01-2010, 11:52 PM   #15
darron
Enthusiast
darron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with othersdarron plays well with others
 
Posts: 30
Karma: 2600
Join Date: Dec 2009
Device: Kindle DX
I'm going to be pretty busy in the near term... but is there anything that would help you guys out? I'm waiting on some stuff to happen before I release any plugin code. I'm also almost totally reworking the keyboard plugin to be easily portable to other platforms.

You seem to have the toolchain down (I assume, it's different than mine)

Does the hotkey stuff make sense?

There's something minor wrong with the e-ink plugin, I think... the sample project doesn't update the screen properly the very first time. I forced the background to change a few times to sort of hide that. If anyone's noticed problems with simple paintEvent() style QMainWindow classes that's the culprit. The current big ugly hack is to have a counter and force the background to change once or twice after the app first starts. Subwidgets on the main window don't seem to have this problem.

Just some quick notes/thoughts:

I'm installing apps in the /usr/local/Trolltech/apps folder. Maybe it should be something else besides "Trolltech", but that directory is required by the default QtEmbedded compile... so I just used that. (That path can be changed by command-line options to configure, but that looks long and possibly error-prone, so I didn't mess with it) My current system is for single-file apps to go in that folder directly, and for apps with data to have a single subdirectory there (for easy uninstalls).

QSettings is a great class to use for easily persisting state. I'm using the IniFormat of that, and putting app data in /mnt/us/system-kindleqt/etc.

The uninstall_qt package blows away -everything-, at the moment. It destroys /mnt/us/system-kindleqt and /usr/local/Trolltech, and pulls the /etc changes. The /mnt/us/system-kindleqt/etc folder may be better off in a location safe from deletion... but if they're removing this stuff for software update purposes I decided extreme prejudice was the way to go.
darron is offline   Reply With Quote
Reply

Tags
kindle, kindle apps, qtembedded

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS+: Enhanced firmware for Sony Reader, Folders, Games & more kartu Sony Reader Dev Corner 4136 02-24-2014 12:07 PM
Ended M-Edge Platform Jacket & eLuminator2 for Kindle 2 simplyparticular Flea Market 2 07-08-2010 11:43 PM
Gizmodo & GigaOm on Kindle as a Platform kjk News 5 07-04-2010 06:16 PM
Annotations & cross platform.. fragile Other formats 0 04-21-2010 01:04 PM
$0.01 in Kindle Store: Interactive Sudoku for Kindle 2 and Kindle DX - Volume 1 Xia Deals, Freebies, and Resources (No Self-Promotion) 2 11-07-2009 10:06 AM


All times are GMT -4. The time now is 02:47 PM.


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