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-09-2014, 06:19 AM   #1
sunspot
Junior Member
sunspot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2014
Device: Kobo touch N905+N905C
writing to the screen

Could someone please point me in the right direction?

I intend to link a Kobo Touch to an external Arduino microprocessor (lots of IO) via rs232

I want to create .sh scripts that send text to the screen to show data from the external micro.

I will hope to run Debian or Android when my N905C arrives (I got a N905 first through ignorance)

I could set up an internal web server and write pages for a web browser but I was hoping for a simpler method.

I guess I need Python or similar?

Can someone point me to a "Hello world" tutorial for Kobo text or image screen writes?



If it all works I will share the results here -
http://www.sunspot.co.uk
sunspot is offline   Reply With Quote
Old 07-09-2014, 07:22 AM   #2
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
The Kobo Start Menu includes an executable kbmessage, which depends on some Qt libraries (also included in the package). There a two ways of calling it:
Code:
kbmessage 'Hello world!'
Code:
kbmessage -f /mnt/onboard/hello_world.txt
It supports a limited set of html tags. As for images, currently only png and bmp are supported.
kbmessage needs user interaction to be closed. So this migth not fit well your needs, but of course you can kill it before calling it again with new content.

The KoboLaucher includes an executable msgbox. Maybe this would be the better choice for you. I never tried to call it myself however. So I don't know exactly how to do it, but it should not be to difficult.

The original kobo software includes an executable pickel, which can display images in raw format. It is mostly used in this way:
Code:
zcat someimage.raw.gz | /usr/local/Kobo/pickel showpic 1;

You could also be interested in this.

Last edited by tshering; 07-09-2014 at 07:35 AM.
tshering is offline   Reply With Quote
Advert
Old 07-09-2014, 09:52 AM   #3
sunspot
Junior Member
sunspot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2014
Device: Kobo touch N905+N905C
Thanks - I guess that is for the original firmware?
Would that be the same in Debian or Android where I guess you could use Firefox etc for html
I suppose they have some sort of screen driver - perhaps even the same?
sunspot is offline   Reply With Quote
Old 07-09-2014, 10:23 AM   #4
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 sunspot View Post
Thanks - I guess that is for the original firmware?
Right, I overlooked that you intend to run Debian or Android.
tshering is offline   Reply With Quote
Old 07-09-2014, 04:27 PM   #5
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Alternative, Koreader is scripted in Lua and you can script your own App reusing its base. If you did Lua before, that might be interesting. Qt embedded, as used by Start Menu and others, would be another option for more complex UIs.
hawhill is offline   Reply With Quote
Advert
Old 07-09-2014, 04:45 PM   #6
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
You can also use anything that can write to a Linux framebuffer (or even install Xorg on Debian). Although since the display is e-ink, you will need to manually refresh the screen. There are examples on how to do that somewhere around here in the dev corner.
KevinShort is offline   Reply With Quote
Old 07-09-2014, 04:54 PM   #7
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by hawhill View Post
Alternative, Koreader is scripted in Lua and you can script your own App reusing its base. If you did Lua before, that might be interesting. Qt embedded, as used by Start Menu and others, would be another option for more complex UIs.
There is also Sergey's original effort he lays out a lot about using it.

Also "Xsoar"
And this.


Luck;
Ken

Last edited by Ken Maltby; 07-09-2014 at 05:07 PM.
Ken Maltby is offline   Reply With Quote
Old 07-10-2014, 06:34 AM   #8
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Quote:
Originally Posted by KevinShort View Post
Although since the display is e-ink, you will need to manually refresh the screen. There are examples on how to do that somewhere around here in the dev corner.
Here it is: https://www.mobileread.com/forums/sho...6&postcount=11

Anyway I think that kbmessage will be more simple to use.

Last edited by Lucas Malor; 07-10-2014 at 06:41 AM.
Lucas Malor is offline   Reply With Quote
Old 07-11-2014, 05:51 AM   #9
sunspot
Junior Member
sunspot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2014
Device: Kobo touch N905+N905C
Many thanks to all!!!

Most useful when my N705C arrives.
My N705 seems to have no serial port! - surely it is hiding somewhere or how would the first developers test it?
BTW
I have found that the old N705 can be left in browser mode and the WIFI keeps going. It makes a good interface to a screen-less router on the network that publishes web page data - with big graphical buttons for greenhouse water control etc
sunspot is offline   Reply With Quote
Old 07-11-2014, 10:01 AM   #10
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by sunspot View Post
Many thanks to all!!!

Most useful when my N705C arrives.
My N705 seems to have no serial port! - surely it is hiding somewhere or how would the first developers test it?
There are likely labeled contact points on the PCB, there are three on the AuraHD's PCB. I am planning on attempting to add Bluetooth using one.



Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 07-11-2014, 11:09 AM   #11
sunspot
Junior Member
sunspot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2014
Device: Kobo touch N905+N905C
There are none - but there are a few very tiny gold spots that some robot probe might have touched during testing. They are not really large enough to solder to.

I wonder if they are on the pcb side on the back of the display but I hesitate to remove the display - but certainly there is no line of 4 holes for a set of pins.
sunspot is offline   Reply With Quote
Old 07-11-2014, 11:21 AM   #12
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
Not sure whether this can help you, but here is some related information concerning the mini.
tshering is offline   Reply With Quote
Old 07-12-2014, 05:42 AM   #13
sunspot
Junior Member
sunspot began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2014
Device: Kobo touch N905+N905C
I am finding the built in web browser very useful.

I have my LAN router create a repeating web page that, just for a test, updates a time display every minute. Make the router put this at the top of the web page it creates.
<meta http-equiv="refresh" content="60">

The display is so clear

You can put all the power away from the Kobo (use a router, Raspberry Pi etc) and just use Kobo standard firmware - let the auto-updates do their worst!

And just use the cheap Touch N705 on WIFI.
WIFI just keeps going with the browser active.

I have some background notes at http://www.sunspot.co.uk/Projects/sweexproject.htm - menu item 14 - half way down the page.
See "Web page control and display"
sunspot is offline   Reply With Quote
Old 10-28-2014, 06:25 AM   #14
traycold
Connoisseur
traycold doesn't littertraycold doesn't litter
 
Posts: 63
Karma: 196
Join Date: Oct 2010
Device: Kobo Glo Hd, Kobo H2O2
hi all,
I'm trying to write a sort of "toast" notification message to the screen, when nickel is running.
My use case is:
  • I modified the Night Mode in a way so that when the screen is inverted, a script "/mnt/onboard/.kobo/button_longpressed.sh" is invoked;
  • this script do something in the background (actually, it syncs a folder with dropbox);
  • when it ends execution, I would like the user is informed with a sort of popup / toast notification showing a message like "operation XXX completed, status YYY".
I just miss now the latest step, i.e. to display a notification.
Reading this thread, I tried invoking pickel at the end of my script:
Code:
zcat someimage.raw.gz | /usr/local/Kobo/pickel showpic 1;
but, while the image of pickel is correctly shown, then apparently the nickel rendering is totally messed up (meaning: the application itself still works, the touchscreen input is processed, but what appears on the screen is sort of random pixels).
I also tried with KoboLauncher msgbox utility, but it didn't display anything (probably it needs the correct Qt environment to work).

Do you think there is in theory a way to do what I described above? or it's impossible to make other tools write to the screen when nickel is active?

Thanks

EDIT 28/10/2014 13:20: apparently I found a solution: after executing pickel, it's necessary to restore the rotate value for nickel, so the code should be something like:
Code:
ROTATE_NICKEL=$(cat /sys/class/graphics/fb0/rotate);
zcat someimage.raw.gz | /usr/local/Kobo/pickel showpic 1;
echo $ROTATE_NICKEL > /sys/class/graphics/fb0/rotate
In my case, the rotate value good for nickel is 3, but is set to 0 after running pickel.

Last edited by traycold; 10-28-2014 at 08:24 AM.
traycold is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Large screen ereaders - suggestions 9"screen size or greate epj Which one should I buy? 13 02-15-2013 04:58 AM
kobo touch - white writing on white screen Elisabethe Kobo Reader 9 01-23-2013 10:41 AM
Ermine upgrade and writing on the eInk screen Tunney enTourage eDGe 6 09-28-2011 06:20 PM
Screen getting textured while writing sarikan iRex 3 03-30-2009 04:11 PM


All times are GMT -4. The time now is 08:49 AM.


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