Scott Hanselman

How to install .NET Core on your Remarkable 2 e-Ink tablet with Remarkable.NET

July 20, 2021 Comment on this post [4] Posted in Open Source
Sponsored By

I blogged about The quiet rise of E Ink Tablets and Infinite Paper Note Takers - reMarkable 2 vs Onyx Boox Note Air and my love for the Remarkable 2 e-Ink tablet.

Now I see that Colby Newman is working on a .NET API for the Remarkable series of tablets. As you know, Dear Reader, I will install .NET on anything and everything so this is right up my alley. The NuGet Package is Remarkable.NET and the GitHub is at https://github.com/parzivail/ReMarkable.NET

.NET Core is open source and cross platform and Remarkable.NET is build on .NET Core 3.1 which has binaries for ARM32 which sets us up nicely for use on the Remarkable tablet.

I can download the build here https://dotnet.microsoft.com/download/dotnet/3.1 

On my Remarkable I can go to Settings | Help | Copyright and Licenses to see my IP address and SSH root password.

Now I can scp and ssh root@192.168.1.71 and enter the password. Note that ssh and OpenSSH is built into Windows 10 so you don't need to install putty or WinSCP but feel free if it makes you happy. Just a reminder though that Windows has OpenSSH or you can use WSL on Windows 10.

After downloading .NET Core 3.1 to my local machine I use scp to copy to /home/root then I ssh into the Remarkable Tablet. Of course, your IP will be different.

scp .\dotnet-sdk-3.1.411-linux-arm.tar.gz root@192.168.1.71:/home/root
ssh root@192.168.1.71

Sweet.

image

Now, per their docs, from my ssh session on the Remarkable, I unzip dotnet and mark it as executable.

mkdir dotnet
tar xzf dotnet-sdk-3.1.411-linux-arm.tar.gz -C ./dotnet
chmod +x ./dotnet/dotnet

Fantastic. This is an amazing project. There's even an emulator that uses OpenTK to draw, so I can test locally.

The docs sample code is very idiomatic .NET. Nice stuff. For example:

// Create an image
var img = new Image<Rgb24>(300, 300);

// Do some image processing
img.Mutate(ctx => ctx.DrawLines(Color.Black, 3, new PointF(50, 50), new PointF(250, 250)));

// Draw the image to the screen
OutputDevices.Display.Draw(img, img.Bounds(), Point.Empty);

and

// Exit when home button is pressed
InputDevices.PhysicalButtons.Pressed += (sender, button) =>
{
if (button == PhysicalButton.Home)
CloseApp();
};

This is very easy to read.

If your are ssh'ed into your Remarkable 2, you can start|stop the main Remarkable interface with

systemctl start|stop xochitl

You may want to do this when running apps ssh'ed in. There's also a community repository of free software for the Remarkable called Toltec. It's like homebrew or winget or apt get for Remarkable. And the dotnet runtime is already in the Toltec listing, which is cool.

Thanks to TheRealShodan on Twitter for their help with this thread. They said:

I’m not going to lie the UX for new people isn’t perfect. Basically a new version dropped whilst the Toltec devs were mid re-architecture. Step one backup your root password and drop on a key!

2. Install Toltec but use the testing repo. Stable basically doesn’t work - I have already queried the nature of ‘stable’

3. Install the display package. This include r2fb which is a lib with hooks that make rm1 apps work on rm2. The community has kinda standardised on using the rm1 display API.

4. Install the display package. This include r2fb which is a lib with hooks that make rm1 apps work on rm2. The community has kinda standardised on using the rm1 display API. (Ed. Note. Nice to know .NET 5 works also!)

5. Build the remarkable.net sandbox binary as Release/ARM. Copy to device and run with rm2fb-client dotnet Sandbox.dll

6. At this point you will see that it doesn’t work as I haven’t put my PR in. You can try to fix by changing HardwareTouchscreenDriver construction in the lib

7. To see anything on screen you’ll have to go through my ramblings on discord. Basically find the DllImport references to libc and change this to point to /opt/lib/librm2fb_client.so.1.0.1

Also, to run your app shutdown xochitl otherwise they’ll both fight over the display and make a mess. Ideally you would use a launcher to manage that but as I’m just debugging I run from CLI. Don’t disable xochitl, that way a reboot will fix anything bad.

I'm still exploring but I'm enjoying the ride! (as always, no warranty express or implied!)

NOTE: If you mess up your remarkable messing around with Toltec or think you Bricked it (again, don't complain to me, please) you can connect it with USB and ssh root@10.11.99.1 locally and once you are there, there is a great thread here on how to uninstall Toltec.

Have fun, be safe.


Sponsor: Pluralsight helps teams build better tech skills through expert-led, hands-on practice and clear development paths. For a limited time, get 50% off your first month and start building stronger skills.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
July 25, 2021 18:26
Thanks for the link!

I appreciate the minimalism and focus of the reMarkable UI, but I wish they supported the DIY community just a bit more.

In your last review (which was very informative -- thank you!) you mentioned reviewing the Supernote soon. Is that still in the cards?
July 26, 2021 1:42
Hey Scott. WinRT -> UWP -> Maui
Why?
Just why?
July 27, 2021 6:36
Would like to see .net core run on something other than a micro-linux distro.

Can MS add to the effort to replace the linux kernel with something better, say built in Rust and a MIT license?

July 27, 2021 16:20
nice scott :)
thank you dude

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.