惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
NISL@THU
NISL@THU
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cisco Talos Blog
Cisco Talos Blog
A
Arctic Wolf
T
Troy Hunt's Blog
U
Unit 42
Forbes - Security
Forbes - Security
J
Java Code Geeks
P
Privacy International News Feed
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
H
Heimdal Security Blog
量子位
Martin Fowler
Martin Fowler
G
Google Developers Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
罗磊的独立博客
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
D
DataBreaches.Net
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
S
Secure Thoughts
Apple Machine Learning Research
Apple Machine Learning Research

Victrid's Personal Site

斯普拉遁3打工模式联机网络过程分析 DHCP无类型静态路由──一个摆设 配置透明代理,实现无感上网 Generating Unlimited Grammar: A Messenger Perspective LaTeX插入其他PDF中的矢量图 光速不变原理和迈克尔孙──莫雷实验 交大葡萄演义 调试微信内置浏览器 欧悌甫戎篇 苏格拉底的申辩篇 LCA 最近公共祖先 弥罗斯人的辩论 埃斯库罗斯作品:波斯人、阿伽门农 电路理论资料 Coronavirus: A Humanitarian Crisis 雨夜 linux配置SSR 二叉堆的实现 懒政 Placement New Flipped: A Love Story 我宁可呆在这样的疯人院里 谈新发本地病例 勇敢与智慧 Powerful but Limited Drafted VLC Libva Error Troubleshooting Ring-Fit新上手 政治艺术化与艺术政治化 动态规划——从分割等和子集入手 被背叛的革命 (1) HTTP STATUS 451 二分法——重复情形 鸽巢排序与桶排序 为什么要写博客 系统更换 动窗法与前缀和——简单实践 非类型模板参数 判断的短路规则 CodeBlocks重装 C-Style String Operation
Everything About DPT-RP1 When Using LINUX
Victrid · 2020-02-18 · via Victrid's Personal Site

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
14









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.


)
  • 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.

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
20
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.