dpt-rp1-py icon indicating copy to clipboard operation
dpt-rp1-py copied to clipboard

Registration not working with Fujitsu Quaderno 2nd Gen

Open bnewbold opened this issue 3 years ago • 13 comments

Here is what I get when I tried to register a brand new QUADERNO A4 (Gen. 2) (FMVDP41). Note that I have redacted the serial number, and added a single print() line for the variable m3:

$ dptrp1 register
Discovering Digital Paper for 30 seconds…
/home/bnewbold/dpt-rp1-py/.venv/lib/python3.8/site-packages/zeroconf/_services/browser.py:169: FutureWarning: <dptrp1.dptrp1.LookUpDPT object at 0x7f9f37cfd790> has no update_service method. Provide one (it can be empty if you don't care about the updates), it'll become mandatory.
  warnings.warn(
Found Digital Paper with serial number [REDACTED]
To discover only this specific device, call:

    /home/bnewbold/dpt-rp1-py/.venv/bin/dptrp1 --serial [REDACTED] register

Found digital paper at 192.168.0.139
To skip the discovery process (and this message), call:

    /home/bnewbold/dpt-rp1-py/.venv/bin/dptrp1 --addr 192.168.0.139 register

Cleaning up...
<Response [204]>
Requesting PIN...
Encoding nonce...
{'error_code': '40301', 'message': 'Bad parameters for registration process.'}
Traceback (most recent call last):
  File "/home/bnewbold/dpt-rp1-py/.venv/bin/dptrp1", line 8, in <module>
    sys.exit(main())
  File "/home/bnewbold/dpt-rp1-py/.venv/lib/python3.8/site-packages/dptrp1/cli/dptrp1.py", line 345, in main
    do_register(
  File "/home/bnewbold/dpt-rp1-py/.venv/lib/python3.8/site-packages/dptrp1/cli/dptrp1.py", line 208, in do_register
    _, key, device_id = d.register()
  File "/home/bnewbold/dpt-rp1-py/.venv/lib/python3.8/site-packages/dptrp1/dptrp1.py", line 240, in register
    if base64.b64decode(m3["a"]) != n2:
KeyError: 'a'

So it seems like the discovery part works, which is cool!

But from a first guess I would assume there has been some change to the registration process. I was able to sync and upload files from an Android mobile device, so I don't think it is a problem with the reader itself. The reader firmware version is 1.0.00.17060FP.

Thanks for maintaining this cool python tool! Hoping this will be an easy way for me to transfer files to/from my device from Linux (Debian).

bnewbold avatar Aug 17 '21 23:08 bnewbold

Can you provide a copy of the firmware?

janten avatar Aug 17 '21 23:08 janten

I'm not sure! Is that something I can extract via USB? Or find on the vendor homepage? I don't know how to, eg, get 'adb' working with this device.

bnewbold avatar Aug 18 '21 01:08 bnewbold

Can you provide a copy of the firmware? I bought a quaderno A5(gen2), it's firmware is 1.0.00.17060FP, but can't get ID and private key through 'dptrp1 register'. The firmware can be downloaded from here: https://www.fmworld.net/download/digital-paper/sw/FwUpdater_gen2_1.0.00.17060FP.pkg the lastest one: https://www.fmworld.net/download/digital-paper/sw/FwUpdater_gen2_1.1.00.09240FP.pkg

Fairy-Cat avatar Nov 09 '21 03:11 Fairy-Cat

FYI, I have successfully registered my Fujitsu Quaderno 2nd Gen (A4), via WiFi. I am using Ubuntu 21.10 and using package installed via pip.

vico avatar Dec 10 '21 10:12 vico

I was having the exact same issue on ubuntu 20.04, but after installing libfuse (based on the hint for mounting as a file system), it now works

sudo apt install libfuse3-3

fabid avatar Mar 19 '22 12:03 fabid

Neither attempting to install fuse nor registering via wifi worked for me (same device Quaderno A4 gen 2), running arch linux.

EvilxFish avatar Apr 14 '22 14:04 EvilxFish

I tried again with a more recent version of dpt-rp1-py (dpt_rp1_py-0.1.16) and things worked over USB/ethernet! I was able to register and upload PDFs to the device.

From skimming the above I installed libfuse3-3 before trying (I am running debian 11/bullseye on amd64). Not sure if that is what fixed things, or changes in dpt-rp1-py itself.

I'm hesitant to close this as it sounds like others are still having trouble, but this seems to be fixed for me. Very excited to not have to upload files via my phone, thanks for maintaining this cool tool!

bnewbold avatar May 07 '22 04:05 bnewbold

Just thought I'd give an update for the error I seem to get when trying to register through the cable (note have tried wifi as well).

Discovering Digital Paper for 30 seconds��� Failed Cleaning up... Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

EvilxFish avatar Jun 10 '22 14:06 EvilxFish

It looks like it tries to connect to the wrong address.

Can you double check the following?

  • the 2 lines in dmesg that appear when you activate ethernet-over-usb, e.g.,
cdc_ether 2-1:1.0 usb0: register 'cdc_ether' at usb-0000:00:14.0-1, CDC Ethernet Device, aa:bb:cc:dd:ee:ff
cdc_ether 2-1:1.0 iface0: renamed from usb0   
  • the configuration of your new iface0 interface (see this doc);
  • avahi-resolve -n Android.local, which will give you a line such as Android.local fe80::xxxx:xxxx:xxxx:xxxx

Then, you should be able to run dptrp1 --addr [fe80::xxxx:xxxx:xxxx:xxxx%iface0] sync without errors.

plaublin avatar Jun 10 '22 22:06 plaublin

Thank you so much for this, sync now works without issue and I can transfer files to and from the device (will need to test uploading new pdfs but this should work... I hope...). This is a godsend for me, and I really appreciate the work you do here, do you have a donation page or anything? The only problem I have now is it keeps loosing the connection and I need to repeat the process of connecting it, is there an easy way of solving that? In case there is someone else who is having issues, I will put some of the steps I needed to do below (aimed at Arch linux users but may be useful for others as well):

  1. install avahi
  2. start avahi-daemon.service
  3. install python-pyserial from repository (I tried using pip but this did not work for some reason)
  4. as root run the following python code: import serial ser = serial.Serial('/dev/ttyACM0' , 9600, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE) values = b"\x01\x00\x00\x01\x00\x00\x00\x01\x01\x04" ser.write(values)
  5. run avahi-resolve -n Android.local copy that address
  6. run sudo dmesg look for cdc_ether 3-1:1.0 enp0s20u1: renamed from usb0 or similar (the code enp0s20u1 in my case is what you put after the % in the example given in the end of the previous message .
  7. run the code as in previous message but swap sync for register the first time you use it. enter pin shown on device. [note in my case the device kept loosing connection and you have to unplug plug back in and go back to 4).]
  8. make/find a folder you want to use for your device then use the command at the end of the previous message but put the directory you want to use after sync as well. [again device may disconnect randomly, and if it does - yep go back to 4)]

EvilxFish avatar Jun 12 '22 15:06 EvilxFish

I have hit this myself, but after restarting Wi-Fi on the device and attempting registration again, it worked.

rpygithub avatar Jan 28 '23 21:01 rpygithub

I will add the above does not work when I try and use this device at work. I get Failed to resolve host name 'Android.local': Timeout reached as an error on step 5, and I am unable to find the host name among the 10's of thousands of devices that exist on my organizations network. I almost regret buying one of these things, why is it so difficult to connect it to a computer?! Any help would be appreciated, thank you.

EvilxFish avatar Jan 30 '23 01:01 EvilxFish

I got the exact same error (the one ending with KeyError: 'a') using a Quaderno Gen2 and Ubuntu. I just tried again and again while turning off and on again the wifi connection and eventuallty it works (maybe 10 tries?).

leblonda avatar Aug 22 '23 17:08 leblonda