View Single Post
Old 05-21-2026, 12:00 AM   #3
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,938
Karma: 12984859
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
I used this as reagl.sh:
Code:
#!/mnt/secure/su /bin/sh
cd /mnt/ext1/applications/koreader
luajit -e '
ffi = require("ffi")
ffi.cdef[[int open(const char*,int); int close(int); int ioctl(int, unsigned long, ...);]]
require("ffi/mxcfb_pocketbook_h")
ffi.cdef[[struct mxcfb_waveform_modes { int mode_count; int modes[16]; };]]
wm = ffi.new("struct mxcfb_waveform_modes")
wm.mode_count = 11
for i = 0, 10 do wm.modes[i] = 8 end
wm.modes[14] = 8
fd = ffi.C.open("/dev/fb0", 2)
ffi.C.ioctl(fd, 0x4024462B, wm)
ffi.C.close(fd)
'
And this as test_reagl.sh:
Code:
#!/mnt/secure/su /bin/sh
cd /mnt/ext1/applications/koreader
cat /sys/devices/platform/sw-epdc.0/waveform_info | grep Waveforms
luajit -e '
ffi = require("ffi")
ffi.cdef[[int open(const char*,int);int close(int);int ioctl(int,unsigned long,...);]]
require("ffi/mxcfb_pocketbook_h")
u = ffi.new("struct mxcfb_update_data")
u.update_region.top=500;u.update_region.left=500
u.update_region.width=200;u.update_region.height=200
u.waveform_mode=2;u.update_mode=0;u.temp=0x1000
fd = ffi.C.open("/dev/fb0",2)
ffi.C.ioctl(fd, ffi.C.MXCFB_SEND_UPDATE, u)
ffi.C.close(fd)
'
dmesg | grep "wf=2" | tail -1
Output from PBTerm running test_reagl.sh before and after reagl.sh:
Code:
/ $ /mnt/ext1/test_reagl.sh
Waveforms:      0 1 2 3 4 5 6 7 8 13 14 
[  125.060671] [epdc]  %%UPDATE: pid=1877 wf=2 mode=1 area=(0,0,1448,1072) FB[2:1448x1072] 10000000
/ $ /mnt/ext1/reagl.sh
/ $ /mnt/ext1/test_reagl.sh
Waveforms:      0 1 2 3 4 5 6 7 8 13 14 
[  163.820820] [epdc]  %%UPDATE: pid=1877 wf=2 mode=1 area=(0,0,1448,1072) FB[2:1448x1072] 10000000
/ $
There does not appear to be anything changed?

And from my other post...

For the bind-mount, what is:
/mnt/secure/bin/bookshelf_koreader
This write-up does not specify what this file is, how it is created.

I'm guessing the prerequisite:
- KOReader installed and booting directly
is the reason it isn't working??? But again, there is no explanation to what this implies.

On PocketBooks KOReader can be set as the default app to open ebook file-extensions and the device can be set to open the "last book read" automatically, therefore KOReader would boot directly... but I doubt this is what you are alluding to.

Last edited by neil_swann80; 05-21-2026 at 04:04 AM.
neil_swann80 is offline   Reply With Quote