Everything About DPT-RP1 When Using LINUX

Intro

You can get official DPT-RP1 support while using Windows or MacOS. Sony has a well-designed software Digital Paper App, which supports everything in the user manual.

Unfortunately, Sony do not support Linux. And the program above cannot be started by wine, as DPT-RP1 is using some weird mechanics: (setting the device as an USB-network adapter and controling the IO by posting and getting files from a virtual web server hosted in DPT-RP1.) and adding virtual printer and device drivers, which is unable to be handled by Linux and wine.

Here we introduces a python command tool dpt-rp1-py to operate DPT-RP1 on Linux.

A New Method

If your device can connect to the same local network to your computer, you can just connect it and do as the original tool guide.

With mDNS query installed on your computer correctly, you can create an alias like dptrp1="dptrp1 --addr digitalpaper.local" to speed up.

Install and Config

You can access the tool here. It supports pip3 so it can be installed easily by pip3 install dpt-rp1-py.

However, in order to get the device work, you may need some technics which do not show in their homepage. Here is the extra step (it's also written in their docs).

  • install the pyserial. (You can set it up by pip3 install pyserial.)

  • Plug in your device and create a python script file(we assume the filename is 'connect.py') and add these lines to the file.(You can download the file here directly.)

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/python

#This is used for automatically setup DPT-RP1
#to usb-network, before python package dptrp1
#starts.

#2020 Feb 18 by VICTRID
#you should have dptrp1 and pyserial installed.

import serial

tty=serial.Serial('/dev/ttyACM0',115200)
tty.write(b"\x01\x00\x00\x01\x00\x00\x00\x01\x00\x04")
  • run the script with python. (You can type python ./connect.py or something like this. You can also edit the code if you know what you're doing.)

  • De-activate DHCP on the new Ethernet device.

If you're using DHCP to obtain addresses, you should disable it for the DPT-RP1, since the DPT-RP1 does not run a DHCP server.

For example, if you're using Network Manager, change the IPv4 settings on the DPT-RP1 Ethernet device to 'Link-Local Only' instead of 'Automatic'. This will assign your end of the Ethernet link an IPv4 link-local address in the 169.254.0.0/16 range.

When using Network Manager, also make sure that in the 'Ethernet' tab, 'device' is set to the interface name, not the MAC address. This will help Network Manager to restore the settings when connecting next time.

  • Determining the address for DPT-RP1. You may use your DNS lookup to find the address of digitalpaper.local. e.g. you can run this:
1
2
3
4
5
6
7
$ avahi-resolve -n digitalpaper.local
digitalpaper.local fe80::xxxx:xxxx:xxxx:xxxx
(if the system returns deamon not activated,
use your service controller to start it, e.g.
# systemctl start avahi-daemon
# service avahi-daemon start
)
  • You need to get your device interface name. You may get it by ifconfig. It should be usb0 or enp0s20u1 or something.
  • Then your full address should be something like [fe80::xxxx:xxxx:xxxx:xxxx%usb0], by adding the interface name after the address, separating by %.

dptrp1 do not support searching your device under linux directly, so you should run dptrp1 with an additional parameter --addr="[fe80::xxxx:xxxx:xxxx:xxxx%usb0]" all the time (replace with your own address). You can add an alias like dptrp1USB="dptrp1 --addr=\"[fe80::xxxx:xxxx:xxxx:xxxx%usb0]\""to the shell to simplify, as the ip address won't change normally.

Use the Tool

Every time you plugged your device onto your computer, you need to run the file connect.py again to get your device responcing.

You may get usage by directly typing dptrp1 -h. you should've got

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
usage: dptrp1 [-h] [--client-id CLIENT_ID] [--key KEY] [--addr ADDR] [--serial SERIAL]
{command-help,copy-document,delete,delete-folder,document-info,download,list-documents,list-folders,move-document,new-folder,register,screenshot,sync,update-firmware,upload,wifi,wifi-add,wifi-del,wifi-disable,wifi-enable,wifi-list,wifi-scan}
[command_args [command_args ...]]

Remote control for Sony DPT-RP1

positional arguments:
{command-help,copy-document,delete,delete-folder,document-info,download,list-documents,list-folders,move-document,new-folder,register,screenshot,sync,update-firmware,upload,wifi,wifi-add,wifi-del,wifi-disable,wifi-enable,wifi-list,wifi-scan}
Command to run
command_args Arguments for the command

optional arguments:
-h, --help show this help message and exit
--client-id CLIENT_ID
File containing the device's client id
--key KEY File containing the device's private key
--addr ADDR Hostname or IP address of the device. Disables auto discovery.
--serial SERIAL Device serial number for auto discovery. Auto discovery only works for some minutes after the
Digital Paper's Wi-Fi setting is switched on.

For some command, you can get additional help by calling dptrp1 command-help <command>.

If you're connecting to the DPT-RP1 for the first time, you may need to register the device. The dptrp1 cannot search for your device under linux automatically, so you must do it by dptrp1 --addr="[fe80::xxxx:xxxx:xxxx:xxxx%usb0]" register to register it. If your alias was set, you can just type dptrp1USB register.

If you get an error, wait a few seconds and try again. Sometimes it takes two or three tries to work.

Remember that automatic searching is not suitable for linux USB connection, so it's a must to add the --addr="[fe80::xxxx:xxxx:xxxx:xxxx%usb0]" parameter.

Note that the root path for DPT-RP1 is Document/.

Example command to download a document file.pdf from the root folder ("System Storage") of DPT-RP1: dptrp1 download Document/file.pdf ./file.pdf.

Example command to upload a document file.pdf to a folder named Articles on DPT-RP1: dptrp1 upload ./file.pdf Document/Articles/file.pdf.

Postscripts

You may refer to the origin site for more advanced details, such as dptmount(experimental) to mount your device as a disk, or other interesting functions.

Ads by Google

Read our privacy policy on how these personalized advertisements are delivered to you.

For your reading experience, we provide full-text RSS feeds. Although math formulas cannot be displayed well, the interface can be adjusted as you like and there are no ads.