Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration not working with Fujitsu Quaderno 2nd Gen #124

Open
bnewbold opened this issue Aug 17, 2021 · 13 comments
Open

Registration not working with Fujitsu Quaderno 2nd Gen #124

bnewbold opened this issue Aug 17, 2021 · 13 comments

Comments

@bnewbold
Copy link

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

@janten
Copy link
Owner

janten commented Aug 17, 2021

Can you provide a copy of the firmware?

@bnewbold
Copy link
Author

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.

@Fairy-Cat
Copy link

Fairy-Cat commented Nov 9, 2021

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

@vico
Copy link
Contributor

vico commented Dec 10, 2021

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.

@fabid
Copy link

fabid commented Mar 19, 2022

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

@EvilxFish
Copy link

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

@bnewbold
Copy link
Author

bnewbold commented May 7, 2022

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!

@EvilxFish
Copy link

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

@plaublin
Copy link
Contributor

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.

@EvilxFish
Copy link

EvilxFish commented Jun 12, 2022

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)]

@rpygithub
Copy link

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

@EvilxFish
Copy link

EvilxFish commented Jan 30, 2023

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.

@leblonda
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants