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 05-05-2023, 01:57 PM   #256
hello_world.c
Junior Member
hello_world.c began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2023
Device: K4
Quote:
Originally Posted by NiLuJe View Post
(Keep in mind that, on Kindle, USBNetwork ships a full build, so you don't actually need to install anything, unless you need some stuff from newer versions, as USBNet currently lags a bit behind).
Yes I had seen your note but I tried entering fbink in ssh and it didn't work, "which fbink" didn't return anything and I couldn't find the binary by poking around, so I am not sure it's in there. I had installed the Update_usbnetwork_0.57.N_k4_install.bin from kindle-usbnetwork-0.57.N-k4.zip.
hello_world.c is offline   Reply With Quote
Old 05-05-2023, 03:47 PM   #257
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,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
IIRC, `which` is broken on Kindle (for... fuse proxy reasons, I think).

Also, I may have some PATH shenangians going on in ZSH, so try in that shell instead?

And, I imagine, the broken manual install of this package may very well have screwed things up, too ;o).
NiLuJe is offline   Reply With Quote
Advert
Old 12-20-2023, 03:14 PM   #258
tigertomjones
Junior Member
tigertomjones began at the beginning.
 
tigertomjones's Avatar
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle PW2
FBInk: Rotate Viewport for Kindles?

Hello everyone!

First of all, thank you NiLuJe, for all your contributions! Specially for fbink, which I'm happily using from my python script on my jail broken Kindle PW2.

I'm currently working on putting my kindle into a photo frame and displaying our family calendar on it. Unfortunately, I now placed it in landscape format in the frame, but the default way of using fbink is printing stuff in portrait mode (same orientation as the stock UI, KUAL, etc. at least on the Kindle PW).

So my question would be: is there an easy way rotate everything that fbink prints on the screen (open type text, image, etc.)?
tigertomjones is offline   Reply With Quote
Old 12-20-2023, 03:43 PM   #259
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,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
For images, you could rotate your input data on your end (e.g., Pillow probably has a gazillion ways to do something like that), but that won't help for text drawn by fbink.

Which leaves rotating the framebuffer entirely via `fbdepth` (or `fbink_set_fb_info`).

If the native framework is still running (specifically, X11), that *will* upset it, though .

Last edited by NiLuJe; 12-20-2023 at 03:47 PM.
NiLuJe is offline   Reply With Quote
Old 12-22-2023, 10:51 AM   #260
tigertomjones
Junior Member
tigertomjones began at the beginning.
 
tigertomjones's Avatar
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle PW2
ok thank you! Do you think it's feasible to do all graphic generation (text, elements, ...) on pillow and then just print the output as images? Sounds like not so ideal performance wise, but haven't tried it yet.
tigertomjones is offline   Reply With Quote
Advert
Old 12-22-2023, 01:05 PM   #261
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,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
That'd be a perfectly viable approach, AFAICT.
NiLuJe is offline   Reply With Quote
Old 12-22-2023, 04:15 PM   #262
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,581
Karma: 87456643
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by tigertomjones View Post
ok thank you! Do you think it's feasible to do all graphic generation (text, elements, ...) on pillow and then just print the output as images? Sounds like not so ideal performance wise, but haven't tried it yet.
Ultimately almost any display that does images sensibly actually only does images. Systems with API for text etc that drive such displays are just using a text to image software written by the OS or gfx subsystem developers and often video games bypass all that.

In some situations it improves performance.
Quoth is offline   Reply With Quote
Old 01-21-2024, 04:41 PM   #263
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Hi,

Im playing a bit with the daemon mode, is there a reason you can load only one ? I tried to run two, but the second one does nothing. (even when I set FBINK_NAMED_PIPE=/tmp/something_else)

It would be nice to run a second one, like this (a bit like the -g logo= option)
fbink -y-20 -pm -d pipe=/tmp/pipe_stdout,5
fbink -y-14 -pmh -d pipe=/tmp/pipe_stderr,2

Its a very nice tool, must have taken quite some time to create
bitfreak is offline   Reply With Quote
Old 01-21-2024, 05:52 PM   #264
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,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@bitfreak: There's no limit, that's just not the right syntax . (So what's happening with what you quoted is that it's just attempting to use the default path twice, which obviously doesn't work. c.f., logread, you'll see the error messages).

Specifically, -d is not a suboption, it only takes a single value, the amount of lines.
The pipe's path can only be customized via an env var.

Code:
FBINK_NAMED_PIPE=/tmp/root/fb_1 fbink -y -14 -d 2
FBINK_NAMED_PIPE=/tmp/root/fb_2 fbink -y -20 -d 5

Last edited by NiLuJe; 01-21-2024 at 05:54 PM.
NiLuJe is offline   Reply With Quote
Old 01-22-2024, 03:29 PM   #265
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Ahh, I feel like a moron

Thanks
bitfreak is offline   Reply With Quote
Old 01-24-2024, 04:09 PM   #266
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Taken from the help:
For more complex & long-running use-cases involving *text* only (or a progress/activity bar), you can also switch to daemon mode,

So, how would that work with a progress bar then? fbink keeps throwing me the help or there is no process or I just get text.

bitfreak is offline   Reply With Quote
Old 01-24-2024, 06:09 PM   #267
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,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You need an initial progress/activity bar value (e.g., -P 0).
NiLuJe is offline   Reply With Quote
Old 01-25-2024, 01:37 PM   #268
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Using: FBInk v1.25.0 for Kobo

I figured out my problem, apparently it has multiple causes.
1. Remember that LFs are honored!

When echoing percentages the LFs are detected and the percentage is ignored, so nothing happens on screen. You have to echo without an LF: "echo -n " or use "printf". So command1 2>/tmp/fbink-fifo | command2 > /to/file does not work because the percentage stream has to be made LF free. So with some shell-shenanigans that becomes: { command1 | command2 >/to/file;} 2>&1 | tr -d '\n' >/tmp/fbink-fifo which does work.

2. Otherwise, you may want to ensure that it doesn't already exist *before* launching a daemon mode session.

If you mess up the command line and the process is not running, all data piped will end up in a file /tmp/fbink-fifo. Next time you run fbink, it exits because it detects a file /tmp/fbink-fifo and thus cannot create the pipe. But silently ignores it (going from memory).

BitFreak

Last edited by bitfreak; 01-25-2024 at 03:07 PM.
bitfreak is offline   Reply With Quote
Old 01-26-2024, 12:09 AM   #269
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,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
1. Yeah, `strtoul` calls are heavily validated . Out of curiosity, what are you running that's spitting out LFs?

2. Yup, check the syslog for failures. (The same applies for 1., actually, the strtoul validation errors will be spit out there, too)
NiLuJe is offline   Reply With Quote
Old 01-26-2024, 01:02 PM   #270
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Quote:
Originally Posted by NiLuJe View Post
Out of curiosity, what are you running that's spitting out LFs?
Linux's most prestigious pipe viewer: pv (https://www.ivarch.com/programs/sources/pv-1.8.5.tar.gz) Use switch -n to spit out percentage instead of a progress-bar.
bitfreak is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura HD Small tool for filling book library in Kobo Aura Paxerus Kobo Developer's Corner 2 12-31-2013 07:05 PM
Small print Broadback Conversion 12 12-12-2011 02:31 PM
Small Tool to change book order (PRS-x50) goaspy Sony Reader 113 10-14-2011 03:28 PM
small print breezeman Introduce Yourself 13 07-03-2011 09:02 AM


All times are GMT -4. The time now is 02:53 AM.


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