项目作者: Evidlo

项目描述 :
Native printing to reMarkable.
高级语言: Go
项目地址: git://github.com/Evidlo/remarkable_printer.git
创建时间: 2020-03-11T06:22:06Z
项目社区:https://github.com/Evidlo/remarkable_printer

开源协议:GNU General Public License v3.0

下载


remarkable_printer

Print natively to your reMarkable wirelessly with no extensions or reMarkable cloud.

Quick Start

Connect the reMarkable via USB and make sure it has internet access.

Connect to the reMarkable with SSH and execute

  1. wget -O - http://evidlo.github.io/remarkable_printer/install.sh | sh

Then configure your OS to print to the reMarkable, shown below.

Adding the reMarkable as a printer

Linux/OSX (easy)

  1. make install_config host=10.11.99.1

Linux (manual)

We will add the reMarkable as an Appsocket/JetDirect printer and use the PDF printer driver.

  1. $ sudo system-config-printer
  2. # Add > Network Printer > AppSocket/HP JetDirect
  3. # Enter the address/hostname of the device (10.11.99.1 for USB connected device)
  4. # Forward > Generic > Forward > PDF > Forward
  5. # Set the printer name and save

You may need to install system-config-printer first.

OSX (manual)

See Add a network printer by its IP address. Use 10.11.99.1 for the address and HP Jetdirect for the protocol.

Windows (manual)

See here

Caveats

No authentication, so keep WiFi off while not in use.

How it works

Virtually all network printers accept raw Postscript/PDF data on TCP port 9100 via the Appsocket/HP Jetdirect protocol. Sometimes this data is preceded by a few plaintext lines telling the printer information such as the print job name and print settings.

This setup simply listens on TCP 9100 and upon data sent waits for a PDF header, then begins saving data to a pdf file (while also creating the accompanying .metadata file) and then exits again, waiting for the next connection on the port to repeat the procedure. The output filename is extracted from the print job name line, if it exists.

Testing on host

  1. $ make printer.x86
  2. $ ./printer.x86 -h
  3. Usage of ./printer.x86:
  4. -debug
  5. enable debug output
  6. -host string
  7. override bind address (default "0.0.0.0")
  8. -port string
  9. override bind port (default "9100")
  10. -restart
  11. restart xochitl after saving PDF
  12. -test
  13. use /tmp as output dir

Debugging

On the reMarkable (via SSH)

  1. journalctl --unit printer -f

Then try to print a document.