Giter Club home page Giter Club logo

dpt-rp1-py's Introduction

dpt-rp1-py

Python script to manage Sony DPT-RP1 without Digital Paper App. This repository includes a Python library and a command line utility to manage documents on the DPT-RP1. Tested on Windows, Linux, and macOS.

Install

To install the library run python3 setup.py install or pip3 install . from the root directory. To install as a developer use python3 setup.py develop (see the setuptools docs) and work on the source as usual.

Installing the package also installs the command line utility called dptrp1.

Using the command line utility

dptrp1 \
	--addr <DPT-RP1 hostname or IP address> \
	--client-id <client_id file> \
	--key <key file> \
	command [arguments]

The required files for the client ID and private key will be created when you first register the reader. The files can also be extracted from the original Digital Paper App.

Supported commands

You can get a list of the implemented commands by running dptrp1 with no additional arguments. Supported commands include register, list-documents, download [], upload , new-folder , delete <remote_path>, wifi-list, wifi-scan, wifi-enable, and wifi-disable.

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 --client-id ~/deviceid.dat --key ~/privatekey.dat --addr 10.0.0.4 download Document/file.pdf ./file.pdf
  • Example command to upload a document file.pdf to a folder named Articles on DPT-RP1: dptrp1 --client-id ~/deviceid.dat --key ~/privatekey.dat --addr 10.0.0.4 upload ./file.pdf Document/Articles/file.pdf

Registering the DPT-RP1

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.

Registering without the Digital Paper App

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 on macOS but may not work on a Linux machine. If you the USB connection does not work for you, perform the initial setup on a different PC to connect the reader to your WiFi network.

Second, find the DPT-RP1's IP address. If you're on WiFi, go to Wi-Fi Settings on the device and tap the connected network. If you're on Bluetooth, it's likely 172.25.47.1. You can also try the hostname digitalpaper.local.

Finally, use the register command, substituting the files you want the client ID and key written to, and the IP address of the device:

dptrp1 \
	--client-id <client_id file> \
	--key <key file> \
	--addr <address> \
	register

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

Finding the private key and client ID on Windows

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.

Finding the private key and client ID on macOS

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.

dpt-rp1-py's People

Contributors

janten avatar bpteague avatar farhaven avatar pi8027 avatar cvcore avatar happyz avatar x-ji avatar y-yu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.