Crates.io | miractl |
lib.rs | miractl |
version | 0.1.0 |
source | src |
created_at | 2023-03-01 16:22:04.759591 |
updated_at | 2023-03-01 16:22:04.759591 |
description | Library and CLI utility to control Boox Mira e-ink montiors |
homepage | http://github.com/clarkema/miractl |
repository | http://github.com/clarkema/miractl |
max_upload_size | |
id | 798141 |
size | 60,334 |
miractl is a utility to manage Boox Mira and Mira Pro e-ink displays.
Currently there are no pre-built binaries available. You’ll need a Rust toolchain installed, then from the repository root you can run:
$ cargo build --release
Then just copy target/release/miractl
to somewhere in your path. On Linux you
will also need appropriate udev rules; see below.
Refresh the display:
$ miractl refresh
Set display parameters:
$ miractl set --warm 25 --cold 15
$ miractl set --filter 10:96 --contrast 5
Select a display mode:
$ miractl mode read
$ miractl mode speed
Both must be set at the same time, in the format WHITE:BLACK
where WHITE
and BLACK
are integers between 0 and 127.
The Mira displays both support a contrast setting and have an adjustable colour filter. The interaction can be a little confusing.
The second slider down on the screen UI and the setting labelled “dark color enhancement” in the official app both adjust the contrast of the display, between 0—15.
The third slider down on the screen UI and the setting labelled “light color filter” in the official app adjust the white filter.
The white and black filters work in a manner analogous to setting the white and black points of a photograph. Anything lighter than the white filter point is considered to be white; anything darker than the black filter point is considered to just be black. This leads to losing some detail in the lightest and darkest parts of the image, but it can be a significant benefit in general web browsing use. Webpages often have backgrounds that are not 100% white; without a white filter they would appear dithered on the display—the effect is unnecessarily distracting. The white filter allows you to get rid of the dithering and have the background display as though it were pure white, resulting in a higher-contrast image that works better on the e-ink display.
The black filter works in the same way, and can be useful with dark text that isn’t actually black.
It’s not possible to set the black filter directly from the display UI or the Boox app at the time of writing; instead, it forms part of the presets that make up the official default display modes.
Display modes are essentially built-in pre-defined combinations of the
lower-level parameters. There are five: speed
, text
, image
, video
, and
read
.
I only have one Boox Mira for testing. I believe this should work with the Pro as well, but if you have multiple Mira screens your mileage may vary. PRs / testers welcome.
The auto dithering setting is not yet supported.
Create /etc/udev/rules.d/58-hid.rules
Copy the following rules into the file to support hidraw
and libusb
.
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", MODE="0666", GROUP="plugdev"
udevadm control --reload-rules && udevadm trigger
The core of the USB interface was based on knowledge from https://github.com/ipodnerd3019/mira-js.