For developers
Printing from another device
Send jobs to this phone over the network from a script, a till or a web page.
With the print server on, this phone accepts jobs over the network and relays them to the printer it is connected to. Four ways in, each on its own port and each switched on separately in the app.
| Port | What it is |
|---|---|
| 8443 | Paired devices. Bearer token over TLS; pair once with the QR code. |
| 8080 | Browser page and JSON API. Password, not encrypted. |
| 6310 | IPP, for Add Printer on Windows, macOS and Linux. |
| 9100 | Raw ESC/POS, like a network printer. No password is possible. |
Raw ESC/POS
Exactly what a network thermal printer accepts. The bytes are passed through untouched.
cat receipt.bin > /dev/tcp/192.168.1.20/9100The JSON API
Content-Type decides how the body is treated, or set type= to be explicit.
curl -X POST "http://192.168.1.20:8080/api/v1/print?type=text" \
-u "web:ABCD-EFGH-JKLM" \
-H "Content-Type: text/plain; charset=utf-8" \
--data-binary @receipt.txt202 means the job is spooled and on its way, not that it is on paper: a thermal printer working through a queue can outlast any sensible timeout. Poll /api/v1/jobs if you need the outcome.
| Status | Meaning |
|---|---|
| 202 | Accepted and queued. |
| 401 or 403 | Wrong password, or the device is not allowed. |
| 404 | That printer is not shared. |
| 413 | The document is larger than the limit. |
| 429 | Too many jobs; retry after the given delay. |
| 503 | The printer needs attention, for example out of paper. |
CUPS
lpadmin -p RollCast -E -v ipp://192.168.1.20:6310/ipp/print -m everywhere
lp -d RollCast receipt.pdfTip
Ports below 1024 cannot be used by an app, so IPP is on 6310 rather than 631. Devices that discover the printer by name pick that up on their own; typed addresses need the port.