Author Topic: QMK: Split keyboard halfs don’t talk to each other  (Read 777 times)

0 Members and 1 Guest are viewing this topic.

Offline Daniel LF

  • Thread Starter
  • Posts: 5
  • Location: Germany
QMK: Split keyboard halfs don’t talk to each other
« on: Sat, 28 September 2019, 12:59:07 »
Hi!
I'm building my own QMK-based split keyboard. The first prototype is nearly done.

Now I got stuck with the split feature. Each half of the keyboard works fine on its own when connected to the computer directly. Also when the 2nd half is connected via the serial connection. It’s simply that the 2nd half which is not connected via USB is unable to raise a key event. It seems the two halfs just don’t talk to each other.

I'm using…
  • The Teensy 2.0
  • Serial connection between the two halfs
  • Handedness detection by pin (works fine, both parts have their side-specific layout)

I checked the connections twice and thrice. All fine with the wiring and connections.

I created a minimal example for the split feature, which also doesn't work. If I assume the AVRs are fine, I can only think that I made a mistake with using/configuring QMK.
I have committed that minimal example. Maybe somebody who knows QMK can have a look and give me a hint if I missed something? This is the commit: https://github.com/DLFW/qmk_firmware/commit/71f0ceb1e72abb76543ecc9f50f047f9196f7593

One thing which might be worth to mention:
I implemented a feature that the back-light color changes when the layer is switched. Now, if I connect one side via USB to the computer and both sides to each other, the side which is not connected does light up with the last configured color but does not change the color when I change the layers. It seems the controller is not really running but still bale to restore the last chosen back-light color. Strange. Maybe the problem is not really a connection problem but caused by the 2nd controller not really “running”.

Enabling debugging does not give me any information (except some useless messages about RGB lighting). Maybe somebody has an idea how I can get some relevant data about the communication status?

BTW: That's the prototype waiting for getting the split feature working: ;)


Thanks for any help!

Offline nevin

  • Posts: 496
  • Location: US
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #1 on: Sun, 29 September 2019, 13:44:14 »
compare what you're running in qmk to what's available for keeb.io's split boards, let's split, ergodash, etc... probably just missing a variable or something to identify that it's a split board to talk over serial to the other half.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Daniel LF

  • Thread Starter
  • Posts: 5
  • Location: Germany
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #2 on: Mon, 30 September 2019, 15:24:32 »
Hi,
I did that already. I even “ported” an existing project (choco60) to my setup. Same effect.

Today, I created a minimal hardware-setup and tried an existing project unchanged (orthodox/rev3_teensy:default). Surprise: I have the exact same effect.
Two new Teensys on a developer board, each with just one switch and VCC, GND and the serial pin D0 connected between the two. Result: the one connected via USB works as expected (left side since handedness is detected by USB connection by the orthodox). But the 2nd half doesn’t work.


With my board, I enabled some back-light effects (breathing) and now it became evident that the 2nd controller hangs: the RGB back-light lights up with the last luminosity as its stopped but the effect does not run. It seems to “hang” .

Either there is a basic issue with the Teensy and the serial communication or I missed a fundamental thing. Does anybody has experience with a Teensy in a split setup with serial communication?

Offline nevin

  • Posts: 496
  • Location: US
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #3 on: Tue, 01 October 2019, 05:21:46 »
i've only seen documented working splits running i2c on teensy's. serial should be possible, maybe missing a library or something?
ergodox uses io expander, so not the same electronics setup.
my split board uses serial communication, but it has promicro's not teensy's (i know there are a lot of similarities, but there are some #build differences)
i'd suggest adding the resistors and enabling i2c for communication between the two halves instead of serial.
i could be wrong but something is telling me (from previous research that i can't pinpoint anymore) that there was something up with teensy's & split boards over serial.
« Last Edit: Tue, 01 October 2019, 05:25:47 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Daniel LF

  • Thread Starter
  • Posts: 5
  • Location: Germany
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #4 on: Tue, 01 October 2019, 16:23:41 »
I tried different handedness concepts and I˛C with my project. Both without success. I start to get doubts about myself…

Can you, nevin, or somebody else recommend a simple, working and maintained Teensy based split board which uses I˛C? I would like to try another I˛C setup on the breadboard from which I can be sure that it works for others.

Thanks for the help!

Offline nevin

  • Posts: 496
  • Location: US
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #5 on: Tue, 01 October 2019, 18:21:20 »
check this thread. Let's Split with Teensy 2.0 hopefully this is your issue.

like i said, both, promicro & teensy 2.0 are ALMOST identical controllers, but not EXACTLY IDENTICAL. there are slight differences.

if using i2c, don't forget the resistors.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Daniel LF

  • Thread Starter
  • Posts: 5
  • Location: Germany
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #6 on: Sun, 06 October 2019, 06:01:14 »
Hey Nevin, thanks for your help.

I placed the resistors correctly for the I˛C setup. I ordered some Pro-Micros and tested my setup with them. With the Pro Micros, everything works as expected! I˛C and serial.

The link you – nevin – shared, describes an issue with the “handedness detection by USB”. Since I use “handedness by pin” (and my Teensys detected their side properly when I connected any side directly), I don't think that that this would solve my problem. I haven't tried to use the “handedness by EEPROM” option or hard-coding the side by changing has_usb() as described in the linked thread though. I could not manage that so far and I don't have much hope here. I'll try that later when going back to the Teensys.

I will now port my project to the Pro-Micros, they are anyway cheaper. But my problem will remain: I was thinking about a 2nd board project which would need more pins than the Pro Micro breaks out. Here, I would likely need a Teensy since it has quite some more pins available.

So, still, if anybody has a clue why the serial and I˛C connection might not work, or why the linked thread’s discussion could also affect a “handedness by pin project”, or if somebody knows a working Teensy-split-QMK board, please leave me a message!  :D Thx!

Offline nevin

  • Posts: 496
  • Location: US
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #7 on: Sun, 06 October 2019, 06:41:45 »
2nd project...  how many pins do you need?
more pins... are you talking about a teensy ++2.0 ? Those have a different processor than the 32u4's that are popular on the standard size ones. Using a ++ would be more of a stretch than a std teensy 2.0. If you were building a large split board and needed to use a teensy++ I would just wire straight through (and not use serial or i2c or a TRRS cable)
« Last Edit: Mon, 07 October 2019, 00:18:15 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Daniel LF

  • Thread Starter
  • Posts: 5
  • Location: Germany
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #8 on: Sun, 06 October 2019, 15:49:55 »
I'm using the Teensy 2, not the 2++. Both, the Teensy 2 and the Pro Micro have the 32U4, but the Teensy has just more of the AVR's pins available on the board for soldering. If I'm not wrong, the Pro-Micro provides 18 pins, and the Teensy 2 provides 24 pins with a soldering pad on the board.

The next project is still just a thought… But I guess that I will need at least two more pins for analog input. I was also thinking about using Bluetooth. However, this is at least months away and the flash size could also become a problem, I guess.

Offline nevin

  • Posts: 496
  • Location: US
Re: QMK: Split keyboard halfs don’t talk to each other
« Reply #9 on: Mon, 07 October 2019, 00:15:47 »
22 for 2.0
24 for 3.2
36 for ++2.0
teensy comparison (Breadboard I/O)

teensy 3.2 is also being developed via Kiibohd

pro micro
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68