Open i-am-shodan opened 3 years ago
@i-am-shodan https://github.com/parzivail/ReMarkable.NET/pull/5 this was the PR you mentioned, right?
As for the API, it's not really documented well, but the client does have a protocol that it uses to communicate with the server that can be used. It's using msgsnd to send messages to a message queue that the server handles. It also uses smem_open to allow waiting on updates to complete.
Yeah that would be it
When using Remarkable.net error messages can be seen in stdout and the display doesn’t update. The error messages can be tracked back to display refresh code in remarkable.net and specifically the C# ioctl call into libc returning -1.
I debugged this at great length with a debug build of the r2fb client and enabled function level debug logging going to stdout.
The client library was preloaded correctly into dotnet and the function tracer output could be seen. However when the main application (my DLL instead of the dotnet interpreter binary) was running it appeared that the function hooks were not being called at all.
I suspect that the existing open/close/ioctl hooks don’t work at all with dotnet applications.
As a workaround I preloaded the binary but also invoked functions directly in the client library instead of libc. At which point everything worked as expected.
I will put a PR into remarkable.net to call the client libraries directly but long term it might be better to have an API (socket, tcp) to use instead as when the client version number changes remarkable.net will break.