kindlevncviewer icon indicating copy to clipboard operation
kindlevncviewer copied to clipboard

Kobo Aura HD 32bit fb ?

Open rfenouil opened this issue 2 years ago • 0 comments

Hello and thank you for the great work.

I'm trying kvncviewer from the extracted zip file (1st post on mobileread forum) on my Kobo Aura HD (firmware 4.35.20400). When I use files extracted from this zip file I get the error:

# ./luajit vncviewer.lua -password ahahah 192.168.1.51:1
./luajit: ./ffi/framebuffer_linux.lua:183: unknown bpp value for the mxc eink driver
stack traceback:
        [C]: in function 'error'
        ./ffi/framebuffer_linux.lua:183: in function 'open'
        vncviewer.lua:3: in main chunk
        [C]: at 0x0000bd31

A look at the kobo framebuffer gives:

# fbset
mode "1080x1440-0"
        # D: 0.008 MHz, H: 0.005 kHz, V: 0.003 Hz
        geometry 1080 1440 1088 1536 32
        timings 120000000 32 508 4 5 32 2
        accel false
        rgba 8/16,8/8,8/0,8/24
endmode

I tried to add a condition for 32bit fb in framebuffer_linux.lua:

...
-- TODO: implement a better check for Kobo                                                              
                if fb.vinfo.bits_per_pixel == 32 then                                                            
                        -- this ought to be a Kobo                                                                      
                        local dummy = require("ffi/mxcfb_kobo_h")                                                       
                        fb.einkUpdateFunc = kobo_update                                                                 
                        fb.bb = BB.new(fb.vinfo.xres, fb.vinfo.yres, BB.TYPE_BB32, fb.data, fb.finfo.line_length)       
                        fb.bb:invert()                                                                               
                        if fb.vinfo.xres > fb.vinfo.yres then                                                           
                                -- Kobo framebuffers need to be rotated counter-clockwise (they start in landscape mode)
                                fb.bb:rotate(-90)                                                             
                        end                                                                                             
                elseif fb.vinfo.bits_per_pixel == 16 then                                                        
                        -- this ought to be a Kobo                                                                      
                        local dummy = require("ffi/mxcfb_kobo_h")
...

I got the program to run and draw part of the VNC session screen on the flickering Kobo screen. Nikel was not killed before trying that, maybe its interface interferes with kvncviewer display ? (and touch inputs ?)

The framebuffer settings I put in the above code is a quick and dirty trial to get the program running, but probably all wrong. Would you have suggestions on how to get a correct init of the display ?

I saw this issue: https://github.com/hwhw/kindlevncviewer/issues/4 Updating these files by the latest commit of kvncviewer did not help with the first error, so I guess the 32bit reported by fbset is the result of a firmware change between his version and the newest ?

I'll try to get a better control of the flickering (don't need quick updates or frequent fullscreen refresh, the screen I'm targeting is mostly static), and get the touch input to work, feel free to let me know if you have suggestions.

TightVNC server running on windows on port 5901.

Thank you for your help !

rfenouil avatar Jan 28 '23 23:01 rfenouil