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

[remarkable2 support]: change event files based on rM version #32

Closed
wants to merge 1 commit into from

Conversation

mcw-h
Copy link

@mcw-h mcw-h commented Oct 15, 2020

remarkable2 uses /dev/input/event1 (from /dev/input/event0)

open_remote_device already allows changing the file path so this just pushes that option up to the command line arguments.

Also move the logging setup before calling open_remote_device otherwise debug in that function doesn't work.

remarkable2 uses /dev/input/event1 (from /dev/input/event0)

open_remote_device already allows changing the file path so this just pushes that option up to the command line arguments.

Also move the logging setup before calling open_remote_device otherwise debug in that function doesn't work.
@chabad360
Copy link
Contributor

Why not just add a --rm2 switch?

@mcw-h
Copy link
Author

mcw-h commented Oct 23, 2020

Why not just add a --rm2 switch?

I thought of that but then when there's an rm3, or other device that uses the same digitiserthingie... I honestly have no real convictions either way.

@jonahweissman
Copy link

I think a more convenient solution would be to detect the current version of the hardware, and automatically read from the correct device. There might be a better way to do this, but I was thinking we could check the contents of /proc/cpuinfo, since this shouldn't be affected by the version of the software.

@Evidlo
Copy link
Owner

Evidlo commented Oct 25, 2020

I think a more convenient solution would be to detect the current version of the hardware, and automatically read from the correct device.

I agree with this. I'd prefer to make the user experience seamless.

Here is a relevant issue on Oxide: Eeems-Org/oxide#48

@Stivanification
Copy link

So it seems the best way to recognize which reMarkable one uses, according to the discussion here, is via cat /sys/devices/soc0/machine. So all that needs to be done is to select the event file depending on the output of that command, or am I missing something?

@raisjn
Copy link

raisjn commented Oct 31, 2020

imo, you should use ioctl to detect which device is the stylus.,see this gist from oxide thread

Eeems-Org/oxide#48 (comment)

this will be more future proof than picking based on current device name

@Evidlo
Copy link
Owner

Evidlo commented Nov 3, 2020

@raisjn The problem is that remouse runs entirely on the host, and I'm not sure if shipping an ARM binary for the ioctl probing is worth the added complexity of distributing, installing and executing the binary.

@Evidlo Evidlo changed the title [remarkable2 support]: specify path to event file on the command line [remarkable2 support]: change event files based on rM version Nov 3, 2020
@raisjn
Copy link

raisjn commented Nov 3, 2020

ah, good point! shipping the arm binary is likely not worth it, i thought you are using libevdev but it's only on the host

@Evidlo
Copy link
Owner

Evidlo commented Dec 27, 2020

See the rm2 branch, which tries to detect the version automatically from /dev/input/touchscreen0.

@Evidlo Evidlo closed this Dec 27, 2020
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

Successfully merging this pull request may close these issues.

6 participants