Inspired by https://github.com/janten/dpt-rp1-py
Script to manage Sony DPT-RP1 without the Digital Paper App.
This repository includes:
- a Java library
- a command line utility to manage documents on the DPT-RP1
- a CUPS driver to use the DPT as a printer
- a FUSE mounter to navigate the dpt as a disk on a userspace mount-point
- a server to proxy whiteboard refreshes to a webpage (dpt whiteboard-html) you can share with people
- a translation (more and more complete) of the official endpoint documentation at doc/endpoints.json
- a packaging script to create a .deb package at debian/makedeb.sh
- I'd love to have people testing this on Windows
- Building an rpm and a mac pkg
- Testing the CUPS driver on many more archs
You can install on debian using the deb package at https://github.com/xpierrohk/DigitalPaperApp/releases
# apt install dpt_<version>.deb
Run dpt or man dpt to get more information.
To install the library from the sources, clone this repository, then run mvn clean install
from the root directory.
The use the script in install/linux.sh to setup up the dpt command in your home folder.
Type dpt --help to find all the possible options:
dpt is an utility to manage a Sony Digital Paper device
Usage: dpt COMMAND [PARAMETERS] [OPTIONS]
Options that can be passed to every commands, but aren't mandatory to find the device:
-addr=IP_ADDR ip address of the DPT
-serial=SERIAL serial code of the device
Available commands:
register Starts the pairing process with the Digital Paper
ping Tests the connection with the Digital Paper
sync [local-sync-folder] [-dryrun] Synchronizes a local folder with the Digital paper. If no folder is given, it will use the one passed previously
list-documents Lists all documents
document-info Prints all documents and their attributes, raw
upload local-file [remote-file] Sends a local file to the Digital Paper
download Downloads a remote file locally
move source target Moves a document on the device
copy source target Copies a document on the device
new-folder remote-folder Creates a new folder on the device
delete-folder remote-file Remove a folder on the device
delete remote-file Deletes a file on the device
print local-file Sends a pdf to the Digital Paper, and opens it immediately
watch-print local-folder Watches a folder, and print pdfs on creation/modification in this folder
screenshot png-file Takes a PNG screenshot and stores it locally
whiteboard [-orientation] [-scalingFactor] Shows a projection of the digital paper, refreshed every second, orientation=[portrait|landscape],
the scaling factor is a multiplier of the resolution (0.5 by default)
whiteboard-html Opens a distribution server with /frontend path feeding the images from the Digital Paper
dialog title content button Prints a dialog on the Digital Paper
get-owner Displays the owner's name
set-owner owner-name Sets the owner's name
wifi-list Lists all wifi configured on the device
wifi-scan Scans all wifi hotspot available around the device
wifi-add Adds a wifi hotspot (obsolete since the latest firmware)
wifi-del Deletes a wifi hotspot (obsolete since the latest firmware)
wifi Displays the current wifi configured
wifi-enable Enables the wifi network device
wifi-disable Disables the wifi network device
battery Shows the battery status informations
storage Shows the storage status informations
check-firmware Check if a new firmware version has been published
update-firmware [-force] [-dryrun] Check for update and update the firmware if needed. Will ask for confirmation before triggering the update. Use -dryrun to test the process.
get url Sends and displays a GET request to the Digital Paper
mount [mount-point] FUSE-mounts the DPT at the specified mount point. If not mount point is specified, it will attempt to use the one passed previously
insert-note-template name path Inserts a new note template from the specified file, with the specified name
get-configuration path Saves the system configuration to a local file at <path>
set-configuration path Sends the system configuration from a local file at <path>
root [-dryrun] Roots the device
diag fetch remote-path local-path Downloads a file from the diagnostic mode, after root. See doc/diagnosis_mod_map.md
diag exit Exits the diagnostic mode (triggers a reboot)
unpack pkg target-directory Unpacks an update pkg file into a data and animation archives
adb list-extensions Lists all extensions installed on the Digital Paper
adb fetch-extension name local-path Retrieves extension descriptors as returned by dpt adb list-extensions
adb setup-extension name component action icon-path Setup an extension (apk intent launcher) for the official app launcher.
adb remove-extension name Removes a user-space extension, do not use to delete offical apps.
adb install-apk local-path Installs an APK and enables it in the launcher
help Prints this message
Disconnected from the target VM, address: '127.0.0.1:40211', transport: 'socket'
Process finished with exit code 0
The DPT-RP1 uses SSL encryption to communicate with the computer. This requires registering the DPT-RP1 with the computer, which results in two pieces of information -- the client ID and the key file -- that you'll need to run the script. You can get this information in three ways.
This method requires your DPT-RP1 and your computer to be on the same network segment via WiFi, Bluetooth or a USB connection. The USB connection works on Windows and macOS but may not work on a Linux machine. If your WiFi network is not part of the "Saved Network List" (for example if you don't have the app), you can still use the DPT-RP1 as a WiFi access point and connect your computer to it.
register
The tool can generally figure out the correct IP address of the device automatically, but you may also specify it with the --addr <address>
option. If you're on WiFi, go to Wi-Fi Settings on the device and tap the connected network to see the device's address. If you use a Bluetooth connection, it's likely 172.25.47.1. You can also try the hostname digitalpaper.local. Use the register command like seen below, substituting the IP address of the device.
--addr 10.0.0.1 register
If you get an error, wait a few seconds and try again. Sometimes it takes two or three tries to work.
If you have already registered on Windows, the Digital Paper app stores the files in Users/{username}/AppData/Roaming/Sony Corporation/Digital Paper App/. You'll need the files deviceid.dat and privatekey.dat.
If you have already registered on macOS, the Digital Paper app stores the files in $HOME/Library/Application Support/Sony Corporation/Digital Paper App/. You'll need the files deviceid.dat and privatekey.dat.
You can mount the dpt on a userspace mount point with the following:
dpt mount <mountpoint>
The mount point is then browsable, and you can read, copy, rename, delete files and folders.
- Getting changes from the dpt after the mount point has been created.
For now the file cache is aggressive, in the sense that all files and folder trees are precalculated, changes you do via the mount point are taken into account, but changes from the dpt or another source will not. Furthermore, the content of files are cached the first time they're accessed, and the mounter will consume more and more memory as you open files around.
--addr 192.168.0.107 register
--addr 192.168.0.107 ping