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

Unable to connect to DPT-RP1 via bluetooth from Ubuntu 20.04

Open DanielYang59 opened this issue 2 years ago • 1 comments

Hi there, I tried to connect to my Sony DPT-RP1 DigitalPaper from my X1 Carbon 2018 laptop for several days but didn't get lucky. I guess there could be something wrong from the bluetooth settings side and please help me find out what could have been wrong here.

The OS I'm running is Ubuntu 20.04, with Python 3.9.7 from Anaconda3 distribution. The Software Version of the DigitalPaper is 1.6.50.14130 and should be the latest because I tried to update it on the App from Windows.

Also, I have to say I succeed in register and listi-documents via both wired connection following this tutorial and via "start WiFi Access Point" from the device. However, I don't want to be carrying a cable all the time or interupt my laptop's Internet connection by connecting to the DigitalPaper's access point. That's why I really wish to fix the Bluetooth connection.

Here's the details about the experiments I tried till now:

  1. Tried to pair the Digitalpaper on Bluetooth, and was successful. Also, tried to manually connect to it by running bluetoothctl and then connect A8:1D:16:07:DA:B4, which gives:
[CHG] Device A8:1D:16:07:DA:B4 Connected: yes
[CHG] Device A8:1D:16:07:DA:B4 ServicesResolved: yes

And after a few seconds:

Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device A8:1D:16:07:DA:B4 ServicesResolved: no
[CHG] Device A8:1D:16:07:DA:B4 Connected: no

I'm not sure if such auto-disconnect behaviour is normal because I do notice similar behaviour under Windows.

  1. Tried to run dptrp1 register, which gives:
Discovering Digital Paper for 30 seconds…
Failed
Cleaning up...
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/opt/anaconda3/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1279, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1325, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1274, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1034, in _send_output
    self.send(msg)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 974, in send
    self.connect()
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6988255dc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='none', port=8080): Max retries exceeded with url: /register/cleanup (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6988255dc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yang/.local/bin/dptrp1", line 8, in <module>
    sys.exit(main())
  File "/home/yang/.local/lib/python3.9/site-packages/dptrp1/cli/dptrp1.py", line 348, in main
    do_register(
  File "/home/yang/.local/lib/python3.9/site-packages/dptrp1/cli/dptrp1.py", line 211, in do_register
    _, key, device_id = d.register()
  File "/home/yang/.local/lib/python3.9/site-packages/dptrp1/dptrp1.py", line 198, in register
    r = self.session.put(register_cleanup_url)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 602, in put
    return self.request('PUT', url, data=data, **kwargs)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='none', port=8080): Max retries exceeded with url: /register/cleanup (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6988255dc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
  1. Tried to run "dptrp1 register --serial 6305093", which seems to give the same results:
Discovering Digital Paper for 30 seconds…
Failed
Cleaning up...
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/opt/anaconda3/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1279, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1325, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1274, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 1034, in _send_output
    self.send(msg)
  File "/opt/anaconda3/lib/python3.9/http/client.py", line 974, in send
    self.connect()
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6a114efdc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='none', port=8080): Max retries exceeded with url: /register/cleanup (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6a114efdc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yang/.local/bin/dptrp1", line 8, in <module>
    sys.exit(main())
  File "/home/yang/.local/lib/python3.9/site-packages/dptrp1/cli/dptrp1.py", line 348, in main
    do_register(
  File "/home/yang/.local/lib/python3.9/site-packages/dptrp1/cli/dptrp1.py", line 211, in do_register
    _, key, device_id = d.register()
  File "/home/yang/.local/lib/python3.9/site-packages/dptrp1/dptrp1.py", line 198, in register
    r = self.session.put(register_cleanup_url)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 602, in put
    return self.request('PUT', url, data=data, **kwargs)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='none', port=8080): Max retries exceeded with url: /register/cleanup (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6a114efdc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

Some additional information which might be helpful:

  1. lsusb gives:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp. USB3.0-CRW
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 06cb:009a Synaptics, Inc. 
Bus 001 Device 004: ID 5986:2115 Acer, Inc Integrated Camera
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 002: ID 1532:007b Razer USA, Ltd Razer Viper Ultimate Dongle
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  1. Bluetooth-info gives: image

  2. Also, I tried to create python 3.8/3.7 environments and run this script and same error again.

Discovering Digital Paper for 30 seconds…
Failed
Cleaning up...
Traceback (most recent call last):
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/home/yang/.conda/envs/sony/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/home/yang/.conda/envs/sony/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/yang/.conda/envs/sony/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/yang/.conda/envs/sony/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/yang/.conda/envs/sony/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/home/yang/.conda/envs/sony/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f12fc3cea60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/requests/adapters.py", line 440, in send
    resp = conn.urlopen(
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='none', port=8080): Max retries exceeded with url: /register/cleanup (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f12fc3cea60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yang/.conda/envs/sony/bin/dptrp1", line 8, in <module>
    sys.exit(main())
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/dptrp1/cli/dptrp1.py", line 348, in main
    do_register(
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/dptrp1/cli/dptrp1.py", line 211, in do_register
    _, key, device_id = d.register()
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/dptrp1/dptrp1.py", line 198, in register
    r = self.session.put(register_cleanup_url)
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/requests/sessions.py", line 589, in put
    return self.request('PUT', url, data=data, **kwargs)
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/requests/sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "/home/yang/.conda/envs/sony/lib/python3.8/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='none', port=8080): Max retries exceeded with url: /register/cleanup (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f12fc3cea60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

4.The system of the DigitalPaper was never tampered with (like unlock). Also, I bought this device in China and one have to choose between Chinese and English during initializing and I actually chose English. Also, I'm currently at Brisbane Australia and I tried to set the timezone to UTC+10 (same as my laptop) but it didn't help.

If there's any other information that could be helpful. Please do let me know.

Thanks for your time.

DanielYang59 avatar May 17 '22 10:05 DanielYang59

I guess that dpt-rp1-py didn't get valid ip address to connect. You can try to ping digitalpaper.local once the bluetooth connection build. If it has response, then dptrp1 --addr digitalpaper.local xxxxx.

In my case, I'm working with KDE on Fedora. Digital Paper cannot be connect from the bluetooth plane, but only from network plane. When I connect it from bluetooth plane, the connection auto disconnect after seconds.

JiangXL avatar Nov 21 '22 03:11 JiangXL

Closing as I don't any access to a Sony DPT-RP1 DigitalPaper device anymore.

DanielYang59 avatar Feb 15 '24 14:02 DanielYang59