Skip to content
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

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

Closed
CodingFutu opened this issue Aug 31, 2023 · 16 comments
Closed
Labels
bug Something isn't working

Comments

@CodingFutu
Copy link

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

@CodingFutu CodingFutu added the bug Something isn't working label Aug 31, 2023
@kjon-life
Copy link

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

@obra
Copy link
Member

obra commented Sep 25, 2023 via email

@palthedog
Copy link

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

@obra
Copy link
Member

obra commented Dec 11, 2023

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

@palthedog
Copy link

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
Copy link

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

{
    "id": 7,
    "command": "keymap.custom",
    "args": []
}

@obra
Copy link
Member

obra commented Dec 11, 2023

can you attach a full debug bundle?

@palthedog
Copy link

Here you are.
chrysalis-debug.json.txt

@obra
Copy link
Member

obra commented Dec 12, 2023

@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
Copy link

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
Copy link
Member

obra commented Dec 12, 2023 via email

@tlyu
Copy link
Contributor

tlyu commented Dec 12, 2023

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
Copy link
Contributor

tlyu commented Dec 12, 2023

(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
Copy link
Contributor

tlyu commented Dec 13, 2023

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
Copy link
Contributor

tlyu commented Dec 13, 2023

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
Copy link
Contributor

tlyu commented Dec 14, 2023

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.

@obra obra closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants