Evidlo / remarkable_mouse

use your reMarkable as a graphics tablet
GNU General Public License v3.0
514 stars 49 forks source link

Can't get this to work on OSX with a RM2 #48

Closed dfrey closed 3 years ago

dfrey commented 3 years ago

Hi, I have been trying this on OSX with my brand new RM2 and there's no way to get it to work. I added debug code and the code hangs while making the syscall remote_device.read(16) in _, _, e_type, e_code, e_value = struct.unpack('2IHHi', remote_device.read(16)) in file pynput.py

I checked and the code tries to open device file: /dev/input/event0 but no such file exists on my mac when I connect my RM2. Is there anything I should enable on the RM2 for this to work?

armand1m commented 3 years ago

I'm having some issues with this as well. One thing I know is that remarkable 2 actually sends screen events to /dev/input/event1 instead of /dev/input/event0.

I'm doing some experiments and might open a PR with a fix

dfrey commented 3 years ago

Thanks armand1m, I had actually misread the code /dev/input is on the device not on the host. I was looking for it on my mac :-*>. I tried using event1, and I now get data, some errors on the console, and the mouse moves albeit not the way it should. Is this what you experience with yours?

dfrey commented 3 years ago

Actually the problem was because of some extra logging I had added that was not working properly. It actually works pretty well. The only change I made was event1 instead event0, but there is also a symbolic link touchscreen0 pointing to event1. Is this symlink available on the R1?

dfrey commented 3 years ago

I had not seen the RM2 branch. Will now test it. But the master branch seems to work once you replace event0 by touchscreen0

sersorrel commented 3 years ago

The only change I made was event1 instead event0, but there is also a symbolic link touchscreen0 pointing to event1. Is this symlink available on the R1?

it looks like it; /dev/input/touchscreen0 is a symlink to event0 on my rM1.