remarkable_printer/README.md

76 lines
2.3 KiB
Markdown
Raw Normal View History

2020-03-11 02:36:18 -04:00
# remarkable_printer
Print natively to your reMarkable wirelessly with no extensions or reMarkable cloud.
![](img.jpg)
## Install
2020-12-18 02:01:02 -05:00
Connect the reMarkable via USB and make sure it has internet access,
2020-03-11 02:36:18 -04:00
2020-12-18 02:01:02 -05:00
Connect to the reMarkable with [SSH](https://remarkablewiki.com/tech/ssh) and execute
2020-12-18 12:18:58 -05:00
wget -O - http://raw.githubusercontent.com/Evidlo/remarkable_printer/master/install.sh | sh
2020-03-11 02:36:18 -04:00
This will install and start the printer service on the reMarkable.
2020-12-18 02:01:02 -05:00
Alternatively, you can build and install the executable yourself with `make install`.
2020-03-11 02:36:18 -04:00
## Adding the reMarkable as a printer
2020-07-12 19:25:49 -04:00
#### Linux/OSX (easy)
2020-03-11 02:36:18 -04:00
2020-03-11 03:45:44 -04:00
Set `10.11.99.1` to your device's address or hostname.
2020-03-11 02:36:18 -04:00
2020-03-11 03:45:44 -04:00
make install_config host=10.11.99.1
2020-03-11 02:36:18 -04:00
#### Linux (manual)
We will add the reMarkable as an Appsocket/JetDirect printer.
Linux
$ sudo system-config-printer
# Add > Network Printer > AppSocket/HP JetDirect
# Enter the address/hostname of the device (10.11.99.1 for USB connected device)
# Forward > Generic > Forward > PDF > Forward
# Set the printer name and save
#### OSX (manual)
See [Add a network printer by its IP address](https://support.apple.com/guide/mac-help/add-a-printer-on-mac-mh14004/mac). Choose `HP Jetdirect` for the protocol.
2020-07-12 22:40:05 -04:00
#### Windows (manual)
See [here](https://github.com/Evidlo/remarkable_printer/issues/4)
2020-03-11 03:45:44 -04:00
#### Caveats
No authentication, so keep WiFi off while not in use.
2020-05-08 00:37:00 -04:00
## 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 script simply listens on TCP 9100 and waits for a PDF header, then begins saving data to a pdf file (while also creating the accompanying .metadata file). The output filename is extracted from the print job name line, if it exists.
2020-03-11 02:36:18 -04:00
## Testing on host
$ make printer.x86
$ ./printer.x86 -h
Usage of ./printer.x86:
-debug
enable debug output
-host string
override bind address (default "0.0.0.0")
-port string
override bind port (default "9100")
-restart
restart xochitl after saving PDF
-test
use /tmp as output dir
2020-12-20 23:53:26 -05:00
## Debugging
journalctl --unit printer -f