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: 735
Karma: 2528718
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
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: 422
Karma: 289160
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: 735
Karma: 2528718
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 ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 206176
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 ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.yoq ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 206176
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: 735
Karma: 2528718
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: 422
Karma: 289160
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
Connoisseur
ksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blueksiflhjla8 can differentiate black from dark navy blue
 
Posts: 59
Karma: 13124
Join Date: Jul 2008
Device: Kobo Aura HD
I used a big resistor and it works. Thank you
Attached Thumbnails
Click image for larger version

Name:	IMG_8848.jpg
Views:	467
Size:	278.1 KB
ID:	121344  
ksiflhjla8 is offline   Reply With Quote
Old 04-22-2014, 07:42 PM   #116
Cecell3000
Enthusiast
Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.Cecell3000 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 303048
Join Date: Feb 2013
Location: Brazil
Device: Kindle Paperwhite 3
Attached Thumbnails
Click image for larger version

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

Name:	Picture 10b.jpg
Views:	430
Size:	772.2 KB
ID:	121982  
Cecell3000 is offline   Reply With Quote
Old 05-31-2015, 04:53 AM   #117
Stremon
Member
Stremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a Texan
 
Posts: 24
Karma: 18454
Join Date: Dec 2014
Device: Kobo glo
Quote:
Originally Posted by yoq View Post
I would add a wired resistor like this:

It's not the right one though, it should be 3x orange (33k or a bit higher)
Thanks for this great mod, I did it with a normal size resistor, and it is working really well!
There is just one strange thing; now when the backlight is on, the kobo emit a hiss sound from the place the resistor is... No hiss when the backlight is off.
I tried removing the resistor and putting it back again, but the hiss is still here.
Do you have a hiss too on your device? If no, is there anything I can check to find what's wrong?
thank you
Stremon is offline   Reply With Quote
Old 05-31-2015, 07:02 AM   #118
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Must be leaking electrons causing the hiss.
PeterT is offline   Reply With Quote
Old 05-31-2015, 08:03 AM   #119
Stremon
Member
Stremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a TexanStremon might easily be mistaken for a Texan
 
Posts: 24
Karma: 18454
Join Date: Dec 2014
Device: Kobo glo
Quote:
Originally Posted by PeterT View Post
Must be leaking electrons causing the hiss.
sorry if that's a stupid question, but what does it mean?
Stremon is offline   Reply With Quote
Old 05-31-2015, 08:46 AM   #120
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Was a joke.....
PeterT 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 05:57 AM.


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