Skip to main content

Xteink X4 Pro Firmware Installation

Interested in hacking on getting the X4 Pro working with TRMNL? Not so concerned about potentially bricking your device. Well, here's what we know.

Written by Mario

The X4 Pro is a 2026 released 4” pocket e-reader that contains hardware (e-paper display and processor) which is supported by the TRMNL firmware. Installing custom firmware on X4 Pro can be more difficult than other ESP32 devices and, at the time of this writing, will not be directly supported by the TRMNL firmware. However, if you accept the risks and challenges of running TRMNL on your X4 Pro, this guide can help you accomplish it.

Preparing the X4 Pro

  • The unlocked X4 Pro’s bootloader likely has the USB-CDC firmware update path disabled. This means that on a new device, the firmware cannot be changed with a USB cable. The Crosspoint project has figured out how to create a binary file to update the firmware from the microSD card or over WiFi: https://github.com/crosspoint-reader/crosspoint-reader/issues/4441#issuecomment-6883633325

  • If you succeed in flashing the Crosspoint firmware, and it re-enables the ability to flash firmware from USB, then you will be able to install a custom build of TRMNL firmware on the device.

Adding the X4 Pro to a custom build of trmnl-firmware

Recent changes in the trmnl-firmware have made it much simpler to add support for new devices (both BYOD and native). In the simplest case, only 2 files need to be modified.

  1. board_config.cpp:
    There are 2 lists of device parameters - a short list for parallel e-ink devices and a longer list for serial (SPI) devices. The X4 Pro has an SPI-connected display, so it would be added to the second list. Each parameter column has a comment label at the top (e.g. sck) indicating the GPIO pin connected to the SPI Clock line of the display, and the last column defines the display panel type. Add a new line (the position in the list is not important) for the X4 Pro and create a unique ASCII name for it (e.g. x4_pro).
    Since Xteink does not publish schematics or any internal info about their hardware, the only place to gather that is from experimenters who have found the info such as this site: https://github.com/developing-today/hardware-doc/blob/main/devices/xteink/x4-pro/pinouts-and-buses.md
    *** We cannot verify the accuracy of this information. ***
    ​

  2. platformio.ini:
    This file contains an entry for every build target. For the X4 Pro, you can start by copying the info from a similar device such as the Seeed reTerminal Sticky (env:seeed_sticky). Change the DEVICE_MODEL macro to your chosen name (e.g. x4_pro) and confirm that the build flags and flash size/speed parameters are appropriate for the ESP32 type in the X4 Pro.
    ​
    If the device doesn’t need any special GPIO configuration to properly power it or put it to sleep, then you may be done. If it does, then you’ll need to create a unique macro to identify the device and add (with #ifdefs) new code to wake_init.cpp and sleep_session.cpp that are unique to the X4 Pro.

Wrap Up

If your efforts are successful and your testing shows that the new code is functional and safe, then we encourage you to create a pull request to add your code to the trmnl-firmware and submit to our BYOD page.

Thousands of customers depend on the stability and efficiency of our firmware. We carefully evaluate new code and discourage direct interaction with the eink displays. Please make use of existing code in the FastEPD or bb_epaper libraries to update the display.

Did this answer your question?