bordaigorl / rmview

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

rmview hung on authentication #137

Open AbhiKafle123 opened 2 years ago

AbhiKafle123 commented 2 years ago

Edit - this might also be because I can't "turn on Screen Share" because that requires connect subscription in the first place. :(

My rmview.json looks like as follows -

  "ssh": {
    "address": ["192.168.0.194"],
    "timeout": 2
  },
  "orientation": "auto",
  "pen_size": 15,
  "pen_color": "red",
  "pen_trail": 200,
  "background_color": "white",
  "hide_pen_on_press": true
}

I am using rm2 2.12.1.527 [I looked at #111 and disabled my mac firewall, but that doesn't help.]

But it will just get stuck in the auth prompt with the following message -


[WARNING] Authenticating, please wait...
2022-03-22 18:54:24-0700 [-] ChallengeReaderProtocol starting on 5901
[DEBUG] Stopping connection worker
2022-03-22 18:54:24-0700 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x12917cbe0>```
triha74 commented 2 years ago

I have the same issue and running 2.12.2.573

[INFO] Loaded known hosts from /Users/triha/Library/Preferences/rmview_known_hosts
[INFO] Connecting...
[INFO] Connected to 192.168.2.217
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
2022-04-21 14:51:43+0200 [-] ChallengeReaderProtocol starting on 5901
2022-04-21 14:51:43+0200 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x1365513d0>
[DEBUG] Stopping connection worker
bordaigorl commented 2 years ago

You need to first enable ScreenShare on the tablet, which unfortunately is only available if you have a subscription. There's currently no workaround.

triha74 commented 2 years ago

I have a subscription and the ScreenShare enabled

bordaigorl commented 2 years ago

@triha74 have you looked at #111 ? That's most likely the issue.

triha74 commented 2 years ago

Im not sure it is because I dont have the firewall enabled

bordaigorl commented 2 years ago

@triha74 would you mind listing your specs? What OS are you using? Are you running from WiFI or USB? Have you tried with the official app?

triha74 commented 2 years ago

On my mac neither the official app or rmview is working.

On my windows machine (which I only use for gaming) it does work both with the official app and rmview.

Both machines on the same network

bordaigorl commented 2 years ago

@triha74 looks like something in your config is blocking the communication on port 5901 (UDP). This is not an issue with rmview per-se.

massimilianorighi commented 2 years ago

I had the same problem using the docker version of rmview. If you are on Ubuntu just allow TCP/UDP on port 5901: sudo ufw allow 5901 . Tested on Remarkable 2, OS: 2.12.3.606 and Ubuntu 20.04.3 LTS running from WIFI (home network)

pizzard commented 2 years ago

I also have the same problem:

[INFO] Connected to 10.144.255.236
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
2022-06-17 16:32:44+0200 [-] ChallengeReaderProtocol starting on 5901
2022-06-17 16:32:44+0200 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7fce8411cac0>
[DEBUG] Stopping connection worker

In this state the application is stuck. I activated screenshare on the Tablet and inspected my network traffic via wireshark. I can see the following packets: 4003 413.035381053 10.144.255.236 10.144.255.255 UDP 93 55606 → 5901 Len=51 on my laptop in regular intervals. I can also see that rmview has a listen port via netstat:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           986/avahi-daemon: r 
udp        0      0 0.0.0.0:5901            0.0.0.0:*                           18831/python3    
<more lines...>

On a different network I verified that screenshare works in windows with the official client. Here I am on debian11. How do I look deeper here? Is there an easy way to see whether the UDP Packets are actually received in rmview?

/edit: Remarkable is 2.14.0.861

bordaigorl commented 2 years ago

@pizzard without further info, it looks to me like a network config problem. To see if this is true you should be testing rmview and the official app in the same network. Are you absolutely positive that UDP traffic on port 5901 is not blocked by a firewall?

pizzard commented 2 years ago

As I can see the packets in wireshark I am certain that the network lets them through, but I will try to verify further whether the device receiving them does apply any further filters. I will try on the same device in the same network with both official and rmview to directly compare. I am on a Debian11 system, for reference.

pizzard commented 2 years ago

I stand corrected. I was looking for a firewall at the router side, and there is none, but there is a firewall on the target laptop and Wireshark captures in front of the firewall. So my issue has been resolved.

hersle commented 2 years ago

For anyone on Fedora with exactly the same issue, here is my quick fix:

sudo firewall-cmd --add-port=5901/udp # open the required UDP 5901 port
sudo firewall-cmd --runtime-to-permanent # make the new firewall configuration persistent, so it applies also after reboot
alexandru-calinoiu commented 1 year ago

Same issue solved in Ubuntu by adding a firewall rule

image