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

Support for reMarkable 2 #14

Closed
briankaemingk opened this issue Dec 15, 2020 · 101 comments
Closed

Support for reMarkable 2 #14

briankaemingk opened this issue Dec 15, 2020 · 101 comments

Comments

@briankaemingk
Copy link

Any idea what it would take to support rm2? I have one, and I'd be happy to help with the development and testing, but I might need some tips to get started. Thanks!

@briankaemingk
Copy link
Author

Update: it looks like one can use an external keyboard by hooking up to the pogo pin connectors, thanks to user ddvk I'll try to get the right connector, give this a try, and report back.

@rjainms
Copy link

rjainms commented Dec 22, 2020

Just checking in to see if you tried it. I followed the link to the Reddit thread which had some information, but not a link to the actual pogo accessory they used. (I'm not very familiar with pogo connectors, there seem to be multiple types and if you happen to have a link to an online store where I can buy one and try it myself that would be great). Thanks!

@briankaemingk
Copy link
Author

Sure, happy to help. I haven't tried it, but so far, I bought the following:

In the next couple of days, once I get everything ready, I'll try it and report back...

@rjainms
Copy link

rjainms commented Dec 22, 2020

Thanks for the prompt response! This seems like hardware work is involved here, i.e., you get the Micro USB breakout, and the Pogo pins, connect them somehow and then attach the assembly to the rM2 somehow. I could be wrong, never tried anything like this before. I was thinking there would be some kind of existing hardware dongle that would go from the USB to Pogo (although that still leaves the issue of how to attach that securely to the device).

@briankaemingk
Copy link
Author

briankaemingk commented Dec 22, 2020

Yeah, I'm new to all this stuff too. It looks like I can attach these parts together without soldering. I don't have my hands on them yet, but I tried to buy parts where the pins from the pogo adapter slide into the micro usb breakout. Then you can attach it all to a Micro USB OTG adapter like this one and hook it all up to a regular old USB keyboard.

I'm just trying to recreate the setup using the pics from the comments in this reddit post provided by this fine github user.

If you find an easier alternative, please let me know. Otherwise, I'll report back as well. Thanks!

@rjainms
Copy link

rjainms commented Dec 22, 2020

OK, makes sense, looking forward to what you find!

@briankaemingk
Copy link
Author

Alright, so I got the parts, and they seem to fit fine, but I can't keep the connection with my hands, so I guess I'll have to solder the micro usb breakout to the pogo pin adapter. Never done that before, but I can pick up an iron for pretty cheap, so I'll give it a try and report back...

@rjainms
Copy link

rjainms commented Dec 26, 2020 via email

@briankaemingk
Copy link
Author

No they aren't magnetized.. Not sure, maybe some clips or rubber bands...

@bennotkin
Copy link

After years of looking on I just joined this game. Are y'all working with the pogo pins because you've found the usb-c port can't connect to a keyboard, or because you have other intentions?

@briankaemingk
Copy link
Author

briankaemingk commented Dec 26, 2020 via email

@rjainms
Copy link

rjainms commented Dec 27, 2020 via email

@isman7
Copy link

isman7 commented Jan 5, 2021

Hi!

I'm also interested in hack this a little bit. As an electronic engineer I strongly recommend to solder everything, I've seen students spending hours debugging I2C communications because they only put through-hole connects attached and not soldered.

I've been looking for assembled versions of a pogo-to-usb adapter and neither found one. I'm now researching a for keyboards that had similar connectors. These seem pretty much the same kind of connector: https://www.google.com/search?q=chuwi+ubook+keyboard+pogo&tbm=isch&ved=2ahUKEwj87Nrj8YXuAhUFNxoKHePNCGgQ2-cCegQIABAA&oq=chuwi+ubook+keyboard+pogo&gs_lcp=CgNpbWcQA1DoJ1iCKmDGK2gAcAB4AIABUIgBlgGSAQEymAEAoAEBqgELZ3dzLXdpei1pbWfAAQE&sclient=img&ei=hO70X_yaBIXuaOObo8AG&bih=512&biw=1366&safe=active

I will be posting also updates if I can purchase some material.

@briankaemingk
Copy link
Author

briankaemingk commented Jan 5, 2021 via email

@briankaemingk
Copy link
Author

@isman7 do you happen to know which end the VBUS connection is on that keyboard? For the rM2, the VBUS connection is closest to the USB-C port. Would be somewhat unfortunate if one could connect the tablet, but it faced the wrong direction.

@isman7
Copy link

isman7 commented Jan 6, 2021 via email

@isman7
Copy link

isman7 commented Jan 6, 2021

It's beeing really hard to find technical information of these Chinese tablets. However, some pics of the connectors could be seen here: https://www.notebookcheck.net/Chuwi-UBook-Pro-Tablet-Review-The-Microsoft-Surface-Pro-Clone.442700.0.html

For the purchases, I'm going for similar components (Delivering to Spain):

Notice I've found another pogo pins with magnets!

@briankaemingk
Copy link
Author

briankaemingk commented Jan 6, 2021 via email

matteodelabre added a commit to toltec-dev/toltec that referenced this issue Jan 6, 2021
The app can only be controlled by an USB OTG keyboard, which for now
users have only managed to connect on rM1 (see
<dps/remarkable-keywriter#14>).

The docs are a bit lacking, so if you want to test the app:

* the “home” button (middle one) opens a menu to select among files in
the root folder `/home/root/edit`. By default `draft.md` is opened,
* the default view shows the content of the active file (or an empty
screen if the file is empty) with any Markdown syntax properly rendered,
* switch between normal and edit mode by pressing <Esc>.
matteodelabre added a commit to toltec-dev/toltec that referenced this issue Jan 7, 2021
The app can only be controlled by an USB OTG keyboard, which for now
users have only managed to connect on rM1 (see
<dps/remarkable-keywriter#14>).

The docs are a bit lacking, so if you want to test the app:

* the “home” button (middle one) opens a menu to select among files in
the root folder `/home/root/edit`. By default `draft.md` is opened,
* the default view shows the content of the active file (or an empty
screen if the file is empty) with any Markdown syntax properly rendered,
* switch between normal and edit mode by pressing <Esc>.
@koenvervloesem
Copy link

@isman7 I have bought your third link, the pogo pins between the two magnets. But I've tried it and they don't align to the magnet in the reMarkable 2. So the pins don't stick because the magnet is attracted by the magnet further at the side of the reMarkable 2.

@isman7
Copy link

isman7 commented Jan 7, 2021 via email

@briankaemingk
Copy link
Author

briankaemingk commented Jan 7, 2021 via email

@isman7
Copy link

isman7 commented Jan 10, 2021

Hey,

I have an unsuccessful attempt to connect a keyboard here. Some of the material arrived so inspired by this I mounted this:

However I'm stuck getting any voltage at the port. I'm following these instructions: https://remarkablewiki.com/tech/rm2_otg_pogo

And the main issues seems to be that when setting the power in manual mode, it doesn't change at all:

reMarkable: ~/ echo "OTG Supply" > /sys/otgcontrol/control/otg1_chargermode 
reMarkable: ~/ cat /sys/otgcontrol/control/otg1_chargermode 
Charger OTG Supply Off

Am I missing something from the software point of view? I also checked manually and there isn't any voltage at VBUS :(

@briankaemingk
Copy link
Author

briankaemingk commented Jan 10, 2021 via email

@isman7
Copy link

isman7 commented Jan 10, 2021

Yes:

reMarkable: ~/ echo 2 > /sys/otgcontrol/control/otg1_controllermode
reMarkable: ~/ cat /sys/otgcontrol/control/otg1_controllermode 
2
reMarkable: ~/ echo "OTG Supply" > /sys/otgcontrol/control/otg1_chargermode                                                                           
reMarkable: ~/ cat /sys/otgcontrol/control/otg1_chargermode                                                                                           
Charger OTG Supply Off
reMarkable: ~/ echo 1 > /sys/otgcontrol/control/otg1_dr_mode                                                                                          
reMarkable: ~/ cat /sys/otgcontrol/control/otg1_dr_mode                                                                                               
1
reMarkable: ~/      

I also tried to modify it with nano and nothing changes. I suppose some process is avoiding it to change. Maybe it was the latest firmware update...

@isman7
Copy link

isman7 commented Jan 10, 2021

Ok, so some logs from dmesg, I'm also reading a little bit the source of the driver.

[28774.817210] rm_otg_control otgcontrol1: otgcontrol_do_controller_mode_change_procedure: Change to manual or non-authenticated mode requires authentication of calling application
[28775.015416] max77818-charger max77818-charger: set MODE bits to 0x5
[28799.977003] max77818-charger max77818-charger: set MODE bits to 0xf
[28813.913871] ci_hdrc ci_hdrc.1: EHCI Host Controller
[28813.913917] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[28813.937994] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[28813.940670] hub 1-0:1.0: USB hub found
[28813.940769] hub 1-0:1.0: 1 port detected
[28973.001055] max77818-charger max77818-charger: set MODE bits to 0xf
[29086.290380] rm_otg_control otgcontrol1: otgcontrol_change_otg_charger_mode_str: Unable to set OTG1 chargermode (invalid mode Charger OTG Supply On
[29086.290380] )
[29669.540123] rm_otg_control otgcontrol1: otgcontrol_change_otg_charger_mode_str: Unable to set OTG1 chargermode (invalid mode OTG_Supply
[29669.540123] )
[29712.922468] max77818-charger max77818-charger: set MODE bits to 0xf

@isman7
Copy link

isman7 commented Jan 10, 2021

Ok! It's fixed!! You have to have the USB-C connected to a charger. Now I have power, but I have to fix the connector.

image

@isman7
Copy link

isman7 commented Mar 13, 2021

Yup, sorry for the wild guess. The last one is working also for me along with a USB C OTG adapter and USB extension cable, if needed, might not be if used with a battery.

@Baccanno
Copy link

Thank you for the answers.

  • I already have this cable : C male to Micro Male, It does not say OTG but it says you can connect a game controller or charge with it), I believe OTG is simply that the cable enables data no? And wanted to try out something like this Y cable, but I think it won't work as they say micro USB is charging only and it does not support OTG ...

So I'll try to go with the proven-to-work option :

  • C male to A Female, because the angle seems to put less stress on the plug in portrait mode. BTW, isn't the original RM2 cable already usb-C to usb A male?
  • Y Cable it looks like the ones you talked about. Plug the previous A male on the Y female, then one A Male goes to power and the 2nd to peripheral.
  • This powerbank seems to have nice connection options
  • And last I need a A F-F adaptor so I can plug something on the 2nd branch of the Y, like a BT dongle or any keyboard.

Do you think it's good ? Here is a diagram I made with rm2 !

@briankaemingk
Copy link
Author

@Baccanno - Seems like it could work to me (although I'm no electrical engineer like others on this thread so hard for me to understand your diagram ;). Were you able to try it?

@Baccanno
Copy link

Baccanno commented Mar 16, 2021

@Baccanno - Seems like it could work to me (although I'm no electrical engineer like others on this thread so hard for me to understand your diagram ;). Were you able to try it?

I'll order things soon, I wanted some feedback before trying.
Oh, it's not an electrical diagram, simply the scheme for how I would plug everything, Cm is USB C Male, Bm Micro Usb male, Af Usb A female and so on

@Baccanno
Copy link

Just to keep people informed, It's not working yet, i receive most parts BUT the Female to Female adapter. I did receive aA Female to Micro B male, but it does not seems to send data at all (tested directly on the pc).

So I'll have to wait to get my hands on the F-F adapter. But the battery charges the RM2 through the Y split effectively, that's still a win.

@briankaemingk
Copy link
Author

briankaemingk commented Mar 23, 2021 via email

@qubist
Copy link

qubist commented Apr 8, 2021

Hey everybody. Cool to see all the progress here. I have skills with 3D design and access to a 3D printer if anyone still wants to work on making a Pogo Pin connector with built-in magnets. I don't have an rM2 (yet???) but would be happy to collaborate and build/ship some prototypes

@alistair23
Copy link

I would be interested in helping with something like that.

@qubist
Copy link

qubist commented Apr 9, 2021

Hey alistair23,

Sounds great.

Here's something related I found: https://www.thingiverse.com/thing:4714318 According to discord there's also this freecad model which I haven't checked out yet.

Do you want to move the conversation to a different medium? I think this thread wouldn't be the right place to dive in. Maybe discord or something you suggest?

@alistair23
Copy link

Yeah, are you on the reMarkable matrix channel? Let's move it to there

@qubist
Copy link

qubist commented Apr 9, 2021

I just joined, but I'm new to matrix so I don't know what to do. I'm @willhb:matrix.org

@qubist
Copy link

qubist commented Apr 9, 2021

A channel (called #rm2-pogo-connector) got created on the reMarkable Discord for the topic of creating a general-purpose rM2 Pogo connector! https://discord.gg/GCTEZU8AXb

@ianthehenry
Copy link

Just chiming in here to say thanks, this thread got me up and running, and to add the following for anyone who stumbles across this issue:

I was able to use this splitter: https://www.amazon.com/gp/product/B00NSBVNCM/ref=ppx_yo_dt_b_asin_title_o03_s01?ie=UTF8&psc=1

With the USB A male end connected to this power bank (it was the smallest one I could find, but it annoyingly requires you to press a button to start charging, instead of just turning on whenever something is plugged in, so I would recommend something else): https://www.amazon.com/gp/product/B005X1Y7I2/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

And the male micro end connected to my keyboard.

Then a regular male USB A to male USB C cable to connect to the reMarkable 2.

But before plugging everything in I did an ssh root@remarkable, and ran:

reMarkable: ~/ echo host > /sys/kernel/debug/ci_hdrc.0/role

And then it just worked. I can use the keyboard to write emails to myself from the "convert to text" interface, so I assume that once I get keywriter installed I'll have a great little portable typewriter with a nice mechanical keyboard.

@rjainms
Copy link

rjainms commented May 5, 2021 via email

@bennotkin
Copy link

Just to keep people informed, It's not working yet, i receive most parts BUT the Female to Female adapter. I did receive aA Female to Micro B male, but it does not seems to send data at all (tested directly on the pc).

So I'll have to wait to get my hands on the F-F adapter. But the battery charges the RM2 through the Y split effectively, that's still a win.

@Baccanno have you found success yet? Did the F-F adapter arrive and did it work, or did you need to make other changes? I'd love to imitate your success!

@josuevalrob
Copy link

Super quick question. I have an usb C keyboard
and I am trying to make it work with this adapter:
usb-c splittler
is this a good idea??

@briankaemingk
Copy link
Author

Hi @josuevalrob please see the comment from @ianthehenry for how to get the USB C to work. You can do it without soldering, but you need to power it, so you need to buy a few more things... His and other comments on this thread should help you, otherwise, there is a reMarkable discord users channel that might be able to give you support as well.

@josuevalrob
Copy link

@briankaemingk yeah, I saw it and looks like his splitter is for Remarkable one.

@iHnR
Copy link

iHnR commented Dec 1, 2021

Hey all,

I just found this thread and have been coming up with some ideas. As they are missing still. I made some notes with what I think the actual wiring should be.

I'm thinking of getting some parts to create a compact solution to this. Depending on some details, it could be fairly elegant. There might be some gaps in my understanding, so please tell me if you see something that's wrong.

Here's some notes:

Y-cable

2021-12-01T003924 991

The first page shows the traditional usb-OTG configuration (using micro-USB). The host port has an extra sense pin. Putting a resistor over it tells it to go in host mode. It would be shorted in slave mode.

The type-C specification aims to be a little more universal. Technically OTG is not part of the specification at all. The host is decided by who provides the Vcc signal. This seems like a clever way of making it backwards compatible without a lot of struggles. I think there is some other handshake at connect (how else would it resolve two devices trying to be host?) but I don't really care for trying to understand it right now.

The reMarkable2 doesn't really support host mode in hardware I guess, but it can kinda be forced into it. The only shortcoming is that it won't provide Vcc, thus slave device won't recognize it as a host. An easy workaround is to provide Vcc from somewhere else.

Now on to the final implementation in the second picture. This seems to be basically what every working device on this thread actually comes down to.

What i could use help with:

  1. Does the rm2 still charge when in host mode?
  2. Would there be a problem with cutting the Vcc line to the rm2?
  3. Is there some clever way to change into host mode at connect? Doing it through a gesture with genie is quite trivial but not nearly as neat.
  4. Would there be any complications if the device on the other side is a USB-C device? I would guess not since it has no way to know what's on the other side other than the fact that it provides Vcc. Thus it would go into slave mode. (wild guess)

I have a few ideas floating around to implement:

  1. Use a usb-c male breakout board, female breakout board, and some kind of tiny battery pack to basically add power to the usb-c port.
  2. Use a usb-c breakout board and tiny battery to make a little wireless keyboard dongle.
  3. combine the two using a built in hub.

Before I found out the connecting over usb-c is possible, I was toying with the idea of building a wireless receiver into the case using the pogo pin connector (I think it should totally be just big enough). However, the elegance of that idea is kinda thrown out by the fact that the tablet still needs to be connected to power for the keyboard to work.

Now I'll leave this for a later date and sleep like I should have hours ago. I thought my reMarkable was supposed to make me more focused :P

Edit:

@emilBeBri
Copy link

Following this thread with exitement - I don't have the technical proves to move it forward, but I really appreciate your groundbreaking work here

@qubist
Copy link

qubist commented Mar 8, 2022

@iHnR check out my research at github.com/qubist/typeO and in the rm2-pogo-connector channel on the reMarkable discord.

@qubist
Copy link

qubist commented Mar 8, 2022

See prototype video of something close to what you're talking about, but using the pogo pins on the side of the device: https://www.youtube.com/watch?v=7q5tBEi4npA

It works with via USB-C with a keyboard, rM2 provides power to the keybord, one command was run on the rM2 to enable OTG, can charge at the same time

@cmdim
Copy link

cmdim commented Jun 9, 2022

It seems that switching the USB-C port in host mode using this command:

echo host > /sys/kernel/debug/ci_hdrc.0/role

no longer works. Specifically, the tablet freezes and needs restarting (or restarts on its own). I suppose one of the recent updates has changed the way the port is switched to host mode, but I don't see any updates in the wiki (i.e., at https://remarkablewiki.com/tech/rm2_otg_pogo). Has anyone encountered the problem and found a fix?

@qubist
Copy link

qubist commented Jun 25, 2022

echo 2 > /sys/otgcontrol/control/otg1_controllermode

@CrayCJ
Copy link

CrayCJ commented Aug 22, 2022

I'd like to report the following process to be working form me on the rm2 repeatedly:

  • I'm on a rm2, software version 2.14.1.866, with ddvk's hacks; works with and without.
  • I use the following adapter: Digitus DA70893.
  • (This is reported to work also, by this person.)
  • And some generic and quite simple keyboard, but apparently many - or even any? - should work.

This is how I got this to work:

  1. SSH to RM2 - the code lines beneath are to be typed into your ssh terminal, or are returned by it...
  2. Attach usb c power cable - without adapter or anything - to usb c port of rm2 to power it. rm2 charges and shows charging icon.
  3. (optional, list usb devices: lsusb
    --> nothing is returned, as expected.)
  4. Change state of usb port (and - optionally - list usb devices):
    echo host > /sys/kernel/debug/ci_hdrc.0/role
    (optional: lsusb
    return: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    --> the rm2's own usb c port is detected.)
  5. Detach usb c power cable from rm2. As the state of the port was changed to host, the charging icon on the rm2 will NOT disappear now!!
  6. Attach usb c power cable to usb c port of adapter. Attach adapter to usb c port of rm2. (This will charge the rm2 apparently.)
  7. (optional, list usb devices: lsusb
    return:
    Bus 001 Device 003: ID 0639:7210 Chrontel, Inc. USB 2.0 Hub
    Bus 001 Device 002: ID 1a40:0801 Terminus Technology Inc. USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    --> the rm2's own usb c port from previously as well as - at least for me - two aditional port, probably the c and a port of my adapter, are detected!)
  8. Attach USB A Keyboard to USB A port of adapter.
  9. (optional, list usb devices: lsusb
    return as in 7, plus above those:
    Bus 001 Device 004: ID 09da:0260 A4Tech Co., Ltd. KV-300H Isolation Keyboard
    --> the keyboard is detected!!
  10. Have fun, type, start any typing applications (like crazy cow, which can be kept running though, i.e. might(!) not have to be stopped and re-started each time), etc.
  11. When done: echo gadget > /sys/kernel/debug/ci_hdrc.0/role
    --> This is to revert the rm2's usb c port to it's previous state. Without this, the charging icon won't disappear, but the rm2 seems to draw power regardless of the port's state, if a power cable is attached in any way.
  12. Detatch adapter, etc.
  13. Attach and detach power to and from rm2 to make the charging icon disappear.
  14. Repeat...

These commands could probably be automated with a script and some GUI on the RM2, so that we don't need to SSH each time, but I don't know how... :-/

Hope, this helps!

@emilBeBri
Copy link

This is great CrayCJ, thanks a lot for reporting this.

@Endermanbugzjfc
Copy link

Endermanbugzjfc commented Nov 2, 2024

is it just me or running step 4 on reMarkable 2 version 3.14.1.9 always crashed?

#14 (comment) No such file or directory.

@ohthehugemanatee
Copy link

Bringing this thread back from the dead to report:

  • I put this into a reasonably idiot-proof script
  • in my brief experience the rm2 didn't charge when plugged in through the OTG adapter. ymmv but please report results.

@dragon788
Copy link

For the RMPP I ended up using a slightly different path to toggle the role.

root@imx8mm-ferrari:~/.local/share/remarkable/xochitl# echo host > /sys/class/usb_role/ci_hdrc.0-role-switch/role 
root@imx8mm-ferrari:~/.local/share/remarkable/xochitl# lsusb
Bus 001 Device 002: ID 1209:3613 Generic Precursor
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@imx8mm-ferrari:~/.local/share/remarkable/xochitl# echo 0 > /sys/class/usb_role/ci_hdrc.0-role-switch/role 
root@imx8mm-ferrari:~/.local/share/remarkable/xochitl# lsusb
root@imx8mm-ferrari:~/.local/share/remarkable/xochitl# 

Oddly enough it would NOT accept gadget or client to reset the role, but 0 (zero) worked and it wouldn't accept 1 or 2 to switch to host mode either.

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