keyboardio / Chrysalis

Graphical configurator for Kaleidoscope-powered keyboards
https://github.com/keyboardio/Chrysalis#chrysalis
GNU General Public License v3.0
493 stars 65 forks source link

"Communication timeout" with Chrysalis(0.13.2) after recent firmware upgrade #1305

Closed CodingFutu closed 5 months ago

CodingFutu commented 11 months ago

Hi,

Just wanted to report. I am getting "Communication timeout" when trying to connect keyboardio model 100 to Chrysalis(0.13.2). This started to happen a few days ago after the firmware upgrade. The keyboard itself is working fine. thanks

image image

kjon-life commented 10 months ago

same here--trying to get my model 01 working image

obra commented 10 months ago

I'd love to know if https://chrysalis.keyboard.io in a chrome-based browser works better for you.

(Also, after you run into this issue, please go into the sidebar menu and generate a debugging bundle. Without that, we don't have much to go on.)

On Sat, Sep 23, 2023 at 3:10 PM kjon @.***> wrote:

same here--trying to get my model 01 working [image: image] https://user-images.githubusercontent.com/76539355/270135312-7dd1b1cf-fae0-4fbc-80c8-4196ccf50418.png

— Reply to this email directly, view it on GitHub https://github.com/keyboardio/Chrysalis/issues/1305#issuecomment-1732419959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2CGE7VUPL3SOTGTPFDX35M4TANCNFSM6AAAAAA4F4HCHM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

palthedog commented 7 months ago

Same here. https://chrysalis.keyboard.io/ doesn't work for me as well.

obra commented 7 months ago

I'd love to know if the 0.92 firmware build works better for folks running into this issue

palthedog commented 7 months ago

For me, 0.92 seems to be the root cause of the issue. I updated the firmware version to 0.92 yesterday. After that, my Chrysalis could never connect to my Model 100 correctly. I've tried older Chrysalis (0.13.0) but it didn't resolve the issue.

palthedog commented 7 months ago

As far as I checked the log, my keyboard doesn't respond to a request something like

{
    "id": 7,
    "command": "keymap.custom",
    "args": []
}
obra commented 7 months ago

can you attach a full debug bundle?

palthedog commented 7 months ago

Here you are. chrysalis-debug.json.txt

obra commented 7 months ago

@palthedog If I say "serial terminal" is that something that means something to you?

The Arduino IDE has a built in serial terminal and I'd really like to see what your keyboard says when you send the commands

help version keymap.custom

palthedog commented 7 months ago

I'm not familiar with Arduino but here is the result. I hope it helps you to resolve the issue.

macros.map
macros.trigger
mousekeys.scroll_interval
mousekeys.init_speed
mousekeys.base_speed
mousekeys.accel_duration
mousekeys.warp_grid_size
palette
colormap.map
idleleds.time_limit

.
0.92.0+77 
.
65535 30 31 32 33 34 76 231 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 58 59 60 61 62 65535 65535 40 18614 63 64 65 66 67 68 43 65535 65535 2102 2103 0 65535 65535 17497 18637 18613 2095 2096 47 48 69 74 65535 65535 2086 2087 2097 101 65535 17496 76 80 81 82 79 0 0 77 70 73 65535 65535 49 65535 65535 17492 65535 18658 18666 18665 0 49 2097 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 24576 65535 95 96 97 86 17492 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 92 93 94 87 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 89 90 91 46 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 98 55 85 84 40 65535 30 31 32 33 34 76 44 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 30 31 32 33 34 76 44 33 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 32 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 31 42 11 13 14 15 34 37 78 29 27 6 25 5 17451 226 30 17451 17 16 35 36 34 37 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 
.
65535 30 31 32 33 34 76 231 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 58 59 60 61 62 65535 65535 40 18614 63 64 65 66 67 68 43 65535 65535 2102 2103 0 65535 65535 17497 18637 18613 2095 2096 47 48 69 74 65535 65535 2086 2087 2097 101 65535 17496 76 80 81 82 79 0 0 77 70 73 65535 65535 49 65535 65535 17492 65535 18658 18666 18665 0 49 2097 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 24576 65535 95 96 97 86 17492 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 92 93 94 87 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 89 90 91 46 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 98 55 85 84 40 65535 30 31 32 33 34 76 44 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 30 31 32 33 34 76 44 33 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 32 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 31 42 11 13 14 15 34 37 78 29 27 6 25 5 17451 226 30 17451 17 16 35 36 34 37 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 6

Let me note that a single keymap.custom command doesn't respond anything even I waited the response for 1 minute. However, if I send the same message again, I got two responses at once. So what I actually send was:

help
version
keymap.custom
<wait for a while>
keymap.custom

and also I can reproduce this behaviour again and again like:

<send keymap.custom>
<nothing happen>
<send keymap.custom>
.
65535 30 31 32 33 ......
.
65535 30 31 32 33 ......
<send keymap.custom>
<nothing happen>
<send keymap.custom>
.
65535 30 31 32 33 ......
.
65535 30 31 32 33 ......
obra commented 7 months ago

That's spectacularly useful. Thanks!

On Mon, Dec 11, 2023 at 7:16 PM Pal @.***> wrote:

I'm not familiar with Arduino but here is the result. I hope it helps you to resolve the issue.

macros.map macros.trigger mousekeys.scroll_interval mousekeys.init_speed mousekeys.base_speed mousekeys.accel_duration mousekeys.warp_grid_size palette colormap.map idleleds.time_limit

. 0.92.0+77 . 65535 30 31 32 33 34 76 231 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 58 59 60 61 62 65535 65535 40 18614 63 64 65 66 67 68 43 65535 65535 2102 2103 0 65535 65535 17497 18637 18613 2095 2096 47 48 69 74 65535 65535 2086 2087 2097 101 65535 17496 76 80 81 82 79 0 0 77 70 73 65535 65535 49 65535 65535 17492 65535 18658 18666 18665 0 49 2097 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 24576 65535 95 96 97 86 17492 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 92 93 94 87 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 89 90 91 46 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 98 55 85 84 40 65535 30 31 32 33 34 76 44 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 30 31 32 33 34 76 44 33 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 32 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 31 42 11 13 14 15 34 37 78 29 27 6 25 5 17451 226 30 17451 17 16 35 36 34 37 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 . 65535 30 31 32 33 34 76 231 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 58 59 60 61 62 65535 65535 40 18614 63 64 65 66 67 68 43 65535 65535 2102 2103 0 65535 65535 17497 18637 18613 2095 2096 47 48 69 74 65535 65535 2086 2087 2097 101 65535 17496 76 80 81 82 79 0 0 77 70 73 65535 65535 49 65535 65535 17492 65535 18658 18666 18665 0 49 2097 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 24576 65535 95 96 97 86 17492 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 92 93 94 87 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 89 90 91 46 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 98 55 85 84 40 65535 30 31 32 33 34 76 44 44 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 228 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 229 42 11 13 14 15 51 52 78 29 27 6 25 5 17451 226 226 17451 17 16 54 55 56 45 65535 30 31 32 33 34 76 44 33 70 35 36 37 38 39 49 53 20 26 8 21 23 43 224 32 40 28 24 12 18 19 46 75 4 22 7 9 10 41 225 31 42 11 13 14 15 34 37 78 29 27 6 25 5 17451 226 30 17451 17 16 35 36 34 37 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 6

Let me note that a single keymap.custom command doesn't respond anything even I waited the response for 1 minute. However, if I send the same message again, I got two responses at once. So what I actually send was:

help version keymap.custom

keymap.custom and also I can reproduce this behaviour again and again like: . 65535 30 31 32 33 ...... . 65535 30 31 32 33 ...... . 65535 30 31 32 33 ...... . 65535 30 31 32 33 ...... — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you commented.Message ID: ***@***.***>
tlyu commented 7 months ago

As I mentioned in Discord, but will put here for the record: the first line, including trailing space, plus the 5 characters CR LF period CR LF, is a multiple of 64. The truncated second line, assuming there's no line termination, is also a multiple of 64. This confirms a suspicion that I had about us needing to send ZLPs in some cases to make sure the host sees the output if it's a multiple of 64 bytes.

tlyu commented 7 months ago

(The total length of those two replies is 4096, a nice round power of 2, which is also 64 times 64. So now we've reverse engineered the buffer size that Windows and/or the Arduino serial monitor is using there.)

tlyu commented 7 months ago

Awaiting further confirmation, but it seems likely that the combination of keyboardio/Kaleidoscope-Bundle-Keyboardio#51, keyboardio/ArduinoCore-GD32-Keyboardio#52, and keyboardio/ArduinoCore-GD32-Keyboardio#53 fixes these issues.

tlyu commented 7 months ago

For anyone affected by this problem who hasn't seen this on Discord, this is a new snapshot that might help https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases/tag/v0.92.1-snapshot

tlyu commented 7 months ago

Preliminary feedback implies that these ZLP fixes likely either fix these issues, or substantially mitigate them. Thank you to everyone who's tested so far, and please do try out the snapshot if you haven't already.