janten/dpt-rp1-py

Cannot Register

Spiraer opened this issue · 14 comments

I should preface by saying that I cannot register my (recently reset) DPT RP1 device with the official DP app either. When attempting to issue a certificate, I get an error on it (24-0000-0000) after inserting the code found on my DP screen.

(I cannot connect to WiFi without adding it to my networks list via DP app because my firmware is too old (1.2.02.07211). I wish I could root or update somehow, but I cannot.)

So, I tried this script. I tried to connect on Linux and Windows. In both cases, the device is detected by the computer. lsusb returns the device on Linux and it shows on the device manager on Windows.

In both cases, dptrp1 register (and dptrp1 register --serial XXXXXXX) fail :

Discovering Digital Paper for 30 seconds…
Failed
Cleaning up...

Followed by tracebacks that boil down to : [Errno 11001] getaddrinfo failed


Assuming this is an issue, here is my report.
If it is not, and the issue is just with me, is there a reasonable way to force a connection through a particular USB port? (Or, literally, any other idea you may have?)

Sincerely desperate,

If your PC has a Bluetooth adapter, try connect the device via Bluetooth.

If your PC has a Bluetooth adapter, try connect the device via Bluetooth.

Unfortunately I already tried that. Should have mentioned it. My Windows setup detects it fine, and connects, but it is then not recognized by the script.

Do you know your reader's IP address? If so, pass it to the script using the --addr option.

Do you know your reader's IP address? If so, pass it to the script using the --addr option.

Pardon my ignorance, I don't know how to get that. Is it possible for something to have an IP without being connected to a WiFi/Ethernet network?

The DPT RP1 always uses a network connection. If you connect using USB, it will present itself as a USB network adapter to the host and establish the connection trough that adapter. It should show up in your network settings.

If you are using a Bluetooth connection, just try --addr 172.25.47.1

Well, that got somewhere.

On Linux :
-I can't seem to connect through Bluetooth. Daemon says the device lacks the gsm attribute.
-lsusb still lists the device, but ifconfig doesn't show a network connection. I looked around for any sign of one in system settings. No dice.

On Windows :
-Although detected as a usb device, the DPT-RP1 doesn't show as a network adapter - or even anywhere in Device Manager outside of Bluetooth (But it shows as a USB connection is "Bluetooth & other devices", go figure). It doesn't show up in the Network & Internet Control Panel either as a USB network.
-So I tried through Bluetooth following your advice (--addr 172.25.47.1) and it does react to it. However :

[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'

(I tried doing that both with the 'Setup Digital Paper App' mode ON and OFF, with the same result)

This is new.

I wondered if the IP was correct, and I checked in Devices & Printers > Bluetooth Personal Area Network Devices. The DPT-RP1 does show up there, but the IP shows as Unavailable in the Bluetooth Tab.

__

To recap, the DPT-RP1 seems capable of connecting to computers and being detected properly as a device, sending a confirmation to the dpapp that it is connected, and receive instructions to display a registration key, reacting in tune. However, I've so far been unable (might very well be incompetence) to find an IP for it using any method listed above, and trying the standard IP you gave me led to it failing to respond in time.

I just had an extra idea. I ran the dpapp, and got it connected to the device, since it changes the display on the screen and ultimately manages to get the DPT-RP1 to display a code. Then I ran dptrp1 register whilst in the state obtained by dpapp. It didn't work.

Just some random guesses at this point:

  • Do you use a proper USB cable, not a charge-only one?
  • Are date and time set correctly on your computer?
  • Did you try to re-initialize the reader?

I located the device in Device Manager on Windows!

Unfortunately it's listed as a USB composite device. Events show it doesn't migrate. This might be a driver issue.

Running driverinstall.bat from the Digital Paper App folder does not fix this issue. Running dpinst.exe returns "The device driver installation wizard was unable to find any drivers designed for your machine. (...)"

Additionally, I get the following errors in USB Device Viewer, further showing that my device is badly detected as USB.

===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00
*!*ERROR: device class should be Multi-interface Function 0xEF
          When IAD descriptor is used
bDeviceSubClass:                   0x00
*!*ERROR: device SubClass should be USB Common Sub Class 2
          When IAD descriptor is used
bDeviceProtocol:                   0x00
*!*ERROR: device Protocol should be USB IAD Protocol 1
          When IAD descriptor is used
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x054C = Sony Corporation
idProduct:                       0x0BE5
bcdDevice:                       0x0100
iManufacturer:                     0x02
     English (United States)  "Sony"
iProduct:                          0x03
     English (United States)  "DPT-RP1"
iSerialNumber:                     0x04
     English (United States)  "324650005020675"
bNumConfigurations:                0x01

Just some random guesses at this point:

  • Do you use a proper USB cable, not a charge-only one?
  • Are date and time set correctly on your computer?
  • Did you try to re-initialize the reader?

Yes, yes, and yes.

aluex commented

I have the same problem.

Can you update the firmware through the official application and then use WiFi to continue?

ifree commented

Managed to get the registration done through USB connection. Here are some solutions that may work:

  1. root your dpt, then you could get the device ip address via adb shell ip addr (note the ip address format is ipv6
  2. use Process Explorer to monitor DigitalPaperApp's TCP connection. Search active TCP connection with port 8080