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

Atreus Connection Issues On chrysalis.keyboard.io #1325

Closed
nlordell opened this issue Feb 29, 2024 · 6 comments
Closed

Atreus Connection Issues On chrysalis.keyboard.io #1325

nlordell opened this issue Feb 29, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@nlordell
Copy link

nlordell commented Feb 29, 2024

When trying to connect my Atreus keyboard on chrysalis.keyboard.io, I get the following message:

I couldn't connect to the keyboard. It may already be connected in another application or browser window. The error I got was: NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://chrysalis.keyboard.io
  2. Click on 'Connect'
  3. See error

Expected behavior
Connect works.

Desktop (please complete the following information):

  • OS: Fedora 39 + Chromium 122
  • Chrysalis Version: chrysalis.keyboard.io
Report Bundle
{
  "logs": [
    {"message": "[2024-02-29T12:19:19.024Z] [DEBUG] [t.navigate (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:666536)]: navigating to location", "data": {"args": ["/keyboard-select"]}},
    {"message": "[2024-02-29T12:19:19.034Z] [DEBUG] [t.navigate (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:666536)]: navigating to location", "data": {"args": ["/keyboard-select"]}},
    "[2024-02-29T12:19:19.057Z] [LOG] [kn (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:1462261)]: [object Object]",
    "[2024-02-29T12:19:19.057Z] [LOG] [kn (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:1462261)]: null",
    "[2024-02-29T12:19:21.092Z] [LOG] [u (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:881534)]: in connectToKeyboard",
    "[2024-02-29T12:19:21.094Z] [LOG] [kn (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:1462261)]: [object Object]",
    "[2024-02-29T12:19:21.095Z] [LOG] [kn (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:1462261)]: null",
    {"message": "[2024-02-29T12:19:23.739Z] [ERROR] [https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:889261]: error while trying to connect", "data": {"error": {"stack": "Error: Failed to execute 'open' on 'SerialPort': Failed to open serial port."}, "device": null}},
    {"message": "[2024-02-29T12:19:23.740Z] [DEBUG] [https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:631312]: Toast message received", "data": {"msg": {"variant": "error", "message": "I couldn't connect to the keyboard. It may already be connected in another application or browser window. The error I got was: NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port."}, "label": "toast"}},
    "[2024-02-29T12:19:23.743Z] [LOG] [kn (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:1462261)]: [object Object]",
    "[2024-02-29T12:19:23.743Z] [LOG] [kn (https://chrysalis.keyboard.io/js/main.0003b1c84532178a6aa3.bundle.js:205:1462261)]: null"
  ]
}

Additional Context
One thing I noticed is that, when connecting from a newly opened Chromium window and I see the WebUSB dialog pop up, I see the the 'Atreus (tty...)' entry. When I select it, I get the connection error as described ☝️. If I try to connect again, I see an entry 'Atreus (tty...) - Paired' in the dialog instead, suggesting that the first connection attempt is doing something. Connection fails the second time as well:

  • first failed attempt
    image
  • subsequent failed attempts
    image

Also note that this is a fairly fresh Fedora install, I vaguely remember having to install udev rules in the past for my Model01, and wonder if it may be related to that?

@nlordell nlordell added the bug Something isn't working label Feb 29, 2024
@obra
Copy link
Member

obra commented Mar 1, 2024 via email

@nlordell
Copy link
Author

nlordell commented Mar 1, 2024

I did some debugging and got it to work, a few comments:

  • Yes, the text was super helpful in debugging. If I hadn't previously had to mess with udev rules when setting up my Model01 keyboard in the past, I would have likely taken a lot longer to figure out where to start looking
  • There is a user-select: none CSS property on the help which is annoying, in particular you cannot copy the path to the rules.d directory or the .rules file name. Note that the rule doesn't apply to the udev rules themselves, so those can be copied.
  • I tried the udev rules from the help text but they didn't work for me. Note that it works using the 60-kaleidoscope.rules rules from the Kaleidoscope repository. I don't know if it is the ModemManager issue or the seat tag is missing (my understanding of udev is super limited).

So, for others having the same issue, I suggest following the instructions from Kaleidoscope for now.

@obra
Copy link
Member

obra commented Mar 1, 2024 via email

@obra obra closed this as completed Mar 5, 2024
@ewhd
Copy link

ewhd commented May 13, 2024

@obra

Not sure if I should create a new issue or revive this one, I experienced the same problem as nlordell, and thanks to this thread solved it by downloading 60-kaleidoscope.rules.

After some testing I think I was able to narrow down the problem to a syntax difference:

The udev rules the error message instructed me to save as 50-keleidoscope.rules have lines that look like:

SUBSYSTEM=="usb", ATTR{idVendor}=="3496", ATTR{idProduct}=="0005"

Whereas the udev rules in 60-kaleidoscope.rules look like:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="3496", ATTRS{idProduct}=="0005"

With SUBSYSTEMS and ATTRS now having "S" on the end.

When I changed those terms on each line in 50-kaleidoscope.rules to match, it works.

Oh, and also I have to unplug and re-plug the keyboard when I run sudo udevadm control --reload-rules to help the rules take effect, a step included in these instructions but which the error message did not mention.

@obra
Copy link
Member

obra commented May 13, 2024 via email

@obra
Copy link
Member

obra commented May 13, 2024

Chrysalis 2024.0513.2048 contains this fix.

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

3 participants