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 05-05-2012, 04:33 PM   #1
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
eips 5.1.0

eips is a custom eink support program for kindles, that until now had no source code and no documentation except that it listed a single line showing command line parameters it will accept.

I just discovered that after the 5.1.0 upgrade, this is what you now get from eips with no parameters:
Code:

usage:
to print strings: eips [row] [col] [-h] string
		 -h for highlighted text
to show image: eips -g|-b image_path [-w waveform -f -x xpos -y ypos -v]
		 -g for png, -b for bitmap
		 -w waveform can be gc16 gl16 or du, default is gc16
		 -f for full update, default is partial update
		 -x -y in units of pixels
		 -v for inverted picture
to paint a retangle on screen: eips -d l=a,w=b,h=c [-x xx -y yy -w wf]
		 a is gray level in hex, b is width, c is height, with optional xx yy location, waveform mode
to clear display: eips -c 
to paint checker: eips -q 
to paint grayscale: eips -l 
to paint pattern: eips -p 
to paint barcode: eips -r barcode
to print fb info: eips -i

This is MUCH better than just experimenting and hoping to find something useful in the previously undocumented parameter list (using startup scripts as examples).

I already knew most of these, but the ones I did not know how to use look quite useful. I like that "paint a gray rectangle" option, and the bitmap support.

Thanks amazon and lab126!

while :;do eips -q -wdu;usleep 130000;eips -v -q -wdu;usleep 130000;done (K5)


Last edited by geekmaster; 05-05-2012 at 04:42 PM.
geekmaster is offline   Reply With Quote
Old 05-05-2012, 10:28 PM   #2
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I traced eips and discovered why the 5.1.0 firmware update broke programs that used the mxcfb.h header file to define the mxcfb_update_data structure, and the structures contained in that structure, and the structures contained in those structures (3 levels deep).

For some VERY STRANGE REASON, lab126 added two new fields used for histogram analysis to the eink update structure. But instead of adding the new fields to the end of the structure (before or after other rarely used fields), they INSERTED them into the middle of the structure, between update_marker and temp, relocating critical fields inside the structure.

That means that 5.1.0 breaks ALL EXISTING programs that do ioctl calls to do eink updates. To make it worse, the new structure layout has the SAME NAME as the old one, and the header file containing it also has the same name. That way you cannot include both header files in the same program to support multiple kindle models (or even different firmware SUBVERSIONS of the same K5).

This is a huge problem that locks application programs to specific MINOR versions of the kindle touch firmware if they use these header files or structure definitions. And NOT using the headers is bad because of the nested structure definitions.

How could this pass any peer review or quality control checks at lab126 or amazon?

Last edited by geekmaster; 12-09-2012 at 06:45 PM.
geekmaster is offline   Reply With Quote
Advert
Old 05-06-2012, 01:19 AM   #3
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I have a working hack so I can support both 5.0.x and 5.1.x firmware. It is a pain that they did this, but at least I have a workaround for their serious foul-up on eink updates. But... my workaround will make area updates difficult until I implement a more robust solution. Too many lines of my "condensed" code will be dedicated to what was previously a single line of code to do eink updates. Bad lab126!
geekmaster is offline   Reply With Quote
Old 05-06-2012, 06:51 AM   #4
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I'm a newbie here....just two questions:
- if I send "eips 10 10 hello", how can I delete this printed string using a shell command?
- I know the range for row is 0:608 and for col 0:800 but do eips need the value in hex, dec or what else?

Thanks a lot!!!
silver18 is offline   Reply With Quote
Old 05-06-2012, 07:26 AM   #5
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by silver18 View Post
I'm a newbie here....just two questions:
- if I send "eips 10 10 hello", how can I delete this printed string using a shell command?
- I know the range for row is 0:608 and for col 0:800 but do eips need the value in hex, dec or what else?

Thanks a lot!!!
If you send "eips 10 10 hello"
Does it start on col/row ten or on col/row sixteen?
Next question.
knc1 is offline   Reply With Quote
Advert
Old 05-06-2012, 08:23 AM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post

That means that 5.1.0 breaks ALL EXISTING programs that do ioctl calls to do eink updates. To make it worse, the new structure layout has the SAME NAME as the old one, and the header file containing it also has the same name. That way you cannot include both header files in the same program to support multiple kindle models (or even different firmware SUBVERSIONS of the same K5).

- - - -

How could this pass any peer review or quality control checks at lab126 or amazon?
"All existing programs" includes the programs in the Amazon system image.

Perhaps a short note in the de-bricking sticky about always using a matched kernel/system image pair?

Otherwise we may never hear the end of "I can't de-brick my..." from people using a 5.0.4 kernel with a 5.1.0 image or 5.1.0 kernel with a 5.0.4 image.

- - - -

A related question:
Is this e-ink driver a module?
My reasoning -
If it is, then it should be possible to build the new driver module so that it can be loaded into the old kernel (making the old kernel compatible with the new system image).

Just a thought tossed out for someone with time on their hands and a working Kindle kernel build environment.
knc1 is offline   Reply With Quote
Old 05-06-2012, 10:34 AM   #7
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by silver18 View Post
I'm a newbie here....just two questions:
- if I send "eips 10 10 hello", how can I delete this printed string using a shell command?
- I know the range for row is 0:608 and for col 0:800 but do eips need the value in hex, dec or what else?

Thanks a lot!!!
This request is almost IDENTICAL to one I answered in the past. The answer is out there in this forum ready to be found with a search...

EDIT: Just print a line of spaces on top of it to erase it. To display "hello" for one second, do this:
PHP Code:
eips 10 10 "hello"
sleep 1
eips 10 10 
"     " 
The values are decimal numbers. The string should be in double-quotes.



Last edited by geekmaster; 05-06-2012 at 11:44 AM.
geekmaster is offline   Reply With Quote
Old 05-06-2012, 10:48 AM   #8
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
"All existing programs" includes the programs in the Amazon system image.
Yes, that is why they recompiled everything that uses the eink header file instead of fixing that structure in the header file. It locks all recompiled programs to ONLY work with 5.1.x and not with 5.0.x if they need to do eink display updates.
Quote:
Originally Posted by knc1 View Post
Perhaps a short note in the de-bricking sticky about always using a matched kernel/system image pair?
Done! I added a message at the top of the first post, and again just above the forensic image download link.
Quote:
Originally Posted by knc1 View Post
A related question:
Is this e-ink driver a module?
My reasoning -
If it is, then it should be possible to build the new driver module so that it can be loaded into the old kernel (making the old kernel compatible with the new system image).
If we load a new kernel mode eink driver, or load a new kernel with kexec, that would make it a bit hard to integrate my native-mode apps with kindlets like I want to (in a client-server arrangement, perhaps communicating via shared files if necessary).
Quote:
Originally Posted by knc1 View Post
Just a thought tossed out for someone with time on their hands and a working Kindle kernel build environment.
I want to build custom kernels too. Could you please share pointers or links showing what cross-tool versions, headers and librarys I need, etc. ? A link to a little tutorial would be nice to save time experimenting with options. Thanks! (I wish I had more time...)
geekmaster is offline   Reply With Quote
Old 05-06-2012, 11:07 AM   #9
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post
I want to build custom kernels too. Could you please share pointers or links showing what cross-tool versions, headers and librarys I need, etc. ? A link to a little tutorial would be nice to save time experimenting with options. Thanks! (I wish I had more time...)
"Life" in the form of "Spring time Clean&Fix" is still taking all my waking hours, all Kindle projects are gathering dust here.

But someday...
(Like when it gets too hot to venture outside without an air conditioned haz-mat suit.)

The most likely thing I will do is "port" http://OpenPlayer.org over to http://KnetConnect.com (a file copy between directories + a new MySQL def.).
With only a change to the banner graphic.

I sort of like that layout, the "resources" section has some indexed "HowTo" articles (on MIPS Media Player stuff).
So only the banner, topic (Kindle/ARM) and article collection will change.

One of the things that you probably want is a "cheat sheet" like this:
http://openplayer.org/resource/tutor...-matching.html
Only for the FreeScale/Amazon ARM SoC
And maybe one for the ARM SoC on the 3G card.

Just don't anyone hold their breath.

Last edited by knc1; 05-06-2012 at 11:16 AM.
knc1 is offline   Reply With Quote
Old 05-06-2012, 11:51 AM   #10
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I suppose somebody ought to do something with the dithermation.* domains too. My collection of unused domain names that I keep renewing is getting rather long. I let a bunch of interesting domain names expire a few years ago to save money, and somebody grabbed them and put them up for sale for thousands of $USD each.


Last edited by geekmaster; 05-06-2012 at 11:53 AM.
geekmaster is offline   Reply With Quote
Old 05-07-2012, 07:43 AM   #11
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by geekmaster View Post
This request is almost IDENTICAL to one I answered in the past. The answer is out there in this forum ready to be found with a search...

EDIT: Just print a line of spaces on top of it to erase it. To display "hello" for one second, do this:
PHP Code:
eips 10 10 "hello"
sleep 1
eips 10 10 
"     " 
The values are decimal numbers. The string should be in double-quotes.


Thanks really a lot!
I came to the same solution after I realized that eips doesn't add any layer on the screen!

Anyway, I dreamed all night about using eips from a WAF to change dinamically what's written in the so called status bar (or title bar).
It's a shame WAFs no longer have access to these commands...
silver18 is offline   Reply With Quote
Old 05-07-2012, 08:52 AM   #12
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Nice...playing around with ieps I got a blank screen (after eips -c) and I can't get out of it.
Even "shutdown -r now" doesn't work.
I can connect using ssh both with usb and wifi but I can't get the kindle to restart.
Any help?

EDIT: all eips commands work...simply I can't return to the home screen of the Kindle even with pressing the home button or pressing the power button!!

EDIT_2: "restart framework" got me out of the blank screen...

Last edited by silver18; 05-07-2012 at 09:15 AM.
silver18 is offline   Reply With Quote
Old 05-07-2012, 11:46 AM   #13
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by silver18 View Post
Anyway, I dreamed all night about using eips from a WAF to change dinamically what's written in the so called status bar (or title bar).
It's a shame WAFs no longer have access to these commands...
It's definitely possible, as the web browser is doing it as well. WAF can send lipc commands (though "how" is something you'll have to figure out by yourself ).

Here's an example from the command-line:
Code:
lipc-set-prop com.lab126.pillow configureChrome '{"appId":"com.lab126.booklet.home","titleBar":{"clientParams":{"secondary":"Hello silver18","useDefaultPrimary":false}}}'
This changes the title of the home screen (if it's currently shown). Substitute by your own app id, or just remove the entire appId key/value pair to set the title for whichever app is currently shown.

Turning debugOn.sh and then looking at the logs also shows some other interesting stuff, like how the search bar can be changed etc. Here's a raw dump of what appears in my log after opening a book.

Code:
{"appId":"com.lab126.booklet.reader","searchBar":{"clientParams":{"searchProviders":[{"launcher":"","label":"Dieses Buch","sendTextOnType":false,"id":"com.amazon.ebook.booklet.reader.plugin.search.SearchPlugin"}],"profile":{"name":"default","buttons":[{"handling":"system","id":"store"}]}}},"titleBar":{"clientParams":{"secondary":"My Book","useDefaultPrimary":false}}}
And no, I didn't find a way to completely hide the title bar, otherwise I would have told you The reader app shows that it's possible, but this may indeed be functionality that is not accessible from lipc and/or WAF.
ixtab is offline   Reply With Quote
Old 05-07-2012, 12:07 PM   #14
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by ixtab View Post
It's definitely possible, as the web browser is doing it as well. WAF can send lipc commands (though "how" is something you'll have to figure out by yourself ).
Wow, I didn't ever notice that!! Browser shows which page you're viewing, just like what I would like to do!

Gotta study how...I think browser folder is the first place where to search.

And as regards the logs, do I need just to use ";debugOn" and then ";dm" to dump to documents, don't I?
silver18 is offline   Reply With Quote
Old 05-07-2012, 12:13 PM   #15
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by silver18 View Post
And as regards the logs, do I need just to use ";debugOn" and then ";dm" to dump to documents, don't I?
Quite probably. I'm usually doing it directly from SSH (debugOn.sh / debugOff.sh / showlog -f / showlog|grep XXX etc.)
ixtab is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 05:45 PM.


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