bordaigorl / rmview

A live viewer for reMarkable written in PyQt5
GNU General Public License v3.0
742 stars 61 forks source link

Unable to connect on Windows #64

Closed jaanli closed 3 years ago

jaanli commented 3 years ago

When executing rmview and typing in the IP address, this is the resulting error diagnostic:

Unknown host key for server '192.168.0.210': got 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCtM8uAkB0w5jj23/5YxlPQjk3rYBR8FQm3M6qF7n7aYtH8uBZw2TihEwHejM9ClfaJZGuJwQWNoaOyfOyT3NfqDjC3VflkDbMxuTPHMr003qIBU3NY7/BLeQdqUNM752KtVtKu+PumAYlvLjQrqq03FB8OT11xJ1tK7jKeBbG19wQvqjO1SFjr4ll03M137uv+XvXQtQRmYbcwlo8VenlDLU586buupyodG6if65XWm0W105dMlB9p4IVu46o2L+OZMUpoM/0XK3WCxajQuwDVIcGlmcPX3i97Ccln2AKxZJ9m1WRtM5X1lFK9F8ZIqrQxKN6UpeSNQW4zmMYWSAV/'

image

Any ideas on how to debug? There is no password for the remarkable so I just pressed enter for it.

bordaigorl commented 3 years ago

This is expected behaviour. Have you read the relevant section of the Readme? Have you tried any of the methods suggested by the message box itself?

Note that if you are connecting to the RM via WiFi and you haven't set up a static IP for the tablet, then the IP will change every time the tablet connects; this means that rmView will always see it as a new unknown host unless by chance it gets assigned an IP which was added before. In this case, if you are on a trusted network, the most ergonomic fix is to follow item 3 in the instructions in the message box.

jaanli commented 3 years ago

Great, thank you so much, I will try that!

I was just going off of the instructions in the README:

Installation
As a basic prerequisite you will need Python3 on your computer.

⚠️ Please make sure pip is pointing to the Python3 version if your system has Python2 as well. If not, use pip3 instead of pip in what follows.

⚠️ WARNING ⚠️: If you use Anaconda, please install the dependencies via conda (and not pip) then run pip install ..

Semi-automatic installation
The easiest installation method is by using pip, from the root folder of this repository:

   pip install .
(please note the command ends with a dot) which will install all required dependencies and install a new rmview command.

Then, from anywhere, you can execute rmview from the command line. The tool will ask for the connection parameters and then ask permission to install the VNC server on the tablet. Press Auto install to proceed.

If you plan to modify the source code, use pip install -e . so that when executing rmview you will be running your custom version.
bordaigorl commented 3 years ago

Under Usage and configuration you'll find:

As a security measure, the keys used by known hosts are checked at each connection to prevent man-in-the-middle attacks. The first time you connect to the tablet, it will not be among the known hosts. In this situation rMview will present the option to add it to the known hosts, which should be done in a trusted network. Updates to the tablet's firmware modify the key used by it, so the next connection would see the mismatch between the old key and the new. Again rMview would prompt the user in this case with the option to update the key. This should be done in a trusted network. The host_key_policy parameter controls this behaviour:

  • "ask" is the default behaviour and prompts the user with a choice when the host key is unknown or not matching.
  • "ignore_new" ignores unknown keys but reports mismatches.
  • "ignore_all" ignores both unknown and not matching keys. Use at your own risk.
  • "auto_add" adds unknown keys without prompting but reports mismatches.

In any case, pressing Ignore should allow you to proceed with the connection, Add would not ask you again (unless the tablet changed IP). If you cannot connect using ignore/add then you may need to use the password:

Suggested first use: after installing run rmview, insert when prompted the IP of your tablet and the password, as found in the Menu / Settings / Help / Copyright and Licences menu of the tablet.

jaanli commented 3 years ago

Great!

Happy to help try to reword the README after I'm able to connect.

  1. In the rmview.json settings file, I added this line to the ssh section: "host_key_policy": "ignore_new".
  2. I logged in to my router settings and in the DHCP server settings I reserved a static IP address for the remarkable MAC address.
  3. I added the static IP to the rmview.json file, so it looks as follows:
    "ssh": {
        "address": [
            "192.168.0.210"
        ]
        "host_key_policy": "ignore_new"
    },

The log file:

PS C:\Users\jaan> rmview
Searching configuration in rmview.json, C:/Users/jaan/AppData/Local/python\rmview.json
Fetching configuration from C:/Users/jaan/AppData/Local/python\rmview.json
{'ssh': {'address': '192.168.0.210', 'host_key_policy': 'ignore_new', 'password': ''}, 'orientation': 'auto', 'pen_size': 15, 'pen_color': 'red', 'pen_trail': 200}
LOADED C:/Users/jaan/AppData/Local/python\rmview_known_hosts
Connecting...
Could not connect to 192.168.0.210: Authentication failed.
Please check your remarkable is connected and retry.
Authentication failed.

Bye!

In the remarkable if I go to settings -> help -> copyrights and licenses, the IP address matches: 192.168.0.210.

Any other ideas? Very much appreciate it :)

bordaigorl commented 3 years ago

Unless you configured an SSH key on the tablet, you will need to use the password that is given in the Menu / Settings / Help / Copyright and Licences menu of the tablet. Most likely the issue here is that the empty password is, unsurprisingly, incorrect.

jaanli commented 3 years ago

That is actually surprising! This page was helpful: https://www.remarkabletabletuser.com/post/2018/01/02/connect-to-your-remarkable-from-a-windows-pc/#:~:text=Open%20up%20your%20reMarkable.,in%20the%20far%2Dright%20pane. - maybe worth including in the README for novice first-time users like me who think that because they have chosen no password for their remarkable, an empty password should be correct.

Great, one more step done - appreciate all the help.

Next error:

PS C:\Users\jaan> rmview
Searching configuration in rmview.json, C:/Users/jaan/AppData/Local/python\rmview.json
Fetching configuration from C:/Users/jaan/AppData/Local/python\rmview.json
{'ssh': {'address': '192.168.0.210', 'host_key_policy': 'ask', 'password': '********'}, 'orientation': 'auto', 'pen_size': 15, 'pen_color': 'red', 'pen_trail': 200}
LOADED C:/Users/jaan/AppData/Local/python\rmview_known_hosts
Connecting...
Connected to 192.168.0.210
/home/root/rM-vnc-server-standalone: error while loading shared libraries: libcrypto.so.1.0.2: cannot open shared object file: No such file or directory

Starting VNC server
Starting VNC server

Starting VNC server

image

jaanli commented 3 years ago

Fixed! This worked for me - https://github.com/pl-semiotics/rM-vnc-server/issues/8#issuecomment-808521627

Now I am able to connect. Thank you! This is awesome. Now to hack up a https://jamboard.google.com/ integration ;)

Hope this helps for others :)

bordaigorl commented 3 years ago

Now to hack up a https://jamboard.google.com/ integration ;)

Ah that sounds interesting! I use rmview via Zoom or similar by screen sharing. To use Jamboard I actually use https://github.com/kevinconway/remouseable/ and basically use the RM as an input device but it's not as seamless...