carlossless / smk

A keyboard firmware for sinowealth-8051-based devices
GNU General Public License v2.0
46 stars 4 forks source link

Redragon K631 troubleshooting #10

Closed A-Rint-A closed 2 weeks ago

A-Rint-A commented 3 months ago

In general, after one sleepless night I managed to compile this firmware without even killing the bootloader. I already have one bug and a couple of questions. The bug is that when pressing the keys "F" or "G" once in 3-5 presses these keys work as the key "A" I also want to know how I can control keyboard backlighting at least from terminal and ideally add it to openrgb. I have added my configuration in a separate fork, any help would be welcome.

A-Rint-A commented 3 months ago

My fork

A-Rint-A commented 3 months ago

Not everything is as good as it seemed at first glance, the backlight control does not work even through the assigned keys, half of the keys are stuck, please tell me how to use the debug here.

A-Rint-A commented 3 months ago

@carlossless please assist

fucksophie commented 3 months ago

Read #3, you need to modify gpio.c too.

A-Rint-A commented 3 months ago

Unfortunately I can't get debug information as it doesn't work (or I just didn't understand how it works as there is no documentation).

A-Rint-A commented 2 months ago

In general, I called all the keyboard targetcon and edited the configs, but everything went very wrong, the keyboard began to click on all the keys at once, how to combat this behavior

fucksophie commented 2 months ago

Unfortunately I can't get debug information as it doesn't work (or I just didn't understand how it works as there is no documentation).

What debug information? You need to trace the keyboard with a multimeter to figure out where the actual key pins are located, and then insert them in gpio.c .

A-Rint-A commented 2 months ago

I already did, as it turns out when comparing I have the same wiring as the author

fucksophie commented 2 months ago

That is great to know, means your layout might be incorrect. I'll check when I'm home.

A-Rint-A commented 2 months ago

If you compile the firmware from stock, it works for me, although with a couple of unpleasant problems that I just want to solve, all columns match my columns, rows too, LEDs I turned off for the time of debugging

A-Rint-A commented 2 months ago

Ok, thx, as soon as I get to work I'll send you the actual layout

A-Rint-A commented 2 months ago

layout.txt

fucksophie commented 2 months ago

That should work now, try putting it into layout.c and building and writing to your board

A-Rint-A commented 2 months ago

If it worked, I would not write, I will describe the problems in detail, (counting as in the firmware from zero) when pressing the keys in the 2nd row (4th and 5th column) they sometimes work as needed, and sometimes work as the 1st column of the same row, also keys 13 and 14 column when pressing them for more than half a second pour until you press it again, I can even record it on video if it helps

A-Rint-A commented 2 months ago

I have already dug through all the firmware and can not understand what can be associated with such strange behavior, in the indication of contacts there is no error in this I'm sure because several times rechecked it with a multimeter

A-Rint-A commented 2 months ago

All contacts are completely identical to those on the @carlossless keyboard

A-Rint-A commented 2 months ago

It turned out that the first problem was fixed in libification repositories, it remains to fix the problem with sticky keys and so far no other problems have been observed

carlossless commented 2 weeks ago

Hey, all the mentioned problems are also "fixed" (mitigated) in the main branch now.

I experienced the same behavior you saw and it seems to be related to the rate of reports being sent over USB. A delay caused by synchronous writing to UART (debug(...)) before the report is sent seems to fix this, though a permanent fix is still TBD.