Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-20-2014, 05:25 PM   #406
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by HaoZeke View Post
I've noticed that starting either koreader or coolreader immediately runs a killall nickel (amongst some other processes).
This is only the case if you start koreader or coolreader via fmon from nickel. If you start for instance koreader by selecting "start koreader" in the Kobo Start Menu, nickel etc. are not killed, because they are not running at this point anyway.

Quote:
Originally Posted by HaoZeke View Post
However I was wondering if it is not required to kill any other alternative readers while opening one? Like if I run koreader, cthere should be a killall coolreader or some such? (Unfortunately I don't know the process names for koreader and coolreader)
The reason why one has to kill nickel is, that nickel does not give the user any option to exit it, the only "regular" way to exit nickel is to power off. Koreader and Coolreader, on the other hand let the user exit them. Therefore, there is no need to kill them.
tshering is offline   Reply With Quote
Old 07-20-2014, 06:18 PM   #407
HaoZeke
Enthusiast
HaoZeke began at the beginning.
 
HaoZeke's Avatar
 
Posts: 28
Karma: 10
Join Date: Jul 2014
Device: Kobo Aura HD
Quote:
Originally Posted by tshering View Post
This is only the case if you start koreader or coolreader via fmon from nickel. If you start for instance koreader by selecting "start koreader" in the Kobo Start Menu, nickel etc. are not killed, because they are not running at this point anyway.


The reason why one has to kill nickel is, that nickel does not give the user any option to exit it, the only "regular" way to exit nickel is to power off. Koreader and Coolreader, on the other hand let the user exit them. Therefore, there is no need to kill them.
Thanks for clearing that out
HaoZeke is offline   Reply With Quote
Advert
Old 07-24-2014, 02:53 PM   #408
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Is it possible to create a screenshot from KSM with this command? If it is, could a script be created such that it can be called from nickel (by opening an image, like exit_nickel, etc.) and it takes a screenshot after some delay?
Jellby is offline   Reply With Quote
Old 07-24-2014, 03:25 PM   #409
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
If the Kobo fb is a standard 16bpp fb, fbgrab should do the trick. I only have Kindle builds on hand, though.
NiLuJe is offline   Reply With Quote
Old 07-24-2014, 06:06 PM   #410
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Jellby View Post
Is it possible to create a screenshot from KSM with this command? If it is, could a script be created such that it can be called from nickel (by opening an image, like exit_nickel, etc.) and it takes a screenshot after some delay?
It is possible, but ...
Since several FW updates nickel rotates the screen. Under older FWs, I converted the screenshots made on a Kobo Touch by using the values 800x1280, this resulted in an acceptable image, but with a huge black border on one side; or using the values 800x600 with results in an acceptable image without additional border. (This is at least how I seem to remember it.)

Now, with recent FWs, I convert with the values 608x1792 (I find these values with fbset). This results in an acceptable image, but with an even huger black border as before. So this should somehow be improved. I did not yet really look into this.

Making screenshots by executing a script file via fmon, is not very convenient, because of the timing problem. It is much easier do make it via telnet.

If you really want to do it via fmon, try this.
KSM provides the scriptfile .kobo\kbmenu\fmonsh\run_test_script.sh, which is associate with kbmenupngs\run_test_script.png. The script file is empty, as its purpose is to be ready for tests. For simplicity let us use it now.

The new content for .kobo\kbmenu\fmonsh\run_test_script.sh is
Code:
#!/bin/sh
kbmenudir=/mnt/onboard/.kobo/kbmenu
sh $kbmenudir/scripts/screenshot.sh &
Now the content of screenshot.sh
Code:
#!/bin/sh
targetfile=/mnt/onboard/screen_$(date +%Y%m%d_%H%M%S).raw
sleep 30
cat /dev/fb0 > $targetfile
You will probably want to change the sleeping time according to your needs.

Edit: Later we could try using the screen saver package to make screenshots with the power slider instead of fmon. This should be much more convenient.

Last edited by tshering; 07-28-2014 at 03:39 AM.
tshering is offline   Reply With Quote
Advert
Old 07-25-2014, 04:00 AM   #411
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Thank you for the explanation, I'll try the script when I get the chance.

Quote:
Originally Posted by tshering View Post
Making screenshots by executing a script file via fmon, is not very convenient, because of the timing problem. It is much easier do make it via telnet.
The advantage of a script is that it is stand-alone, no other device is needed, which means you could take a screenshot of something you notice while reading on the beach, for example.

How can I use telnet (or ssh)? Can it be done through wifi or must I use usbnet? Just point me to some post/webpage that works with 3.5.0 and KSM, if there is such thing
Jellby is offline   Reply With Quote
Old 07-25-2014, 04:38 AM   #412
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Jellby View Post
The advantage of a script is that it is stand-alone, no other device is needed, which means you could take a screenshot of something you notice while reading on the beach, for example.
If we can start the script with the hook library that the screen saver uses, its usage might be convenient.

Quote:
Originally Posted by Jellby View Post
How can I use telnet (or ssh)? Can it be done through wifi or must I use usbnet? Just point me to some post/webpage that works with 3.5.0 and KSM, if there is such thing
For telnet with usbnet, cf. the first spoiler of this post. For telnet with wifi, see this post.

@NiLuJe, thank you for pointing to fbgrab.
tshering is offline   Reply With Quote
Old 07-25-2014, 01:37 PM   #413
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@tshering: I'm fairly certain this won't be that useful compared to the upstream version since Kobo uses 16bpp fb, but here's the tweaked version I came up with to handle the whole range of weird Kindle fbs

(If you do end up needing to tweak the code, I'd be happy to merge those changes).
NiLuJe is offline   Reply With Quote
Old 07-25-2014, 02:46 PM   #414
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
This is my first screenshot, using the script. Strangely, two files were created with 5 seconds of difference in the filename (they were identical). For the conversion I used 1014x768. The black pixels in the bottom right corner are invisible in the device (even under the bezel), and they make the "usable" screen 1014x758. Still, when setting the offsets for KSM (some posts above) I had to assume the screen height is 1024, not 1014.

(The "header" is coded in the book, the footer generated by nickel (patched).)

EDIT: And the device is actually full-color (I didn't see further double screenshots, so it must have been a glitch or a double-tap).
Attached Thumbnails
Click image for larger version

Name:	screen_20140725_202611.png
Views:	390
Size:	51.4 KB
ID:	125845   Click image for larger version

Name:	screen_20140725_205204.png
Views:	388
Size:	127.8 KB
ID:	125847  

Last edited by Jellby; 07-25-2014 at 03:05 PM.
Jellby is offline   Reply With Quote
Old 07-25-2014, 07:19 PM   #415
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by NiLuJe View Post
@tshering: I'm fairly certain this won't be that useful compared to the upstream version since Kobo uses 16bpp fb, but here's the tweaked version I came up with to handle the whole range of weird Kindle fbs

(If you do end up needing to tweak the code, I'd be happy to merge those changes).
Thank you! It is nice that fbgrab outputs already a usable format. Monochrome is also nice for some purposes. The main problem is that nickel changes the fbsettings and this seems to be a problem that we might want to address. I myself do not know sufficiently about fb and graphic formats to do the necessary changes.

Without nickel running the settings are:
Code:
[root@(none) ~]# fbset
mode "800x600-0"
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
        geometry 800 600 800 1280 16
        timings 0 0 0 0 0 0 0
        accel false
        rgba 5/11,6/5,5/0,0/0
endmode
With nickel running:
Code:
[root@(none) ~]# fbset
mode "600x800-0"
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
        geometry 600 800 608 1792 16
        timings 0 0 0 0 0 0 0
        accel false
        rgba 5/11,6/5,5/0,0/0
endmode

I attach two screenshots made with fbgrab, and two of the same screens with cat /dev/fb0 and conversion with ffmpeg.

I do not know about the other models, but on the Kobo Touch I need to convert the screenshots of Kobo Start Menu applications with -s 800x600; and the screenshots of nickel with -s 608x800, I have additionally to cut off the 8 pixel on the right border (-vf crop=600:800:0:0).
Attached Thumbnails
Click image for larger version

Name:	ksmwebbrowser_fbgrab.png
Views:	459
Size:	33.2 KB
ID:	125860   Click image for larger version

Name:	nickel_fbgrab.png
Views:	396
Size:	32.0 KB
ID:	125861   Click image for larger version

Name:	nickel_cat.png
Views:	948
Size:	35.0 KB
ID:	125862   Click image for larger version

Name:	ksmwebbrowser_cat.png
Views:	431
Size:	48.0 KB
ID:	125863  
tshering is offline   Reply With Quote
Old 07-25-2014, 08:07 PM   #416
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@tshering: Ha, it shouldn't take much to fix that . Part of it is similar to what I had to tweak for the K5 .

I can take a look at it if you both provide me with the output of fbgrab -v, and a raw fb0 dump in those two cases?
NiLuJe is offline   Reply With Quote
Old 07-26-2014, 09:28 AM   #417
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by NiLuJe View Post
@tshering: Ha, it shouldn't take much to fix that . Part of it is similar to what I had to tweak for the K5 .

I can take a look at it if you both provide me with the output of fbgrab -v, and a raw fb0 dump in those two cases?
I was hoping that you will say this. Thank you for looking into it.
Attached Files
File Type: zip screenshotsKT.zip (182.4 KB, 161 views)
tshering is offline   Reply With Quote
Old 07-26-2014, 12:41 PM   #418
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@tshering: Thanks, I'll take a look at it .

Quick question: are you rebuilding it or using a Kindle binary? Because I can't reproduce the 'green' issue w/ your dumps (at least on x86, will check on ARM later).
NiLuJe is offline   Reply With Quote
Old 07-26-2014, 01:09 PM   #419
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by NiLuJe View Post
@tshering: Thanks, I'll take a look at it .

Quick question: are you rebuilding it or using a Kindle binary? Because I can't reproduce the 'green' issue w/ your dumps (at least on x86, will check on ARM later).
I was using your binary.
tshering is offline   Reply With Quote
Old 07-26-2014, 02:51 PM   #420
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@tshering: Hmm. Strange, I couldn't reproduce it on ARM either. (EDIT: Which binary did you use? The K5 one should be the closest one, although softfp, not that it matters that much here).

[EDIT²: Meh, my bad, I only put a single binary in there. Keep the previous comment in mind for when I'll update the package, though].

Well, the good news is, it was slightly off in every cases anyway, so I ended up porting KOReader's maths (again ;p).

I'm making sure that I didn't break anything in Kindle-land, and I'll update the post .

Last edited by NiLuJe; 07-26-2014 at 03:22 PM.
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kobo menu and message tshering Kobo Developer's Corner 26 01-15-2014 09:18 AM
Kobo WiFi - Battery indicator outside menu? Cyberman tM Kobo Reader 1 03-06-2013 04:42 AM
Kobo constantly crashes back to Reading menu avalanches Kobo Reader 0 04-11-2011 09:35 PM
main menu, section menu, css for calibre mobipocket output naisren Calibre 2 08-23-2010 11:42 PM
Calibre start menu icon Cy1clown Calibre 1 02-06-2010 02:10 PM


All times are GMT -4. The time now is 09:00 PM.


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