dps / remarkable-keywriter

MIT License
212 stars 18 forks source link

Support for reMarkable 2 #14

Closed briankaemingk closed 3 years ago

briankaemingk commented 3 years ago

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 commented 3 years ago

@tg-x I don't currently have a USB keyboard, but I do have a USB bluetooth dongle/keyboard combo. I just tried your command echo gadget > /sys/bus/platform/devices/ci_hdrc.0/role, and it didn't work for me. Although it works when I connect it to the pogo pins as described above. Any idea why?

@isman7 Would you be able to test the above with a USB OTG Y cable and your bluetooth dongle / keyboard?

Thanks! Brian

tg-x commented 3 years ago

you have to echo host to switch it to host mode.. but the bt dongle still needs power somehow..

briankaemingk commented 3 years ago

Oh, I see. So let me see if I understand your setup correctly...

  1. You have a Y OTG cable like this plugged into your tablet.
  2. On the USB C end, you are plugged into power.
  3. On the USB end, you have a wired USB keyboard plugged in.
  4. Then you use the following command:

echo host > /sys/bus/platform/devices/ci_hdrc.0/role

and you're able to use the keyboard?

tg-x commented 3 years ago

yes, something like that

think i switched the port role before plugging the keyboard in, but it might not matter, and my OTG adapter has USB-A for power input, but this should also work

briankaemingk commented 3 years ago

Thanks, strange that I can get the BT dongle to work on the pogo pins but not on the USB C port like that. I'll have to try it wired. If anyone else can try with a bluetooth dongle I'd be curious to hear if it works.

On Mon, Mar 1, 2021 at 1:56 PM TG × ⊙ notifications@github.com wrote:

yes, something like that

think i switched the port role before plugging the keyboard in, but it might not matter

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-788326748, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2ZEFXYHGKLM2Y6FHVFTTBQEQPANCNFSM4U3SSBWA .

tg-x commented 3 years ago

yes, because the pins are powered but the USB-C port is not

isman7 commented 3 years ago

To test this, I need some splitting cable first. I will buy one.

Just some minutes ago this appeared in my Twitter feed: https://twitter.com/arturo182/status/1366170856314052613?s=19

Cheers,

El lun., 1 mar. 2021 23:00, TG × ⊙ notifications@github.com escribió:

yes, because the pins are powered but the USB-C port is not

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-788329326, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIKATBGEUSFOZ6WKE6VN53TBQE7HANCNFSM4U3SSBWA .

mpmilano commented 3 years ago

I tried the product linked by @briankaemingk earlier, but it doesn't appear to work for this. I used @tg-x's simple UI to switch the port to host mode first. Anybody know of a working adapter/dongle, or a way to use the USB-C port for this (not the POGO pins) that relies only on consumer hardware?

briankaemingk commented 3 years ago

Maybe @tg-x can share which Y cable he used? Because the one @mpmilano and I tried doesn't seem to work :)

tg-x commented 3 years ago

this one worked: us, uk, etc

tg-x commented 3 years ago

an angle connector would be better though so that the device can stand (something like this) and make/find a similar height clip-on support for the right side

tg-x commented 3 years ago

and FYI the yaft terminal emulator has now external keyboard support and works pretty well with text editors

tg-x commented 3 years ago

btw the ui script above i just updated to fix some minor issues with having to click twice sometimes

isman7 commented 3 years ago

Hi all, I bought some connectors to mount a "stack" because those cables were not available at Amazon ES...

This just works, using the wiki line after plugin everything despite the USB - Bluetooth dongle, then plugin the dongle works. And also charges the remarkable 2. Very happy with this solution hence no hardware hacking is needed.

I will upload some gifs demos, later or tomorrow.

briankaemingk commented 3 years ago

Great, thanks! I will order something similar as well for parts from the US and report back.

On Mon, Mar 8, 2021 at 5:37 AM Ismael Benito notifications@github.com wrote:

Hi all, I bought some connectors to mount a "stack" because those cables were not available at Amazon ES...

- https://www.amazon.es/gp/product/B07XYTHCXV/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

https://www.amazon.es/gp/product/B00NH136GE/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

https://www.amazon.es/gp/product/B071RHMN99/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

This just works, using the wiki line after plugin everything despite the USB - Bluetooth dongle, then plugin the dongle works. And also charges the remarkable 2. Very happy with this solution hence no hardware hacking is needed.

I will upload some gifs demos, later or tomorrow.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-792761842, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2ZFDP5QX3XLKE4JAP73TCTHLFANCNFSM4U3SSBWA .

briankaemingk commented 3 years ago

@isman7 your parts list work great for me too for a keyboard with a bluetooth dongle...

Command is: echo host > /sys/bus/platform/devices/ci_hdrc.0/role

Here are US-based parts: extension, Y-cable, and USB adapter.

isman7 commented 3 years ago

Hey there, thinking a little bit in this I recovered a USB C hub I ordered three years ago for my mobile phone that was a failure... and it works here! This is the nicest result I have achieve with this so far. The stack is simple, power USB cable to USB hub first, check it lights up, then to the remarkable and check it charges. Then manually activate the port as host, the hub is detected, then plug the USB dongle. It works.

Some gifs:

rm2-usb-hub-0 rm2-usb-hub-1

Easter egg, the ethernet link also works!

photo_2021-03-10_23-59-19

Reference: a bit complicated, using the link form my old purchase yields here, which is not the same adapter, but it is also unavailable in Spain. I assume here people just should start to test their adapters. Maybe a separate repo should be started documenting all of this or page on that wiki, idk.

briankaemingk commented 3 years ago

Hola Mundo. Very cool, thanks for sharing!

[image: image.png]

On Wed, Mar 10, 2021 at 3:15 PM Ismael Benito notifications@github.com wrote:

Hey there, thinking a little bit in this I recovered a USB C hub I ordered three years ago for my mobile phone that was a failure... and it works here! This is the nicest result I have achieve with this so far. The stack is simple, power USB cable to USB hub first, check it lights up, then to the remarkable and check it charges. Then manually activate the port as host, the hub is detected, then plug the USB dongle. It works.

Some gifs:

[image: rm2-usb-hub-0] https://user-images.githubusercontent.com/9478220/110710152-a9c68200-81fd-11eb-838e-c24b8f44265a.gif [image: rm2-usb-hub-1] https://user-images.githubusercontent.com/9478220/110710158-ac28dc00-81fd-11eb-8d09-22a77848c413.gif

Easter egg, the ethernet link also works!

[image: photo_2021-03-10_23-59-19] https://user-images.githubusercontent.com/9478220/110710218-c5318d00-81fd-11eb-9d88-708af4dac9e9.jpg

Reference: a bit complicated, using the link form my old purchase yields here https://www.amazon.es/gp/product/B078YJJY9D/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1, which is not the same adapter, but it is also unavailable in Spain. I assume here people just should start to test their adapters. Maybe a separate repo should be started documenting all of this or page on that wiki, idk.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-796275021, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2ZCOPHQTKCWYHXSKFBLTC74RRANCNFSM4U3SSBWA .

Baccanno commented 3 years ago

Thanks everyone for your remarkable work! Does all that mean you can't use a keyboard without external powering?

So basically as @briankaemingk and other said do you think this Split USB Cable would work? Do you believe the second usb c slot is jack only ?

Best regards

isman7 commented 3 years ago

Hi, @Baccanno

mpmilano commented 3 years ago

I can confirm that the specific Y usb-C cable @Baccanno linked does not work, in fact.

briankaemingk commented 3 years ago

I tried that one, thinking it would work too, but the trouble with it is that it doesn't provide power to the keyboard, so it doesn't work. A Y cable like this one does work ... https://www.amazon.com/dp/B00NIGO4NM/ref=cm_sw_r_cp_apa_fabc_48GSXJ50CNA1X8M2DVNF?_encoding=UTF8&psc=1

On Sat, Mar 13, 2021, 14:03 Ismael Benito @.***> wrote:

Hi, @Baccanno https://github.com/Baccanno

  • Regarding the external battery it should work yes, the fact is that rm2 is not providing any output in the USB as it should. You need any kind of adapter that uses an external voltage to power the devices, which directly yields power to the devices from the external power source (battery or charger). Depending on the adapter the rm2 will be charging also.
  • Regarding if a connector should work or not, depends on how they deal with VBUS (voltage from USB C), most passive connectors should work (Y cables). Some USB C hub, although having external power sources would power the hub board with VBUS, hence it won't work, more advanced USB C hubs might work, i.e. hubs with Ethernet, HDMI...
  • I havent tried this kind of connector, but it seems to me it should work, headphones over USB C need to support USB headphones but also analog headphones with adapter... so you can give it a try. Let's hope it works!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-798792634, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2ZFFBW7EYMWRHUFWML3TDPOMXANCNFSM4U3SSBWA .

isman7 commented 3 years ago

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 commented 3 years ago

Thank you for the answers.

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

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

briankaemingk commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

Thanks for the update!

On Tue, Mar 23, 2021 at 11:23 AM Arch @.***> wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-805127935, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2ZBQLREJ3DYNNSM6T43TFDMAJANCNFSM4U3SSBWA .

qubist commented 3 years ago

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 commented 3 years ago

I would be interested in helping with something like that.

qubist commented 3 years ago

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 commented 3 years ago

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

qubist commented 3 years ago

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

qubist commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

It would be great if someone on this thread could summarize all the steps beginning to end to make this work!

On Tue, May 4, 2021 at 3:36 PM Ian Henry @.***> wrote:

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 @.***, 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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dps/remarkable-keywriter/issues/14#issuecomment-832292771, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPDM6KKEGGM4CYH2L6HN7TTMBZHRANCNFSM4U3SSBWA .

bennotkin commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

iHnR commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

qubist commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

echo 2 > /sys/otgcontrol/control/otg1_controllermode

CrayCJ commented 2 years ago

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

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 commented 2 years ago

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