New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on reMarkable2 version 3.6 #58
Comments
ah zut! (first French words that came out of my mouth :)) I will have a look, but not until a couple of weeks due to vacations. Meanwhile, if you want, you can try to extract an image manually to see if things have changed. You can find some pieces of information to do that here. Thank you for raising this issue. |
Thanks for the project! works fine on 3.5, will stay on that version for now :) |
For those who want to help and find the new version of the picture, I have uploaded the full content of the memory area of the framebuffer here |
First basic investigation: there is a possibility that they changed their implementation to use Partial framebuffer |
I accidentally toyed around a bit to much trying to get this to work and ended up with a quick and dirty solution that works on my remarkable 2. It seems there still is a linear frame buffer: Given
the base address is |
Awesome. |
Didn't compare CPU usage, but I explicitly used the minimum compression level of 1 (see here for example for some graphs) to make it as fast as possible while still benefiting from compressing down the raw 5.2MB frame to something around 100kb for most content I'm displaying. I mostly chose gzip as I assume (wrongly?) it has a somewhat optimized implementation as it is also used in other contexts and it doesn't need an extra decoder when rendering the content as the browser will happily do the decompression for me. That said: Maybe brotli would be even better (see https://timmehosting.de/brotli-vs-gzip), but I opted for an algorithm that doesn't require external go dependencies. |
Thanks to your help, I was able to extract a picture from the memory with this code: package main
import (
"image"
"image/png"
"log"
"os"
"github.com/owulveryck/goMarkableStream/internal/remarkable"
)
func main() {
f, err := os.Open("../testdata/full_memory_region.raw")
if err != nil {
log.Fatal(err)
}
defer f.Close()
backend := make([]uint8, remarkable.ScreenWidth*remarkable.ScreenHeight*4)
n, err := f.ReadAt(backend, 0)
if err != nil {
log.Fatal(err)
}
log.Printf("read %v bytes from the file", n)
boundaries := image.Rectangle{
Min: image.Point{
X: 0,
Y: 0,
},
Max: image.Point{
X: remarkable.ScreenWidth,
Y: remarkable.ScreenHeight,
},
}
img := image.NewGray(boundaries)
for i := 0; i < remarkable.ScreenHeight*remarkable.ScreenWidth*2; i += 2 {
img.Pix[i/2] = backend[i] << 4
}
png.Encode(os.Stdout, img)
} The trick is actually to get one byte out of two, and I don't know why (neither I know what is the other byte used for). I notice that there is no need to move the offset; I guess the picture is present several times in the memory for refresh function internally. |
I have created branch fw3.6. Funny stuff, the image is flipped. |
I noticed two things in my exploration:
|
For the wildly impatient yet lazy (such as myself), I made a quick hack branch that fixes the image-flipping issue (badly) in Javascript: https://github.com/AngleOSaxon/goMarkableStream/tree/fw3.6_rotation_hack Not the most efficient solution, but it works. |
Cool. I fixed the flipping in the fw36 code now (as I need to extract one out of two pixels, I take the opportunity to place them in the correct index on the backend). I still need to tweak the rendering and the fw36 will be almost ready. I have to evaluate the impact of the change because it will require a lot of memory to process. But I think I cannot do better for now. |
reMarkable2 version 3.6.0.1806
goMarkableStreams version 0.10.0 and 0.9.0
was able to ssh into the remarkable and run the ./goMarkableStream and connect to it from my laptop browser (entering admin/password), but in both cases there was the gray screen of noise with continual moving noise.
Perhaps they changed the frame buffer again?
The text was updated successfully, but these errors were encountered: