Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 01-27-2024, 07:36 AM   #31
Clouds
Member
Clouds began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
Quote:
Originally Posted by elinkser View Post
Yes, letting Raisjn know would be good for supporting older devices.

I did try building the remux bin with an older kernel - you can try it if you want.
Wow that's awesome, thanks!
The kernel version issue seems to be solved with that.

Next step is the support for the Kobo device as expected:

# sh /opt/bin/remux.sh

COULDNT OPEN machine id FILE 2
*** UNRECOGNIZED KOBO DEVICE, EXITING ***
SET 'RMKIT_KOBO_ANY=1' TO RUN ON UNSUPPORTED KOBOS


I guess RMKIT_KOBO_ANY=1 needs to be configured when building the binary?
Clouds is offline  
Old 01-27-2024, 03:52 PM   #32
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
OK, let's try running the command like this(RMKIT_KOBO_ANY is a runtime variable):

# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh

I attached another version to try, where the default touch is like the Clara.
(As in Post #1 - not the default source code.)

i.e.:

$ nano -l src/rmkit/util/machine_id.cpy
Code:
68         switch KOBO_CUR_VERSION:
69 //          case util::KOBO_DEVICE_ID_E::DEVICE_KOBO_CLARA_HD:
70 //            debug "RUNNING ON CLARA HD"
71 //            break
$ nano -l src/rmkit/input/events.cpy
Code:
179       version := util::get_kobo_version()
180       rotation := util::rotation::get()
181       rotation %= 4
182       invert_x = true
183       swap_xy = false
184       switch version:
185         case util::KOBO_DEVICE_ID_E::DEVICE_KOBO_CLARA_HD:
186           rotation++
187           rotation %= 4
188           invert_x = true
189           swap_xy = true
190           break

Last edited by elinkser; 01-28-2024 at 02:26 PM.
elinkser is offline  
Advert
Old 01-28-2024, 01:00 PM   #33
Clouds
Member
Clouds began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
Quote:
RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh
That got me another step further:

# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh
COULDNT OPEN machine id FILE 2
*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***
W: 1404 H: 1872 S: 1408
XRES 1404 YRES 1872 BPP 32 GRAYSCALE 0
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
OPENING /dev/input/event2 : UNKNOWN EVENT DEVICE
OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE
ERROR OPENING INPUT DEVICE /dev/input/event4
READING CONFIG FROM /home/root/.config/remux/remux.conf
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0338795
CURRENT APP IS Nickel
RESETTING BPP TO 32
SETTING SCREEN DEPTH 32
STARTING SUSPEND THREAD
STARTING FIFO THREAD
LAST SUSPEND LOOP WAS 1706436226 AGO, RESETTING IDLE TIMER
SETTING UP GESTURES
SETTING LAUNCH GESTURES TO DEFAULT
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 140 1872
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 1263 0 1404 1872
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 140 1872
direction: down
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 1263 0 1404 1872
direction: down
distance:


Does it work? Well, somewhat. The swipe gestures are recognized now.
When swiping up or down on the side of the screen, I get:

NOT SHOWING LAUNCHER IN LANDSCAPE
CURRENT APP IS Nickel
current app took 0.0109608
SENDING 19 TO GROUP -736 RET 0
SENDING 19 TO GROUP -614 RET 0
stopping apps took 0.0234948
SNAPSHOTTING Nickel
COMP TOOK 0.24051 TOTAL SIZE 7501 KBYTES, 480124 ELEMENTS
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.029977
SETTING SCREEN DEPTH 32
DISPLAYED LAUNCHER FOR 411 MS
NOT HIDING LAUNCHER BECAUSE INTERVAL < 500


Unfortunately, nothing visibly happens on the Kobo screen.
Input on Nickel doesn't work after swiping up/down, I assume because remux captures touch input until the command to return to Nickel is received.

The result is the same for both the remux for older kernel that you posted, and the remux_clara version from your previous comment.

I noticed in the output READING CONFIG FROM /home/root/.config/remux/remux.conf. The folder /home/root/.config/remux/ exists, but the file remux.conf does not exist. Should it exist? If so, what should be in there?
Clouds is offline  
Old 01-28-2024, 02:24 PM   #34
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
***UPDATE***
MISSION ABORT
There sre no "Mark6" devices (which the Aura One is) listed as supported by rmkit.
(Libra H2O and Clara HD are "Mark7", implying a different set of hardware control commands.)
We gave it a shot, but I've gotta bow out here.
Maybe Raisjn will add suport if he knows you're interested?

***

That looks fine.
I get the same messages:
READING CONFIG FROM /home/root/.config/remux/remux.conf
No such file or directory

But then I would still see a menu in a rectangular box after the swipe:

Code:
Nickel                    66MB   
animation_demo                   
dumbskull                              
input_demo                            
mines                                      
remux                                      
rpncalc                                    
wordlet                                    
                               NEXT
Maybe check your install directories?

/opt is a symbolic link to /mnt/onboard/.adds/rmkit and should have same contents.

# ls /opt
bin/
enable_remux

# ls /mnt/onboard/.adds/rmkit
bin/
enable_remux

# ls /mnt/onboard/.adds/rmkit/bin/
apps/
remux.sh

# ls /mnt/onboard/.adds/rmkit/bin/apps
animation_demo
dumbskull
input_demo
mines
remux
rpncalc
wordlet



Maybe try copying the input_demo I uploaded to Post # 1 to the /mnt/onboard/.adds/rmkit/bin/apps/ folder?
input_demo

Or try running the individual app directly from a second SSH screen:
# /mnt/onboard/.adds/rmkit/bin/apps/input_demo
(while remux is still running in the first screen.)



***




I uploaded a new version of remux that defaults to allowing unrecognized devices to run (so you no longer need to specify RMKIT_KOBO_ANY=1 on the command line.

Conversely, setting RMKIT_KOBO_RESTRICT=1 allows only recognized devices to run.


Default touch settings are now:
invert_y = false
invert_x = false
swap_xy = false
//rotation %= 4

These can be overridden by setting any of:
INV_Y=1
INV_X=1
SWP_XY=1
ROT_4=1

So, the Clara HD for example, could be run with:
# INV_X=1 ROT_4=1 sh /opt/bin/remux.sh


$ nano -l src/rmkit/util/machine_id.cpy
Code:
68         switch KOBO_CUR_VERSION:
69 //          case util::KOBO_DEVICE_ID_E::DEVICE_KOBO_CLARA_HD:
70 //            debug "RUNNING ON CLARA HD"
71 //            break
72           case util::KOBO_DEVICE_ID_E::DEVICE_KOBO_LIBRA_H2O:
73             debug "RUNNING ON LIBRA H2O"
74             break
...
79             if getenv("RMKIT_KOBO_RESTRICT") != NULL:
80               debug "*** UNRECOGNIZED KOBO DEVICE, EXITING ***"
81               debug "SETTING 'RMKIT_KOBO_RESTRICT=1' DISALLOWS RUNNNING ON UNSUPPORTED KOBOS"
82               exit(1)
83               break
84
85             debug "*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***"
86             break
$ nano -l src/rmkit/input/events.cpy
Code:
 
179       version := util::get_kobo_version()
180       rotation := util::rotation::get()
181       invert_y = false
182       invert_x = false
183       swap_xy = false
184       if getenv("INV_Y") != NULL:
185         invert_y = true
186       if getenv("INV_X") != NULL:
187         invert_x = true
188       if getenv("SWP_XY") != NULL:
189         swap_xy = true
190       if getenv("ROT_4") != NULL:
191         rotation %= 4
192       switch version:
193         case util::KOBO_DEVICE_ID_E::DEVICE_KOBO_CLARA_HD:

***

Last edited by elinkser; 01-29-2024 at 08:30 PM. Reason: abort
elinkser is offline  
Old 01-29-2024, 03:19 AM   #35
raisjn
Member
raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.
 
raisjn's Avatar
 
Posts: 23
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
Quote:
Maybe Raisjn will add suport if he knows you're interested?
hi Clouds and elinkser, thanks for the support so far! (i will have to look at integrating your patches in). around new year's, i added support for fbink (thanks NiLuJe!) as the framebuffer backend to rmkit, so it should now be able to draw to more devices. the major piece i was unsure of was the input handling, but it looks like you have that covered. if fbink supports your device, i think we will be able to get rmkit to work (eventually)

you can find some fbink binaries here: https://raisjn.net/fbink/ - they are built out of the `fbink` branch on rmkit (see https://github.com/rmkit-dev/rmkit/tree/fbink). the build instructions are something like this:

Code:
$ git checkout fbink
$ git submodule init
$ git submodule update
$ pushd vendor/fbink
$ CROSS_TC=arm-linux-gnueabihf BITMAP=1 make staticlib
$ popd
$ TARGET=kobo FBINK=1 CROSS_TC=arm-linux-gnueabihf make
feel free to email me / ping me if i don't respond in a few days, i sometimes forget and don't check the forums for a while.

Last edited by raisjn; 01-30-2024 at 11:14 AM.
raisjn is offline  
Advert
Old 01-29-2024, 05:23 PM   #36
Clouds
Member
Clouds began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
Thanks for your support elinkser and raisjn!

For completeness sake I still tried running the individual apps from cli while remux was running. They abort because "FATAL: kernel too old".
I'm not too knowledgeable on this topic but I guess this means that the individual apps need to be built for the old KA1 kernel just like remux?

I'd be happy to try whether or not fbink can work on KA1.
Unfortunately I don't know much about building binaries. Following steps is all can do.
Earlier I tried creating a build environment for Kobo by following a guide, but got stuck on a part where the guide said something that sounded to me like 'now just build a rocket and launch it and you'll get to Mars' :-D
Clouds is offline  
Old 01-29-2024, 06:55 PM   #37
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
@Clouds
Hang in there. A few more details to iron out!

@raisjn
That is great news!

I did encounter a problem trying to swipe to get the initial menu.

Trying the remux binary from https://raisjn.net/fbink/, and running from SSH on my kobo, I got the error:

# sh /opt/bin/remux.sh
/opt/bin/apps/remux: /lib/libm.so.6: version `GLIBC_2.27' not found (required by /opt/bin/apps/remux)

So I tried your build directions (with a few mods):

Build toolchain as in fbpad:
https://www.mobileread.com/forums/sh...16&postcount=4

$ source ~/koxtoolchain/refs/x-compile.sh kobo env bare

$ git clone https://github.com/rmkit-dev/rmkit.git

$ cd rmkit

$ git checkout fbink

$ git submodule init

$ git submodule update

$ pushd src/vendor/FBInk/

$ git submodule init

$ git submodule update

$ CROSS_TC=arm-kobo-linux-gnueabihf BITMAP=1 make staticlib

$ popd

$ cp src/vendor/FBInk/fbink.h src/vendor/

$ KOBO=1 FBINK=1 CROSS_TC=arm-kobo-linux-gnueabihf make


So then, copying src/build/remux to /mnt/onboard/.adds/rmkit/bin/apps/ I get:

# sh /opt/bin/remux.sh
[FBInk] Detected a Kobo Clara HD (376 => Nova @ Mark 7)
[FBInk] Enabled Kobo Mark 7 quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 300 dpi
[FBInk] Variable fb info: 1072x1448, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6782976 bytes & line length: 4352 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 24x24 (IBM base glyph size: 8x8)
[FBInk] Line length: 44 cols, Page size: 60 rows
[FBInk] Vertical fit isn't perfect, shifting rows down by 4 pixels
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
W: 1072 H: 1448 S: 1088
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
ERROR OPENING INPUT DEVICE /dev/input/event2
ERROR OPENING INPUT DEVICE /dev/input/event3
ERROR OPENING INPUT DEVICE /dev/input/event4
READING CONFIG FROM /home/root/.config/remux/remux.conf
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0110213
CURRENT APP IS _
READING TIMEOUTS FOR SLEEP/SHUTDOWN FROM XOCHITL
sh: systemctl: not found
LAUNCHING APP xochitl _
POWER MANAGEMENT: 0
RESETTING MT GESTURES
sh: systemctl: not found
COULDNT READ XOCHITL CMD FROM SYSTEMCTL, DEFAULTING TO /LIB
XOCHITL CMD IS xochitl --system
CHECKING PROCESS xochitl 0
setsid: can't execute 'xochitl': No such file or directory
STARTING SUSPEND THREAD
STARTING FIFO THREAD
LAST SUSPEND LOOP WAS 1706567123 AGO, RESETTING IDLE TIMER
SETTING UP GESTURES
SETTING LAUNCH GESTURES TO DEFAULT
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 107 1448
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 964 0 1072 1448
direction: up
distance:

And there is no response to swiping.

However...

Running from another SSH window:

# /mnt/onboard/.adds/rmkit/bin/apps/input_demo
W: 1072 H: 1448 S: 1088
XRES 1072 YRES 1448 BPP 16 GRAYSCALE 0
RUNNING ON CLARA HD
DRAG START
DRAGGING 433 933

The input_demo app works!

(Except that Nickel is still responding to touch events.)

So, main problem is that swiping along edge no longer brings up menu.
Running app individually stll sends touches to Nickel.

***

Last edited by elinkser; 01-29-2024 at 07:01 PM.
elinkser is offline  
Old 01-29-2024, 07:05 PM   #38
raisjn
Member
raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.
 
raisjn's Avatar
 
Posts: 23
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
Oh no! maybe try using `TARGET=kobo` in the build line. It looks like it built the rM app (i see mention of xochitl), so I think I gave the wrong build command.

can you try `TARGET=kobo FBINK=1 CROSS_TC=arm-kobo-linux-gnueabihf make`? or use whatever command you did before for building, but add in FBINK=1.
raisjn is offline  
Old 01-29-2024, 08:25 PM   #39
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
***

@Clouds, can you try again with:

# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh

@raisjn, I built this time like before with:

$ nano -l src/common.make
Code:
 2 TARGET?=kobo
 3 CROSS_TC?=arm-kobo-linux-gnueabihf
 4 CXX_BIN?=arm-kobo-linux-gnueabihf-g++
 5 CC_BIN?=arm-kobo-linux-gnueabihf-gcc
 6 STRIP_BIN?=arm-kobo-linux-gnueabihf-strip
 7 CPP_FLAGS=-pthread -lpthread -fdata-sections -ffunction-sections -Wno-narrowing -Wl,--gc-sections
$ nano -l src/rmkit/input/events.cpy
Code:
187       rotation := util::rotation::get()
188       invert_y = false
189       invert_x = false
190       swap_xy = false
191       if getenv("INV_Y") != NULL:
192         invert_y = true
193       if getenv("INV_X") != NULL:
194         invert_x = true
195       if getenv("SWP_XY") != NULL:
196         swap_xy = true
197       if getenv("ROT_4") != NULL:
198         rotation %= 4
199       switch version:
$ ARCH=kobo FBINK=1 make

Now, copying src/build/remux to /mnt/onboard/.adds/rmkit/bin/apps/ I get:

# sh /opt/bin/remux.sh
[FBInk] Detected a Kobo Clara HD (376 => Nova @ Mark 7)
[FBInk] Enabled Kobo Mark 7 quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 300 dpi
[FBInk] Variable fb info: 1072x1448, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6782976 bytes & line length: 4352 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 24x24 (IBM base glyph size: 8x8)
[FBInk] Line length: 44 cols, Page size: 60 rows
[FBInk] Vertical fit isn't perfect, shifting rows down by 4 pixels
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
W: 1072 H: 1448 S: 1088
RUNNING ON CLARA HD
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
ERROR OPENING INPUT DEVICE /dev/input/event2
ERROR OPENING INPUT DEVICE /dev/input/event3
ERROR OPENING INPUT DEVICE /dev/input/event4
READING CONFIG FROM /home/root/.config/remux/remux.conf
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.029685
CURRENT APP IS Nickel
RESETTING BPP TO 32
SETTING SCREEN DEPTH 32
STARTING SUSPEND THREAD
STARTING FIFO THREAD
LAST SUSPEND LOOP WAS 1706577083 AGO, RESETTING IDLE TIMER
SETTING UP GESTURES
SETTING LAUNCH GESTURES TO DEFAULT
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 107 1448
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 964 0 1072 1448
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 107 1448
direction: down
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 964 0 1072 1448
direction: down
distance:



Now I can swipe to launch menu!

Now let's see if @Clouds can run input_demo...

***

*Note:
Unfortunately needed to add -Wno-narrowing to CPP_FLAGS to avoid errors:


In file included from rmkit/src/.remux_cpp/launcher.cpp:2:
rmkit/src/.remux_cpp/launcher.h: In member function 'input_event* App::build_touch_flood()':
rmkit/src/.remux_cpp/launcher.h:788:75: error: narrowing conversion of '-3' from 'int' to '__u16' {aka 'short unsigned int'} [-Wnarrowing]
788 | ev[i++] = input_event{ type:EV_ABS, code:TOUCH_FLOOD_EVENT, value:1 };
| ^
rmkit/src/.remux_cpp/launcher.h:790:75: error: narrowing conversion of '-3' from 'int' to '__u16' {aka 'short unsigned int'} [-Wnarrowing]
790 | ev[i++] = input_event{ type:EV_ABS, code:TOUCH_FLOOD_EVENT, value:2 };
| ^
Couldn't compile rmkit/src/.remux_cpp/launcher.cpp aborting


***

Last edited by elinkser; 01-31-2024 at 10:22 AM.
elinkser is offline  
Old 01-30-2024, 01:04 PM   #40
Clouds
Member
Clouds began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
Quote:
Originally Posted by elinkser View Post
***
@Clouds, can you try again with:
# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh
***
Using the remux-any from your last comment:

# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh
COULDNT OPEN machine id FILE 2
[FBInk] Detected a Kobo Aura One (373 => Daylight @ Mark 6)
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 300 dpi
[FBInk] Variable fb info: 1404x1872, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 10813440 bytes & line length: 5632 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 32x32 (IBM base glyph size: 8x8)
[FBInk] Line length: 43 cols, Page size: 58 rows
[FBInk] Vertical fit isn't perfect, shifting rows down by 8 pixels
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
W: 1404 H: 1872 S: 1408
*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
OPENING /dev/input/event2 : UNKNOWN EVENT DEVICE
OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE
ERROR OPENING INPUT DEVICE /dev/input/event4
READING CONFIG FROM /home/root/.config/remux/remux.conf
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0303595
CURRENT APP IS _
STARTING SUSPEND THREAD
STARTING FIFO THREAD
LAST SUSPEND LOOP WAS 1706636680 AGO, RESETTING IDLE TIMER
SETTING UP GESTURES
SETTING LAUNCH GESTURES TO DEFAULT
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 140 1872
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 1263 0 1404 1872
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 140 1872
direction: down
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 1263 0 1404 1872
direction: down
distance:


When swiping nothing happens on screen, and the ssh window logs the same lines as before:
NOT SHOWING LAUNCHER IN LANDSCAPE
CURRENT APP IS _
current app took 0.0387604
SENDING 19 TO GROUP -735 RET 0
SENDING 19 TO GROUP -614 RET 0
stopping apps took 0.0155045
SNAPSHOTTING _
COMP TOOK 0.172787 TOTAL SIZE 67 KBYTES, 4310 ELEMENTS
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0306215
SETTING SCREEN DEPTH 32
DISPLAYED LAUNCHER FOR 359 MS
NOT HIDING LAUNCHER BECAUSE INTERVAL < 500


Running input_demo from a second SSH session with remux running:
# /mnt/onboard/.adds/rmkit/bin/apps/input_demo
/mnt/onboard/.adds/rmkit/bin/apps/input_demo: /lib/libm.so.6: version `GLIBC_2.27' not found (required by /mnt/onboard/.adds/rmkit/bin/apps/input_demo)
/mnt/onboard/.adds/rmkit/bin/apps/input_demo: /lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /mnt/onboard/.adds/rmkit/bin/apps/input_demo)
/mnt/onboard/.adds/rmkit/bin/apps/input_demo: /lib/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /mnt/onboard/.adds/rmkit/bin/apps/input_demo)
/mnt/onboard/.adds/rmkit/bin/apps/input_demo: /lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /mnt/onboard/.adds/rmkit/bin/apps/input_demo)
Clouds is offline  
Old 01-30-2024, 01:52 PM   #41
Clouds
Member
Clouds began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
FYI just for fun I just installed KoboStuff and tried FBink for a bit.
FBInk works fine on KA1!
Clouds is offline  
Old 01-30-2024, 06:19 PM   #42
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
Well at least it reacts to your swipe - that is a good sign.
Weird that it doesn't see nickel now:
CURRENT APP IS _


As for the missing libs, yes, you will need binaries compiled for your old kernel and GLIBC version (like your remux) like I have uploaded in Post #1, 10, and 28.

Raisjn can tell me how to add debug lines to your remux, if necessary.

Last edited by elinkser; 02-22-2024 at 03:22 PM.
elinkser is offline  
Old 01-31-2024, 12:25 AM   #43
raisjn
Member
raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.raisjn can tame squirrels without the assistance of a chair or a whip.
 
raisjn's Avatar
 
Posts: 23
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
i've updated rmkit to send more framebuffer calls through fbink APIs, things like retrieving the display size and depth. will also see if i can get my hands on the KA1 or something similar for testing

Last edited by raisjn; 01-31-2024 at 07:10 AM.
raisjn is offline  
Old 01-31-2024, 10:20 AM   #44
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
***

Did the following edits:

$ nano -l src/common.make
Code:
 7 CPP_FLAGS=-pthread -lpthread -fdata-sections -ffunction-sections -Wno-narrowing -Wl,--gc-sections
$ nano -l src/rmkit/util/machine_id.cpy
Code:
69 //          case util::KOBO_DEVICE_ID_E::DEVICE_KOBO_CLARA_HD:
70 //            debug "RUNNING ON CLARA HD"
71 //            break
$ nano -l src/rmkit/input/events.cpy
Code:
190       swap_xy = false
191       if getenv("INV_Y") != NULL:
192         invert_y = true
193       if getenv("INV_X") != NULL:
194         invert_x = true
195       if getenv("SWP_XY") != NULL:
196         swap_xy = true
197       if getenv("ROT_4") != NULL:
198         rotation %= 4
199       switch version:

$ ARCH=kobo TARGET=kobo FBINK=1 CROSS_TC=arm-kobo-linux-gnueabihf make

$ arm-kobo-linux-gnueabihf-strip src/build/remux

Copied src/build/remux to /mnt/onboard/.adds/rmkit/bin/apps/ and ran from SSH:

# RMKIT_KOBO_ANY=1 INV_X=1 ROT_4=1 sh /opt/bin/remux.sh

And swiping up brings up the menu.


***

Last edited by elinkser; 02-22-2024 at 07:52 PM.
elinkser is offline  
Old 01-31-2024, 03:30 PM   #45
Clouds
Member
Clouds began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
Ok I wasn't too sharp on my previous comment...

Quote:
Weird that it doesn't see nickel now:
CURRENT APP IS _
Yeah it does recognize Nickel, but only when running remux.sh the first time. After killing it and starting it again Nickel isn't active anymore. Accidentally posted the output of a second try.

Quote:
As for the missing libs, yes, you will need binaries compiled for your old kernel and GLIBC version (like your remux) like I have uploaded in Post #1, 10, and 28.
Ah yes, of course. To make sure my rmkit install was done properly I had removed all of it and reinstalled it. And then I only put in your modified remux but left the original input_demo.

Anyway, with remux-0131 and input_demo-0131, I get the following results:

TLDR: input_demo works, swiping up/down in input_demo stops it, swiping up/down in Nickel to launch the menu doesn't do anything on screen yet.
# ps | grep remux
1141 root 0:00 sh /opt/bin/remux.sh
2259 root 0:00 grep remux
# kill -kill 1141
# ps | grep remux
2283 root 0:00 grep remux

# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh
COULDNT OPEN machine id FILE 2
[FBInk] Detected a Kobo Aura One (373 => Daylight @ Mark 6)
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 300 dpi
[FBInk] Variable fb info: 1404x1872, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 10813440 bytes & line length: 5632 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 32x32 (IBM base glyph size: 8x8)
[FBInk] Line length: 43 cols, Page size: 58 rows
[FBInk] Vertical fit isn't perfect, shifting rows down by 8 pixels
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
W: 1404 H: 1872 S: 1408
*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
OPENING /dev/input/event2 : UNKNOWN EVENT DEVICE
OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE
ERROR OPENING INPUT DEVICE /dev/input/event4
READING CONFIG FROM /home/root/.config/remux/remux.conf
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0329361
CURRENT APP IS Nickel
RESETTING BPP TO 32
STARTING SUSPEND THREAD
STARTING FIFO THREAD
LAST SUSPEND LOOP WAS 1706729118 AGO, RESETTING IDLE TIMER
SETTING UP GESTURES
SETTING LAUNCH GESTURES TO DEFAULT
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 140 1872
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 1263 0 1404 1872
direction: up
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 0 0 140 1872
direction: down
distance:
ADDED SWIPE GESTURE:
command:
gesture: swipe
fingers:
min_events:
zone: 1263 0 1404 1872
direction: down
distance:

Swiping up on the side gives no visible result on screen:
NOT SHOWING LAUNCHER IN LANDSCAPE
CURRENT APP IS Nickel
current app took 0.0108443
SENDING 19 TO GROUP -735 RET 0
SENDING 19 TO GROUP -614 RET 0
stopping apps took 0.02166
SNAPSHOTTING Nickel
COMP TOOK 0.243213 TOTAL SIZE 7194 KBYTES, 460461 ELEMENTS
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0307918
DISPLAYED LAUNCHER FOR 414 MS
NOT HIDING LAUNCHER BECAUSE INTERVAL < 500
NOT SHOWING LAUNCHER IN LANDSCAPE
CURRENT APP IS Nickel
current app took 0.0810063
SENDING 19 TO GROUP -735 RET 0
SENDING 19 TO GROUP -614 RET 0
stopping apps took 0.00908917
SNAPSHOTTING Nickel
COMP TOOK 0.160917 TOTAL SIZE 58 KBYTES, 3726 ELEMENTS
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0313472
DISPLAYED LAUNCHER FOR 384 MS
NOT HIDING LAUNCHER BECAUSE INTERVAL < 500


Starting input_demo in a second SSH window.
INV_X and INV_Y must be set for touch to work correctly:
# cd /mnt/onboard/.adds/rmkit/bin/apps/
# INV_X=1 INV_Y=1 RMKIT_KOBO_ANY=1 ./input_demo
COULDNT OPEN machine id FILE 2
[FBInk] Detected a Kobo Aura One (373 => Daylight @ Mark 6)
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 300 dpi
[FBInk] Variable fb info: 1404x1872, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 10813440 bytes & line length: 5632 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 32x32 (IBM base glyph size: 8x8)
[FBInk] Line length: 43 cols, Page size: 58 rows
[FBInk] Vertical fit isn't perfect, shifting rows down by 8 pixels
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
W: 1404 H: 1872 S: 1408
*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
OPENING /dev/input/event2 : UNKNOWN EVENT DEVICE
OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE
ERROR OPENING INPUT DEVICE /dev/input/event4

Click, double click, long press, dragging, slider, text input, menu items all work.
The moving square in the box can be dragged around. It will follow the movement of my finger correctly, but it won't automatically jump to underneath my finger (although I suppose it's not supposed to do that anyway?)
SINGLE CLICK 616 942
DOUBLE CLICK 618 988
LONG PRESS 607 996
DRAG START
DRAGGING 612 975
DRAGGING 647 964
DRAGGING 675 955
DRAGGING 706 941
DRAG END
SELECTED 1 bar
MENU 2 SELECTED 1 Option E

Swiping up or down on either side of the screen stops (but doesn't kill) input_demo

First screen with remux running:
NOT SHOWING LAUNCHER IN LANDSCAPE
CURRENT APP IS input_demo
current app took 0.0615768
SENDING 19 TO GROUP -735 RET 0
SENDING 19 TO GROUP -2528 RET 0
SENDING 19 TO GROUP -2557 RET 0
SENDING 19 TO GROUP -2535 RET 0
SENDING 19 TO GROUP -2522 RET 0
SENDING 19 TO GROUP -2515 RET 0
SENDING 19 TO GROUP -2390 RET 0
SENDING 19 TO GROUP -2373 RET 0
SENDING 19 TO GROUP -2549 RET 0
SENDING 19 TO GROUP -2362 RET 0
SENDING 19 TO GROUP -2507 RET 0
SENDING 19 TO GROUP -614 RET 0
stopping apps took 0.018624
SNAPSHOTTING input_demo
COMP TOOK 0.175618 TOTAL SIZE 145 KBYTES, 9285 ELEMENTS
No such file or directory
No such file or directory
No such file or directory
memory stats took 0.0316689
DISPLAYED LAUNCHER FOR 387 MS
NOT HIDING LAUNCHER BECAUSE INTERVAL < 500
At the same time on the second screen with input_demo running:
[3]+ Stopped (signal) ./input_demo

I tried running remux with different commands, i.e.
# RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh
# RMKIT_KOBO_ANY=1 INV_X=1 ROT_4=1 sh /opt/bin/remux.sh
# RMKIT_KOBO_ANY=1 INV_X=1 INV_Y=1 sh /opt/bin/remux.sh
# RMKIT_KOBO_ANY=1 INV_X=1 INV_Y=1 ROT_4=1 sh /opt/bin/remux.sh

all with the same results: swiping doesn't launch anything.

I'm not sure if I'm supposed to try simple and drawing_demo from yesterday's post as well. I did anyway with different options (e.g. different combination of INV_X=1, INV_Y=1, ROT_4=1). In none of the tests anything visible happens on screen. Swiping up/down on the side of the screen does stop the application:

# INV_X=1 INV_Y=1 RMKIT_KOBO_ANY=1 ./simple
COULDNT OPEN machine id FILE 2
*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***
SETTING SCREEN DEPTH 32
W: 1404 H: 1872 S: 1408
XRES 1404 YRES 1872 BPP 32 GRAYSCALE 0
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
OPENING /dev/input/event2 : UNKNOWN EVENT DEVICE
OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE
ERROR OPENING INPUT DEVICE /dev/input/event4

# INV_X=1 RMKIT_KOBO_ANY=1 ./drawing_demo
COULDNT OPEN machine id FILE 2
*** UNRECOGNIZED KOBO DEVICE, TOUCH MAY NOT WORK ***
SETTING SCREEN DEPTH 32
W: 1404 H: 1872 S: 1408
XRES 1404 YRES 1872 BPP 32 GRAYSCALE 0
OPENING /dev/input/event0 AS BUTTONS
OPENING /dev/input/event1 AS TOUCH
OPENING /dev/input/event2 : UNKNOWN EVENT DEVICE
OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE

Last edited by Clouds; 01-31-2024 at 05:49 PM.
Clouds is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
rmkit comes to kobo! raisjn Kobo Developer's Corner 25 04-21-2024 10:23 PM
Native FBInk: Another small tool to print crap on your screen! NiLuJe Kindle Developer's Corner 282 12-05-2022 03:04 PM
fbink image scaling question handyguy Kindle Developer's Corner 6 12-17-2020 07:01 PM
Latest fbink install? handyguy Kindle Developer's Corner 3 12-11-2020 09:13 PM
Pre-Purchase Questions ... Clara/Libra/Forma Catsnkites Kobo Reader 9 10-27-2019 11:28 AM


All times are GMT -4. The time now is 03:49 PM.


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