-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Split serial #1954
base: main
Are you sure you want to change the base?
Split serial #1954
Conversation
I'll review COBS a bit closer, but generally I don't see a huge problem using something like this for this. We don't really need advanced features like protobuf for things like this, e.g. backwards/forwards compat with encoded data, etc. The general approach: I agree, there's definitely some duplication. I'd love our final solution to abstract out just the "transport" portion into an API that allows swapping out the implementation of just that piece, instead of duplicating the whole thing, but I understand the hesitancy to do this "too early". I think as long as we have an eye on this eventual de-dup, I'm fine with it. Now that upstream Zephyr in recent versions has added a PIO based UART driver, I think sticking with "UART device as the abstraction level" is reasonable and will offer enough flexibility I don't think we need our own "wired transport" abstraction over the UART driver one. Thanks for picking this up! |
I've got great interest in this, and will be tracking and testing, and porting to Lulu and another unnamed board as soon as PIO is working. I have a backlog of 2 wire splits that I'd love to see get full ZMK support. Not sure how much I can contribute on a code front, but more than willing to give feedback and stress test. |
@kdb424 do you need PIO on both sides? For now I only implemented PIO on the peripheral side because:
|
I've got one and two wire RP2040 boards of various pins used. I'm sure I have something around that I can test with, from dev boards, to full keyboards. I'll find something that works with it to test. |
I'm not super familiar with the way QMK/ZMK and these communications work, so this is a pretty layman's question, but to what extent are the remaining TODO items core functionality (which to me means "I can put a nice nano v2 on one half and a sea picro on the other half and the keypresses all register") vs nice-to-haves? More specifically, is this ready for beta testing with that core functionality? |
Also very curious to know what the status of this is. I've got a wired split keyboard with two sea picros, in theory would I be able to use this branch and things would work? |
I still intend to clean this up and make this mergeable. I simply got distracted because I'm currently in my keyboard exploration phase to find the best one 😅 Assuming you configure your devicetree correctly, this should work for you as is. I've tested this on two (custom) keyboards so far. |
Do you have some sort of estimate when you will probably get to it? |
Not sure how this and #2080 interact, but worth noting. |
Thanks for mentioning this. It sounds like this needs to be coordinated better (by the ZMK maintainers?) so we'll work together instead of re-implementing the same thing over and over again and dumping WIP PRs in here. That being said, from reading the description(I didn't read the code, yet) it looks like it supports more usecases. |
Excited about wired split support! For the layman who doesn't fully understand UART, what types of cables could be used to connect peripheral to central? TRRS? USB-C? RJ45? |
@M1cha I'd like to give this PR a go. Obviously as it's in it's early stages it's lacking some docs. Is your corne-keyboard repo the best example of this in action? |
This picks up on #1117. I created this as a draft PR so I can collect feedback of the maintainers before investing the work to finish things up. Specifically:
known TODOs:
It's also very apparent, that I had to copy quite some code from the BLE central. In future we might want to refactor both implementations with the goal of changing the abstraction layer to something that reduces code duplication even more. Right now we should focus on getting this working though so we can see how much overlap we really end up with.