View Single Post
Old 12-30-2017, 03:51 PM   #13
svosg13
Enthusiast
svosg13 began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jun 2015
Location: Seattle, WA
Device: PRS-T1, DPT-S1, DPT-RP1
Quote:
Originally Posted by janten View Post
Hi everyone,

someone just tipped me that you guys discovered my Python (not JavaScript) script which I use do upload documents to my DPT-RP1. I realize that it is not very user friendly, it's just something I hacked together over the course of some days. The important findings are:
  • All interactions between the DPT-RP1 and the Digital Paper App use a REST interface that runs on the reader. When connected via WiFi, Bluetooth, or USB, the reader is available as digitalpaper.local.
  • The initial certificate generation and registration uses an unsecured interface at http://digitalpaper.local:8080, documents are transferred over a secured interface at https://digitalpaper.local:8443. You can either extract the certificates for the secure connection from the Digital Paper application or simply ignore the certificate validation.
  • When connected via USB, the reader presents itself as a network adapter. This is only required for the initial configuration. Once the reader has been set up, everything works via WiFi.
  • You can do the initial pairing using the Digital Paper application in a virtual machine running Windows on a Linux host. Simply pass the USB network device to the VM.
Great job and many thanks janten!!!

My company laptop is blocked on certain port so USB never works for me, only Bluetooth. By some stupid reason the Sony App does not allow setup Wifi AP through Bluetooth. Now I can do it with your python hack. This is great!

Just sharing the script i added using Janten's work to register WIFI AP:

PHP Code:
dp DigitalPaper('<your device client id>')
dp.authenticate()

data = { 
  
'ssid'base64.b64encode(b'<WIFI AP Name>'),
  
'security''psk',
  
'passwd''<WIFI password>',
  
'dhcp''true',
  
'proxy''false'
}
dp.put_endpoint(f"/system/controls/wifi_accesspoints/register"data=data
Don't forget to import base64.
svosg13 is offline   Reply With Quote