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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2013, 02:56 PM   #106
demondog
Enthusiast
demondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankinddemondog has exceeded all limitations known to mankind
 
Posts: 27
Karma: 17282
Join Date: Oct 2011
Device: kobo touch
ok thanks yoq
demondog is offline   Reply With Quote
Old 09-30-2013, 07:29 AM   #107
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 549
Karma: 2516376
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Quote:
Originally Posted by KevinShort View Post
I was looking at a strace of nickel today, and found that the Glo's frontlight is controlled by ioctl calls to /dev/ntx_io. I hacked together some quick C code to control the light:
Code:
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>

int main(int argc, char *argv[])
{
    if ( argc != 2 ) {
        printf("Usage: %s brightness \n", argv[0]);
        return 1;
    }
    
    int light;

    // Open the file for reading and writing
    if ((light = open("/dev/ntx_io", O_RDWR)) == -1) {
        printf("Error opening ntx_io device");	
    }

    int brightness = atoi ( (argv[1]) );
    ioctl(light, 241, brightness);

    return 0;
}
I've attached the source code and the compiled program below.
Thanks, Kevin

Is it possible to get the current frontlight level?
sergeyvl12 is offline   Reply With Quote
 
Enthusiast
Old 09-30-2013, 08:17 AM   #108
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 414
Karma: 288418
Join Date: May 2011
Device: Kobo Glo and Aura HD
Quote:
Originally Posted by sergeyvl12 View Post
Thanks, Kevin

Is it possible to get the current frontlight level?
That has been investigated for koreader use, but we couldn't find any way to do that reliably.
giorgio130 is offline   Reply With Quote
Old 09-30-2013, 08:55 AM   #109
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 549
Karma: 2516376
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Quote:
Originally Posted by giorgio130 View Post
That has been investigated for koreader use, but we couldn't find any way to do that reliably.
Thanks, I didn't find it also. Probably nickel keeps this value deep inside

The one solution I see for now is intercepting ioctls (LD_PRELOAD) but I don't like it...

Last edited by sergeyvl12; 09-30-2013 at 11:10 AM.
sergeyvl12 is offline   Reply With Quote
Old 09-30-2013, 03:20 PM   #110
yoq
Developer
yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.
 
Posts: 75
Karma: 197622
Join Date: Apr 2013
Location: Europe
Device: Kobo Glo
Quote:
Originally Posted by sergeyvl12 View Post
Is it possible to get the current frontlight level?
The easiest way, (but rather cpu heavy) is to scan dmesg as every change is printed to the log.

But there are other options:
The kernel source for the backlight driver is at arch/arm/mach-mx5/mx50_ntx_io.c, but there is no ioctl to get the current level. It shouldn't be too hard to implement a new one, but how many users will want to change their kernel for that

A more hacky way: Since we are root, we can simply fetch the content of the last_FL_duty variable from kernel memory:
Code:
hexdump -s 0x803ba614 -n1 -v -e '"%d"' /dev/kmem
Of course, the address will be off as soon as a new kernel build is released. Does anyone know how often they do this? I know they did when they changed the toolchain, but other than that?

Last edited by yoq; 10-01-2013 at 12:23 PM. Reason: fixed command: -v to also show '0'
yoq is offline   Reply With Quote
Old 10-09-2013, 06:54 PM   #111
yoq
Developer
yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.yoq can program the VCR without an owner's manual.
 
Posts: 75
Karma: 197622
Join Date: Apr 2013
Location: Europe
Device: Kobo Glo
not helpful?
yoq is offline   Reply With Quote
Old 10-10-2013, 03:44 PM   #112
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 549
Karma: 2516376
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Thanks!

I decided to not use the nickel frontlight level. It's difficult to get it from nickel and it's completely impossible to tell nickel the level that I selected in the KoboLauncher...
sergeyvl12 is offline   Reply With Quote
Old 10-11-2013, 04:51 AM   #113
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 414
Karma: 288418
Join Date: May 2011
Device: Kobo Glo and Aura HD
The same for Koreader, having to register a memory address for each device and possibly changing with firmware updates is a nightmare to maintain.
giorgio130 is offline   Reply With Quote
Old 12-02-2013, 06:27 PM   #114
png
Junior Member
png began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2013
Device: Kobo Glo
Hey Yoq! I've been lurking this forum since I got my Kobo glo and your resistor hack worked perfectly. Thanks for taking the time to share your knowledge. I agree with you that the 30k resistor works best for this purpose. I've tried a 25k, 27k and 30k resistor. You can get a very dim screen with the 27k at 1% brightness but it tends to quite flicker a bit. I don't recommend 25k because the light is off at the lowest brightness. I'm using the night mode hack along with the resistor hack and its great for reading at night.
png is offline   Reply With Quote
Old 04-07-2014, 02:53 AM   #115
ksiflhjla8
Enthusiast
ksiflhjla8 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jul 2008
Device: iLiad, Kobo Glo
I used a big resistor and it works. Thank you
Attached Thumbnails
Click image for larger version

Name:	IMG_8848.jpg
Views:	86
Size:	278.1 KB
ID:	121344  
ksiflhjla8 is offline   Reply With Quote
Old 04-22-2014, 07:42 PM   #116
Cecell3000
Member
Cecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toysCecell3000 shares his or her toys
 
Posts: 16
Karma: 5652
Join Date: Feb 2013
Location: Brazil
Device: Kobo Glo
Attached Thumbnails
Click image for larger version

Name:	Picture 9c.jpg
Views:	54
Size:	647.7 KB
ID:	121981   Click image for larger version

Name:	Picture 10b.jpg
Views:	46
Size:	772.2 KB
ID:	121982  
Cecell3000 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
Odyssey Odyssey HD FrontLight available for preorder Chi Cygni Bookeen 66 12-21-2012 02:55 AM
Frontlight + touchscreen + moths GeoffR Kobo Reader 7 12-12-2012 05:21 PM
Kobo Glo vs Cybook Odyssey Frontlight Magean Which one should I buy? 4 11-30-2012 06:50 AM
Frontlight: How to reset? WS64 Bookeen 18 11-26-2012 04:47 AM
Odyssey Odyssey HD FrontLight battery Gardenman Bookeen 4 11-12-2012 03:46 AM


All times are GMT -4. The time now is 06:33 PM.


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