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 10-24-2012, 01:44 PM   #16
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by lst View Post
So it doesn't look like changing rotate did anything, **however** I did get a screen full of random noise, which is sort of encouraging.
OK, so at least the framebuffer is readable and writable. Can you run geekmaster's newtrix app?
Code:
./newtrix &
while true; do /mnt/onboard/.python/eink_update.sh; done
(It gets really cool if you let it run long enough. Would be even more awesome if the screen
didn't do a full refresh every time. )
KevinShort is offline   Reply With Quote
Old 10-24-2012, 04:22 PM   #17
lst
Junior Member
lst began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: kobo wifi
Quote:
Originally Posted by KevinShort View Post
Nope. All it does is hang the Kobo. I had a look in top (without the eink_update loop) and it shows newtrix at 0 cpu in "uninterruptible sleep" mode. Which doesn't seem very active!
lst is offline   Reply With Quote
Advert
Old 10-24-2012, 04:47 PM   #18
lst
Junior Member
lst began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: kobo wifi
Dunno whether this helps. If I do something like:

Code:
[root@(none) platform]# echo DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD > /dev/fb0
[root@(none) platform]# /mnt/onboard/.python/eink_update.sh
2048+0 records in
I get a screen where the top 1/2 has (more or less) what was on the screen before, rotated 90deg clockwise, and the bottom 1/2 is black.
lst is offline   Reply With Quote
Old 10-25-2012, 10:04 AM   #19
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by lst View Post
I get a screen where the top 1/2 has (more or less) what was on the screen before, rotated 90deg clockwise, and the bottom 1/2 is black.
Interesting, the same commands have no effect on my Wifi.

Someone has offered me access to their Wifi with a 4-bit framebuffer, so I'll be playing with
that. If I figure anything out, I'll post again here.
KevinShort is offline   Reply With Quote
Old 10-29-2012, 12:53 PM   #20
aron7676
Junior Member
aron7676 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2012
Device: Kobo Wi-Fi
KevinShort has done it again, by using a raw image format, and

cat img.raw | /usr/local/Kobo/pickel showpic

we are able to update to the display of a 4 bit screen on a kobo wifi.
aron7676 is offline   Reply With Quote
Advert
Old 10-29-2012, 02:24 PM   #21
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
I've updated the first post with a link to the new weather app, and it should work on both
4-bit and 8-bit displays.

For anyone who's interested, here's the technical explanation.
Spoiler:
I looked at the raw image files on the Kobo in /etc/images, and I noticed that it seemed
to be formatted quite simply. It's just a list of hexadecimal colors, one for each pixel,
starting with the top left corner. For example, "\xff" is white, and "\x00" is black.

Here's some python code that takes an image loaded as a pygame surface and converts
it to a raw image format suitable for the Wifi.
Code:
def to_hex(color):
    hex_chars = "0123456789ABCDEF"
    return hex_chars[color / 16] + hex_chars[color % 16]
     
raw_img = ""
for row in range(surface.get_height()):
    for col in range(surface.get_width()):
        color = surface.get_at((col, row))[0]
        raw_img += ('\\x' + to_hex(color)).decode('string_escape')
f = open("/tmp/img.raw", "wb")
f.write(raw_img)
f.close()
The raw image file can be displayed with
Code:
cat img.raw | /usr/local/Kobo/pickel showpic

Last edited by KevinShort; 11-03-2012 at 11:49 AM.
KevinShort is offline   Reply With Quote
Old 11-02-2012, 08:46 AM   #22
ghalfacree
Junior Member
ghalfacree began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2012
Device: Sony PRS-505 and Kobo WiFi
Hooray - 4-bit support! Boo - I'm getting a *new* error now!

Installing the new version, setting my location and running weather.sh gets me the following:

Kobo Wifi weather forecast started.
Getting weather information . . .
Creating image . . .
list index out of range
Failed to fetch weather data.

The contents of the location file is as follows:
53.795984
-1.759398

Which is latitude and longitude for Bradford, West Yorkshire, UK. I tried setting it to New York - 40.7143528, -74.0059731 - just in case it only worked with US addresses, but still no joy - same error.

Any idea what might be causing *this* problem?
ghalfacree is offline   Reply With Quote
Old 11-02-2012, 09:31 AM   #23
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Hmm, I think that it does only work with US addresses. I tried setting my location file to
your location, and I can confirm that it does not work. However, New York should work...

I'll try to find a weather service that works globally and edit my script to use that.

Edit: I've updated the script, it should now work globally. I also added an option to use
either Celsius or Fahrenheit for the temperature.

Last edited by KevinShort; 11-02-2012 at 01:15 PM.
KevinShort is offline   Reply With Quote
Old 11-03-2012, 10:57 AM   #24
lst
Junior Member
lst began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: kobo wifi
LEGEND! Confirmed working on my 4-bit Kobo

I saw this a couple of days ago but didn't have a chance to try it - kudos for international options too.

cheers
lst is offline   Reply With Quote
Old 11-03-2012, 01:22 PM   #25
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 824
Karma: 6377682
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite
Has anyone got this working on a Kobo touch? I'm thinking about buying one second hand for this and think it looks a sleeker device without the D-pad and buttons.

Andrew
andyh2000 is offline   Reply With Quote
Old 11-03-2012, 02:43 PM   #26
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Andrew: I don't know if anyone has it working on the Kobo Touch, but I could get it to work pretty
easily. Back when I had a Touch, I had it running Tetris, so there's no doubt I could get this weather
display to work on the Touch as well.

If anyone wants it, I could upload a version of the weather app specifically for the Kobo Touch.
I won't be able to test it, since I don't have a Touch, but it should only require changing a few lines of code.

Last edited by KevinShort; 11-03-2012 at 02:48 PM.
KevinShort is offline   Reply With Quote
Old 11-03-2012, 04:52 PM   #27
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 824
Karma: 6377682
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite
Quote:
Originally Posted by KevinShort View Post
Andrew: I don't know if anyone has it working on the Kobo Touch, but I could get it to work pretty
easily. Back when I had a Touch, I had it running Tetris, so there's no doubt I could get this weather
display to work on the Touch as well.

If anyone wants it, I could upload a version of the weather app specifically for the Kobo Touch.
I won't be able to test it, since I don't have a Touch, but it should only require changing a few lines of code.
Is it as easy to enable telnet etc. on the touch?

If it's just a couple of changes, post them here and I'll pop out tomorrow, buy one and give it a go...

Andrew
andyh2000 is offline   Reply With Quote
Old 11-03-2012, 09:05 PM   #28
KevinShort
Addict
KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.KevinShort ought to be getting tired of karma fortunes by now.
 
KevinShort's Avatar
 
Posts: 348
Karma: 209937
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Quote:
Originally Posted by andyh2000 View Post
Is it as easy to enable telnet etc. on the touch?
I don't have a one-step telnet installer for the Touch, but the steps aren't hard. There are
instructions on the Wiki. If you have any trouble, just send me a message.

Quote:
Originally Posted by andyh2000 View Post
If it's just a couple of changes, post them here and I'll pop out tomorrow, buy one and give it a go...

Andrew
Here's a weather installer for the Kobo Touch. Just follow the installation instructions in the first post.
You'll probably need to stop the Kobo's GUI before you run the weather app:
Code:
killall nickel

Last edited by KevinShort; 11-04-2012 at 02:23 PM.
KevinShort is offline   Reply With Quote
Old 11-04-2012, 12:01 PM   #29
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 824
Karma: 6377682
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite
Quote:
Originally Posted by KevinShort View Post
I don't have a one-step telnet installer for the Touch, but the steps aren't hard. There are
instructions on the Wiki. If you have any trouble, just send me a message.


Here's a weather installer for the Kobo Touch. Just follow the installation instructions in the first post.
You'll probably need to stop the Kobo's GUI before you run the weather app:
Code:
killall nickel
Hi. I've managed to enable telnet and ftp on my newly aquired touch. On trying to get your new weather installer linked above I got access denied from Google. I've sent you a request to be allowed access (through Google), or maybe you'll want to make it public.

Thanks for your help with this - nearly there...

Ah, now it's downloaded - either you're quick off the mark or it was a fluke the first time. Now to see if it works!

Andrew
andyh2000 is offline   Reply With Quote
Old 11-04-2012, 12:42 PM   #30
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 824
Karma: 6377682
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite
Darn, fallen at the same hurdle as someone earlier (can't load font file). Here's a dump of what happens - I'm going to give it a rest for now and come back to it later.

Code:
[root@(none) koboWeather]# ls -la 
total 624 
drwxr-xr-x 3 root root 4096 Nov 4 17:14 .
drwxr-xr-x 3 root root 4096 Nov 4 17:07 .. 
-rwxr-xr-x 1 root root 97908 Mar 21 2011 Cabin-Regular.ttf 
-rwxr-xr-x 1 root root 169096 Jan 2 2012 Comfortaa-Regular.ttf 
-rwxr-xr-x 1 root root 16312 May 1 2011 Fabrica.otf 
-rwxr-xr-x 1 root root 303316 Oct 16 19:06 Forum-Regular.ttf 
-rwxr-xr-x 1 root root 391 Oct 20 00:07 autoupdate.sh 
-rwxr-xr-x 1 root root 42 Oct 19 17:22 cron 
drwxr-xr-x 2 root root 4096 Nov 4 17:07 icons 
-rwxr-xr-x 1 root root 12 Nov 4 17:14 location 
-rwxr-xr-x 1 root root 361 Oct 19 19:40 set_location.sh 
-rwxr-xr-x 1 root root 2 Nov 2 14:52 unit.txt 
-rwxr-xr-x 1 root root 12125 Nov 3 22:19 weather.py 
[root@(none) koboWeather]# cat location 
52.02 
-0.75 
[root@(none) koboWeather]# python weather.py 
Kobo Wifi weather forecast started. 
Getting weather information . . . 
Creating image . . . 
init kbd. 
init mouse failed. 
Traceback (most recent call last): 
File "weather.py", line 369, in get_weather_data()
File "weather.py", line 108, in get_weather_data 
display(days, highs, lows, conditions, img_links, unit)
File "weather.py", line 127, in display 
tiny_font = pygame.font.Font("Cabin-Regular.ttf", 18) 
RuntimeError: Couldn't load font file 
[root@(none) koboWeather]#
Click image for larger version

Name:	MobileAdmin.png
Views:	944
Size:	136.7 KB
ID:	95432

Andrew
andyh2000 is offline   Reply With Quote
Reply

Tags
hacking, kobo wifi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd; Kobo-purchased book reads fine on Desktop, WiFi and Sony -but not on Kobo Touch. beautifulsoup Kobo Reader 4 07-17-2012 09:29 AM
Kobo Touch in cold weather Judsuw General Discussions 15 06-02-2012 06:23 PM
Sync epubs between Kobo app and Kobo wifi? emilikins Kobo Reader 1 11-17-2011 04:12 PM
Kobo Desktop App v1.7 onboard Kobo WiFi ZombWii Kobo Reader 6 10-20-2010 12:24 PM
Forrester upgrades sales forecast by 50% xoox News 0 10-10-2009 04:11 AM


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


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