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

rm 3.0 compatibility issues? Screen view not functioning #146

Open
TEMET-NOSC3 opened this issue Dec 3, 2022 · 43 comments
Open

rm 3.0 compatibility issues? Screen view not functioning #146

TEMET-NOSC3 opened this issue Dec 3, 2022 · 43 comments

Comments

@TEMET-NOSC3
Copy link

Was wondering if I was the only one whom rmview stopped functioning once I updated my remarkable to 3.0 Hoping this can be resolved soon

@jsw08
Copy link

jsw08 commented Dec 19, 2022

You're not the only one, i have the same issue.

@jsw08
Copy link

jsw08 commented Dec 21, 2022

Manually compiling resolved the issue for me.

(Installed the rmview-git version on the AUR and manually installed the dependencies.)

@c0m3tx
Copy link

c0m3tx commented Dec 22, 2022

Was not working on my side.
I found out that the remarkable fingerprint changed, so I had to accept it again via ssh.

Still not working, so I launched it with debug and I noticed something interesting

$ rmview -v
[INFO] STARTING: Thu Dec 22 11:55:54 2022
[INFO] Searching configuration in <several paths here>
[INFO] Using known hosts file: /home/USER/.config/rmview_known_hosts
[INFO] Loaded known hosts from /home/USER/.config/rmview_known_hosts

So I tried removing that rmview_known_hosts file and it's working again now!

@marozols
Copy link

marozols commented Jan 3, 2023

Screen sharing is not working for me either after my reMarkable updated to version 3.0.4.1305. I get the following error when I try to connect using rmview:

Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/twisted/python/log.py", line 96, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python3.10/site-packages/twisted/python/log.py", line 80, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python3.10/site-packages/twisted/python/context.py", line 117, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python3.10/site-packages/twisted/python/context.py", line 82, in callWithContext
    return func(*args, **kw)
--- <exception caught here> ---
  File "/usr/lib/python3.10/site-packages/twisted/internet/posixbase.py", line 487, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/lib/python3.10/site-packages/twisted/internet/tcp.py", line 248, in doRead
    return self._dataReceived(data)
  File "/usr/lib/python3.10/site-packages/twisted/internet/tcp.py", line 253, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/lib/python3.10/site-packages/twisted/protocols/tls.py", line 329, in dataReceived
    self._flushReceiveBIO()
  File "/usr/lib/python3.10/site-packages/twisted/protocols/tls.py", line 295, in _flushReceiveBIO
    ProtocolWrapper.dataReceived(self, bytes)
  File "/usr/lib/python3.10/site-packages/twisted/protocols/policies.py", line 110, in dataReceived
    self.wrappedProtocol.dataReceived(data)
  File "/usr/lib/python3.10/site-packages/rmview/rfb.py", line 720, in dataReceived
    self._handler()
  File "/usr/lib/python3.10/site-packages/rmview/rfb.py", line 203, in _handleInitial
    self._version_server = version_server
builtins.UnboundLocalError: local variable 'version_server' referenced before assignment

[WARNING] Disconnected: local variable 'version_server' referenced before assignment

@bordaigorl
Copy link
Owner

@marozols your issue was fixed in 7fbcc7c make sure you are running on the latest commit. I'll add a release to point to the latest version.

As for compatibility with v3: I have not updated yet so I cannot test rmview on the new version. PRs are welcome if anybody finds tweaks that make it work well with it.

@marozols
Copy link

marozols commented Jan 3, 2023

Thanks, @bordaigorl! I managed to fix it in the meantime. The buffer variable in line 181 of rfb.py turns out to have value b'reM 001.001\n', so the version_server variable later doesn't get initialized. I simply commented out the line 203 in rfb.py

       self._version_server = version_server

and now everything works!

@manfredu
Copy link

manfredu commented Jan 13, 2023

I can't get it to work.

The window says "Connecting to reMarkable" und on the tablet I see "Accept connection in the desktop app..."

~/.local/bin/rmview -v
2023-01-13 22:58:07+0100 [-] Log opened.
[INFO] STARTING: Fri Jan 13 22:58:07 2023
[INFO] Searching configuration in rmview.json, /usr/home/manfred/.config/rmview.json
[DEBUG] Configuration failure in rmview.json: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'rmview.json'
[INFO] Fetching configuration from /usr/home/manfred/.config/rmview.json
[WARNING] Config file "/usr/home/manfred/.config/rmview.json" is readable by others (permissions=664). If your config file contains secrets (e.g. password) you are strongly encouraged to make sure it's not readable by other users (chmod 600 /usr/home/manfred/.config/rmview.json)
[DEBUG] Config values: {'ssh': {'address': '192.168.178.88', 'password': '**********'}, 'orientation': 'auto', 'pen_size': 15, 'pen_color': 'red', 'pen_trail': 200}
[INFO] Using known hosts file: /usr/home/manfred/.config/rmview_known_hosts
[INFO] Loaded known hosts from /usr/home/manfred/.config/rmview_known_hosts
[INFO] Connecting...
[INFO] Connected to 192.168.178.88
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
[DEBUG] Stopping connection worker
2023-01-13 22:58:10+0100 [-] ChallengeReaderProtocol starting on 5901
2023-01-13 22:58:10+0100 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7fbf98432a10>

After closing the window:

[DEBUG] Stopping ScreenShare streamer thread...
[INFO] Disconnecting from VNC server...
[DEBUG] Disconnect failed ('ScreenShareStream' object has no attribute 'vncClient'), stopping reactor
[DEBUG] ScreenShare streamer thread stopped.
2023-01-13 22:59:09+0100 [ChallengeReaderProtocol (UDP)] (UDP Port 5901 Closed)
2023-01-13 22:59:09+0100 [ChallengeReaderProtocol (UDP)] Stopping protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7fbf98432a10>
2023-01-13 22:59:09+0100 [-] Main loop terminated.
[INFO] QUITTING: Fri Jan 13 22:59:09 2023

@michelepagot
Copy link

michelepagot commented Jan 18, 2023

Log on the PC side for me is :

% rmview -v

2023-01-18 16:49:02+0100 [-] Log opened.
[INFO] STARTING: Wed Jan 18 16:49:02 2023
[INFO] Searching configuration in rmview.json, /home/USER/.config/rmview.json
[DEBUG] Configuration failure in rmview.json: [Errno 2] No such file or directory: 'rmview.json'
[INFO] Fetching configuration from /home/USER/.config/rmview.json
[DEBUG] Config values: {'ssh': {'address': '10.0.0.43', 'password': '**********'}, 'orientation': 'auto', 'pen_size': 15, 'pen_color': 'red', 'pen_trail': 200}
[INFO] Using system default known hosts file
[INFO] Loading system default known hosts file, this may take a while...
[INFO] System default known host file loaded
[INFO] Connecting...
[INFO] Connected to 10.0.0.43
[INFO] Detected reMarkable 2.0
[DEBUG] Stopping connection worker
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
2023-01-18 16:49:08+0100 [-] ChallengeReaderProtocol starting on 5901
2023-01-18 16:49:08+0100 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7ff47fe39e70>
[DEBUG] Stopping ScreenShare streamer thread...
[INFO] Disconnecting from VNC server...
[DEBUG] Disconnect failed ('ScreenShareStream' object has no attribute 'vncClient'), stopping reactor
[DEBUG] ScreenShare streamer thread stopped.
2023-01-18 16:49:53+0100 [ChallengeReaderProtocol (UDP)] (UDP Port 5901 Closed)
2023-01-18 16:49:53+0100 [ChallengeReaderProtocol (UDP)] Stopping protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7ff47fe39e70>
2023-01-18 16:49:53+0100 [-] Main loop terminated.
[INFO] QUITTING: Wed Jan 18 16:49:53 2023

I can see that activate screen shearing on the device still open port 5900

# No Screen Shearing
% nmap 10.0.0.43

Starting Nmap 7.93 ( https://nmap.org ) at 2023-01-18 16:54 CET
Nmap scan report for 10.0.0.43
Host is up (0.0086s latency).
Not shown: 999 closed tcp ports (reset)
PORT   STATE SERVICE
22/tcp open  ssh
MAC Address: ****** (Ampak Technology)

Nmap done: 1 IP address (1 host up) scanned in 0.52 seconds
# ScreenShearing enabled
% nmap 10.0.0.43
Starting Nmap 7.93 ( https://nmap.org ) at 2023-01-18 16:55 CET
Nmap scan report for 10.0.0.43
Host is up (0.0060s latency).
Not shown: 998 closed tcp ports (reset)
PORT     STATE SERVICE
22/tcp   open  ssh
5900/tcp open  vnc
MAC Address: ****** (Ampak Technology)

Nmap done: 1 IP address (1 host up) scanned in 0.55 seconds

Sniffing packets on the PC side, I can see that the device is broadcasting UDP packages to port 5901, 51bytes data

@tillwf
Copy link

tillwf commented Mar 6, 2023

Is there any news for this issue? Does someone needs more information to identify the origin of the problem?

On my side, I have the same logs and I can see the cursor on the "connecting screen":

image

[INFO] Using system default known hosts file
[INFO] Loading system default known hosts file, this may take a while...
[INFO] System default known host file loaded
[INFO] Connecting...
[INFO] Connected to 192.168.1.93
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...

Thank you for your help!

@bordaigorl
Copy link
Owner

@tillwf was screensharing working before updating? Have you tried with the official app?

@tillwf
Copy link

tillwf commented Mar 6, 2023

I didn't try rmview before and the official app works indeed.

@bordaigorl
Copy link
Owner

bordaigorl commented Mar 6, 2023

@tillwf thanks, that confirms it's not a problem with closed ports.
I am still on v2 so cannot help further at this time

@Soliprem
Copy link

Soliprem commented Jun 4, 2023

any news? Just tried running on v3.4 and having the same issue as described by @tillwf (same console output)

@jsw08
Copy link

jsw08 commented Jun 6, 2023

+1 having the same issue as well

@zeigerpuppy
Copy link

+1 connection works and can see cursor in rmview with pen movements made on the tablet, but not image is received.

@meelash
Copy link

meelash commented Aug 5, 2023

Just reporting that I installed rmview from scratch on Fedora 38 with Python 3.11.4 and have Remarkable 1 with version 3.5.2.1807 and rmview is working fine. Works with both password and ssh keys.

I start the "Present with Screen Share" on Remarkable first and then run rmview and it connects and works great.

[I'm having an issue where sometimes it stops connecting and it will timeout when trying to connect. After some time it works again. But I think this may be something with my test computer/network (which has some issues) because when this happens, I'm also unable to ssh and ping the remarkable independent of rmview]

@meelash
Copy link

meelash commented Aug 25, 2023

EDIT: FIXED
The problem was that the content of /etc/version on the remarkable was:
20180309123456
I guess the firmware update set it to that for some reason. I can't think of any other explanation. In any case, screenshare.py chooses to use the vnc client instead of ScreenShare based on that data.
I modified /etc/version to instead have:
20230824123456
and it worked!

---------------------------/EDIT
I updated to 3.6.0.1865 and rmview stopped working. Here are the logs:

[INFO] Using system default known hosts file
[INFO] Loading system default known hosts file, this may take a while...
[INFO] System default known host file loaded
[INFO] Connecting...
[ERROR] Could not connect to 192.168.1.17: Unknown host key for server '192.168.1.17': got 'AAAAC3NzaC1lZDI1NTE5AAAAICBKSADoWnkCYT31fZtaiMYlSCfxhSn628PT4/BeV5GE'
[INFO] Please check your remarkable is connected and retry.
[ERROR] Unknown host key for server '192.168.1.17': got 'AAAAC3NzaC1lZDI1NTE5AAAAICBKSADoWnkCYT31fZtaiMYlSCfxhSn628PT4/BeV5GE'
[DEBUG] Stopping connection worker
[INFO] Saved host key in /home/saleemabdulhamid/.config/rmview_known_hosts
[WARNING] No key nor password given. System-wide SSH connection parameters are going to be used.
[INFO] Using known hosts file: /home/saleemabdulhamid/.config/rmview_known_hosts
[INFO] Loaded known hosts from /home/saleemabdulhamid/.config/rmview_known_hosts
[INFO] Connecting...
[INFO] Connected to 192.168.1.17
[INFO] Detected reMarkable 1.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Skipping authentication
[DEBUG] Stopping connection worker
2023-08-24 21:52:33-0400 [-] Starting factory <rmview.screenstream.common.VncFactory object at 0x7f959b707250>
2023-08-24 21:52:33-0400 [VncClient (TLSMemoryBIOProtocol),client] Using protocol version 3.800
2023-08-24 21:52:33-0400 [VncClient (TLSMemoryBIOProtocol),client] auth failed, currently ignored

If I stop Screen Share on the remarkable I get these logs:

[WARNING] Disconnected: Connection was closed cleanly.
2023-08-24 21:52:46-0400 [-] Stopping factory <rmview.screenstream.common.VncFactory object at 0x7f959b707250>
2023-08-24 21:52:46-0400 [-] Main loop terminated.

So, I think it is connected. And it is successfully ssh'ing to the device, using the key and adding the key to the known_hosts.

I think these are the interesting lines:

[WARNING] Skipping authentication
2023-08-24 21:52:33-0400 [VncClient (TLSMemoryBIOProtocol),client] auth failed, currently ignored

@bordaigorl
Copy link
Owner

@meelash thank you so much for your report!
I am still on version 2 of firmware (to preserve my current workflow) so I could not directly debug this one.
The version being wrong is a weird one to find!
I'll see if I can cook up a quick patch to solve this.
Many thanks!

@rsoeldner
Copy link

I do have the same issue, any solution so-far?

@bordaigorl
Copy link
Owner

To summarize: this issue has many reports of different nature (most of which were resolved some time ago); the current status is that version 3.6.0.1865 of the firmware stores the wrong version number in /etc/version on the tablet.
This makes rmview think it's dealing with an old version without screenshare and tries to use a custom vnc server (which is known not to work with recent updates).
The easiest workaround is to run

ssh RMIPADDRESS 'echo 20230824123456 > /etc/version'

to overwrite on the tablet the version number with something sensible.
A sensible solution would be to add a screenshare+auth backend option which forces the combination of connection methods that works for this version (overriding the version detection)

@drever
Copy link

drever commented Aug 25, 2023

Edit: The issue was actually solved by the version reset. The problem left was the UPD Port.

I was hoping that the issue is resolved by changing /etc/version on the remarkable, but no luck for me. Am I missing something?

rmview 
[INFO] STARTING: Fri Aug 25 22:57:28 2023
[INFO] Searching configuration in rmview.json, /home/drever/.config/rmview.json
[INFO] Fetching configuration from rmview.json
[WARNING] Config file "rmview.json" is readable by others (permissions=644). If your config file contains secrets (e.g. password) you are strongly encouraged to make sure it's not readable by other users (chmod 600 rmview.json)
[INFO] Using known hosts file: /home/drever/.config/rmview_known_hosts
[INFO] Loaded known hosts from /home/drever/.config/rmview_known_hosts
[INFO] Connecting...
[INFO] Connected to remarkable
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
[INFO] Disconnecting from VNC server...
[INFO] QUITTING: Fri Aug 25 22:57:39 2023

@rsoeldner
Copy link

I tried implementing the mentioned feature (enforcing authentication) here: https://github.com/rsoeldner/rmview/tree/rmv3-auth

I get the following output:

[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare+auth'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
2023-08-25 23:10:04+0200 [-] ChallengeReaderProtocol starting on 5901
2023-08-25 23:10:04+0200 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7f9d1807c4f0>

But it will not pass the authentication. Maybe @bordaigorl can confirm, using the ChallengeReaderProtocol is the correct one?

@bordaigorl
Copy link
Owner

@rsoeldner yes ChallengeReaderProtocol is the authentication protocol which is known to work since 2.9.1.
The key is to bypass the version check at line 137 in screenshare.py.
When that protocol hangs it is usually a sign that the UDP port at 5901 is blocked (maybe by firewalls/OS) and opening it typically solves the problem (see the wiki).
@rsoeldner do you know for a fact that, in the same network/os environment you were able to connect before upgrading to v3?

@rsoeldner
Copy link

@bordaigorl Unfortunately, this does not work for me ... The mentioned change should be implemented in my fork. Any ideas how to debug thus further?

@atxbyea
Copy link

atxbyea commented Sep 4, 2023

I was hoping that the issue is resolved by changing /etc/version on the remarkable, but no luck for me. Am I missing something?

rmview 
[INFO] STARTING: Fri Aug 25 22:57:28 2023
[INFO] Searching configuration in rmview.json, /home/drever/.config/rmview.json
[INFO] Fetching configuration from rmview.json
[WARNING] Config file "rmview.json" is readable by others (permissions=644). If your config file contains secrets (e.g. password) you are strongly encouraged to make sure it's not readable by other users (chmod 600 rmview.json)
[INFO] Using known hosts file: /home/drever/.config/rmview_known_hosts
[INFO] Loaded known hosts from /home/drever/.config/rmview_known_hosts
[INFO] Connecting...
[INFO] Connected to remarkable
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
[INFO] Disconnecting from VNC server...
[INFO] QUITTING: Fri Aug 25 22:57:39 2023

I just did it today with my RM2 with firmware 3.6, and I can confirm it does work, no issues connecting.

@bbolker
Copy link

bbolker commented Sep 4, 2023

thank you for the version-overwriting workaround! confirm that it works for me.

@assaron
Copy link

assaron commented Sep 5, 2023

I've just got my remarkable with 3.6 firmware and have the connection problem. Part of it was fixed by the mentioned update of /etc/version file, however now I have some UDP errors that I couldn't find in previous issues:

2023-09-05 15:31:21-0500 [-] Log opened.
[INFO] STARTING: Tue Sep  5 15:31:21 2023
[INFO] Searching configuration in remarkable-home.json, rmview.json, /home/alserg/.config/rmview.json
[INFO] Fetching configuration from remarkable-home.json
[WARNING] Config file "remarkable-home.json" is readable by others (permissions=644). If your config file contains secrets (e.g. password) you are strongly encouraged to make sure it's not readable by other users (chmod 600 remarkable-home.json)
[DEBUG] Config values: {'ssh': {'address': '10.11.99.1', 'username': 'root', 'auth_method': 'key', 'key': '/home/assaron/.ssh/id_rsa', 'timeout': 2}, 'backend': 'screenshare', 'orientation': 'auto', 'pen_size': 15, 'pen_color': 'red', 'pen_trail': 200, 'background_color': 'white', 'hide_pen_on_press': True}
[INFO] Using system default known hosts file
[INFO] Loading system default known hosts file, this may take a while...
[INFO] System default known host file loaded
[INFO] Connecting...
[INFO] Connected to 10.11.99.1
[DEBUG] Stopping connection worker
[INFO] Detected reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
2023-09-05 15:31:24-0500 [-] ChallengeReaderProtocol starting on 5901
2023-09-05 15:31:24-0500 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7f9d685896c0>
[INFO] received timestamp challenge 1693945892026
2023-09-05 15:31:32-0500 [ChallengeReaderProtocol (UDP)] Unhandled Error
	Traceback (most recent call last):
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/twisted/python/log.py", line 80, in callWithContext
	    return context.call({ILogContext: newCtx}, func, *args, **kw)
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/twisted/python/context.py", line 117, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/twisted/python/context.py", line 82, in callWithContext
	    return func(*args, **kw)
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/twisted/internet/posixbase.py", line 482, in _doReadOrWrite
	    why = selectable.doRead()
	--- <exception caught here> ---
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/twisted/internet/udp.py", line 254, in doRead
	    self.protocol.datagramReceived(data, addr)
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/rmview/screenstream/screenshare.py", line 46, in datagramReceived
	    if not self.callback(timestamp):
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/rmview/screenstream/screenshare.py", line 119, in runVnc
	    userId = self.get_userid()
	  File "/home/alserg/miniconda3/lib/python3.10/site-packages/rmview/screenstream/screenshare.py", line 106, in get_userid
	    token = cfg.get('General', 'devicetoken')[offset:-1]
	  File "/home/alserg/miniconda3/lib/python3.10/configparser.py", line 793, in get
	    raise NoOptionError(option, section)
	configparser.NoOptionError: No option 'devicetoken' in section: 'General'
	
[INFO] received timestamp challenge 169394589202
...

The config mentioned there seems to be /etc/remarkable.conf, indeed, I don't see any devicetoken value there...

Edit: got, I had to register the device first :) now it works fine!

@bordaigorl
Copy link
Owner

Thanks @assaron for the report, it would definitely be better for rmview to detect whether you still need to register and give a more informative error...

@eguvep
Copy link

eguvep commented Sep 17, 2023

The easiest workaround is to run

ssh RMIPADDRESS 'echo 20230824123456 > /etc/version'

to overwrite on the tablet the version number with something sensible.

Thanks a lot! I also confirm, that this worked for me (Firmware Version: 3.6.1.1894).

@ezhang7423
Copy link

The easiest workaround is to run

ssh RMIPADDRESS 'echo 20230824123456 > /etc/version'

to overwrite on the tablet the version number with something sensible.

Thanks a lot! I also confirm, that this worked for me (Firmware Version: 3.6.1.1894).

This worked for me as well!

@JVass
Copy link

JVass commented Sep 30, 2023

Hello everyone, I had the same problem and changed the IP from the default (10.11.99.1) to the one written in the Help/Copyrights and licenses (e.g. 192.168.2.120) when I was logging into rmview.

Hope that it helps.

Disclaimer: You need to have your WiFi open and your PC has to be logged to the same WiFi.

@Vivdaddy
Copy link

Vivdaddy commented Oct 5, 2023

Yeah, this worked for me as well. I just sshed into the remarkable machine and then ran the echo command. This resolved the libcrypto issue.

@Eeems
Copy link
Contributor

Eeems commented Oct 30, 2023

reMarkable has started to use reproducable builds for their OS releases, so /etc/version will no longer be unique per-version. At least that's what was indicated in discord by one of their staff. So going forward, a new mechanism will be required for determining the OS version.

@DEVANSH99
Copy link

DEVANSH99 commented Nov 1, 2023

Hi, I am just starting to try using rmview, and I was getting the libcrypto error, which went away when I changed the /etc/version as told above. But, my rmview screen is now stuck as described in this comment with the console log stuck at "Authenticating, please wait". Did I miss something? I am using remarkable 2 with version 3.7. I have also opened my ports 5900 and 5901 as mentioned on wiki.

@kjyager
Copy link
Contributor

kjyager commented Nov 15, 2023

I fixed this issue for myself by getting the the software version from xochitl --version rather than /etc/version. The command outputs version information like: xochitl 2023-09-01T12:43:28Z tags/releases/3.6.1-device-RC2 ab7d676. I grab the iso timestamp, and reformat it to match the timestamp format used by /etc/version. Not sure if this is any safer to rely on than /etc/version, but it is working well at the moment. Happy to contribute this back to the repo if you'd like.

Replacement for _getSwVersion() in connection.py:

# Add `from datetime import datetime` to top of file

def _getSwVersion(self):
    _, out, _ = self.client.exec_command("cat /etc/version")
    version_ts = int(out.read().decode("utf-8"))

    try:
      _, out, _ = self.client.exec_command('xochitl --version 2>/dev/null | tail -n 1 | cut -d" " -f2')
      xochitl_ts = int(datetime.fromisoformat(out.read().decode("utf-8").strip()).strftime("%Y%m%d%H%M%S"))
      version_ts = max(version_ts, xochitl_ts)
    except:
      pass

    return version_ts

@Eeems
Copy link
Contributor

Eeems commented Nov 15, 2023

It might be better to standardize on the OS version number you can find with grep REMARKABLE_RELEASE_VERSION= /usr/share/remarkable/update.conf

@kjyager
Copy link
Contributor

kjyager commented Nov 17, 2023

It might be better to standardize on the OS version number you can find with grep REMARKABLE_RELEASE_VERSION= /usr/share/remarkable/update.conf

This does seem like a more reliable source. I updated my fix to use this instead. I'm now representing versions with tuples instead of timestamp integers, and reversingrmparams.SW_VER_TIMESTAMPS to interpret the old TS values. Is there documentation anywhere on the versioning scheme? Seems to be major.minor.patch.build an all integers, but it'd be nice to know for sure.

@Eeems
Copy link
Contributor

Eeems commented Nov 17, 2023

Is there documentation anywhere on the versioning scheme? Seems to be major.minor.patch.build an all integers, but it'd be nice to know for sure.

It's not documented anywhere that I'm aware of, but from the list of version numbers I have, that does appear to be the version scheme. build appears to have been reset in every minor version, but hasn't been reset since 2.7.0.9.

Side note, for anybody interested in the source on the reproducible builds comment I made previously: https://discord.com/channels/385916768696139794/834359134870568982/1149409895486083123

kjyager added a commit to kjyager/rmview that referenced this issue Nov 20, 2023
The issue arises due to the reMarkable software version no longer being
accurately reflected in `/etc/version`. This causes rmview to think it
is connecting to an older version.

I've fixed this by switching rmview's SW version logic over to the
semantic versioning scheme used by recent releases. The SW version is
taken from the `REMARKABLE_RELEASE_VERSION` value in
`/usr/share/remarkable/update.conf`, as suggested by @Eeems. Support for
older versions is to be maintained by mapping the older timestamp
version numbers back to the corresponding semantic versions.
@kjyager
Copy link
Contributor

kjyager commented Nov 20, 2023

Created PR #158, containing my fix for this issue. Please give it a look.
Any testing with SW versions < 3.6 would be much appreciated.

@bordaigorl
Copy link
Owner

@kjyager thank you so much for contributing the PR!
I'll have a look and test it; if everything looks in order I'll merge

bordaigorl pushed a commit that referenced this issue Nov 23, 2023
The issue arises due to the reMarkable software version no longer being
accurately reflected in `/etc/version`. This causes rmview to think it
is connecting to an older version.

I've fixed this by switching rmview's SW version logic over to the
semantic versioning scheme used by recent releases. The SW version is
taken from the `REMARKABLE_RELEASE_VERSION` value in
`/usr/share/remarkable/update.conf`, as suggested by @Eeems. Support for
older versions is to be maintained by mapping the older timestamp
version numbers back to the corresponding semantic versions.
@bordaigorl
Copy link
Owner

Now merged! Thanks @kjyager :)

@StHagel
Copy link

StHagel commented Mar 21, 2024

Hey all, I am also having this issue on the latest Firmware version (3.10) (Can even see the red dot, but it is stuck at [Authenticating]. The file in /etc/version is up to date, too.

How can I get this to work?

@kjyager
Copy link
Contributor

kjyager commented Mar 21, 2024

Hey all, I am also having this issue on the latest Firmware version (3.10) (Can even see the red dot, but it is stuck at [Authenticating]. The file in /etc/version is up to date, too.

How can I get this to work?

I suspect this is an unrelated issue. I just updated my device to 3.10, and rmview is still working for me. It is probably worth making sure the rmview version is recent, and that you're not encountering another common issue.

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