zmk icon indicating copy to clipboard operation
zmk copied to clipboard

feat(split): wired split over serial support

Open xudongzheng opened this issue 1 year ago • 3 comments

This is very preliminary WIP wired split over serial support.

Motivation

The motivation for this implementation is to define "wired splits" in a way that can be used for more than just split keyboards with two halves.

  • This includes support for multiple serial devices. Currently it's one UART and USB CDC CDM but can easily be extended to more.
  • uint32_t "command" is used to identify the message type. Currently one is defined for split key states. Users can define additional ones and use USB CDC ACM to add custom functionality.
  • The communication protocol is very simple and can be easily implemented in most high level languages.
  • ZMK developers can in theory pipe USB CDC ACM into native_sim and use a production keyboard for development.

Currently Implemented

  • Central RX
  • CRC32
  • UART interrupt (hardware UART) and polling (RP2040 PIO UART and native_sim)

xudongzheng avatar Dec 19 '23 05:12 xudongzheng

@M1cha @xudongzheng Based on the most recent discussion from #1954, was there any consensus reached on how these two two PRs interact? More specifically, if I had a wired split keyboard (no BLE) which I wanted to get ZMK working on, is one or the other currently easier to get started with?

pierzchalski avatar Apr 19 '24 09:04 pierzchalski

This PR and #1954 are two independent implementations, both with some parts complete and some parts missing. I plan on working on this PR further after the refactoring part #2086 is finalized.

I would say both PRs should be considered pre-alpha quality. Both should work in theory but will likely require some effort in debugging and patching code to get working.

xudongzheng avatar Apr 19 '24 13:04 xudongzheng