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

Received invalid protocol version from device #257

Open
Pultag opened this issue Mar 26, 2023 · 22 comments
Open

Received invalid protocol version from device #257

Pultag opened this issue Mar 26, 2023 · 22 comments

Comments

@Pultag
Copy link

Pultag commented Mar 26, 2023

Hello,

When I try to build up new hand wired keyboard with VIA, I stuck in some error with VIA.
image

Hope to get some guide or help from you soon

@609024370
Copy link

VIA的识别文件的问题,你可以在VIA的github站上随便找个键盘的识别文件的模板,对照一下修改

@Pultag
Copy link
Author

Pultag commented Apr 21, 2023

VIA的识别文件的问题,你可以在VIA的github站上随便找个键盘的识别文件的模板,对照一下修改

Can you help me for the link of code? I cannot find a correct ones to refer

@jluna79
Copy link

jluna79 commented May 21, 2023

I'm getting the same errors after I updated the firmware on my K3 Pro following these steps on the Keychron website. I used the K3 Pro ISO RGB Version (firmware version updated on May 18, 2023.) It all went correctly and the flash was successful.

I got a "Fetching v3 definition failed" error when I reconnected to VIA.

I updated the layout definitions using the file they provide and I started getting the "invalid protocol version" and "device must be open" errors whenever I try to connect.

I tried using the file from the repo to no avail.

I even did a diff between the repo file and the one at the keychron site and added the missing key. VIA complained about "extra fields".

I've ran out of ideas :(

@digitalformula
Copy link

@jluna79 I have the same issue. Keychron Q3 Pro is causing all sorts of problems when connecting to Via. Doesn't work in Linux, Mac or Windows. Different browsers all do the same thing.

@jluna79
Copy link

jluna79 commented May 26, 2023

I've contacted Customer Support and they sent me a new version of the JSON file but did not work either.

They asked for some details about the keyboard and their last message was "1) try in a different computer, 2) send us a video of the successful flash of the firmware" (the flash was already successful, the problem is in VIA, or a bug in the firmware in the keychron repo.

I created a Reddit post with all the details and updates. People have been helping out (but no solution yet).

@bytewisemarissa
Copy link

bytewisemarissa commented Jun 7, 2023

So I was running into this with my Orange Boy Ergo and I was running through a multiplexer. Moving it to a direct connect resolved this error for me. I had issues on both windows and linux (Ubuntu AppImage). Random guess the multiplexer is downgrading the usb protocol from 3.x to 2.x?

@Ding-Fan
Copy link

This would help if you are on linux and chrome

in chrome://device-log find hidraw3(or hidraw2 it depends)

sudo chown $USER:$USER /dev/hidraw3

the-via/app#91 (comment)

@polku
Copy link

polku commented Jun 14, 2023

This would help if you are on linux and chrome

in chrome://device-log find hidraw3(or hidraw2 it depends)

sudo chown $USER:$USER /dev/hidraw3

the-via/app#91 (comment)

Only hidraw2 appeared in chrome log (actually brave://device-log/ but whatever) but changing the permissions on hidraw2 didn't fix for me.
However I noted that when I plug my keyboard, it adds /dev/hidraw1 /dev/hidraw2 and /dev/hidraw4, and changing the permissions on the 3 did fixed the issue.

@tylerlmz1
Copy link

Here's the fix that worked for me

  1. Open chrome://device-log/
  2. See which device has FILE_ERROR_ACCESS_DENIED
  3. If /dev/hidraw4, then sudo chmod 777 /dev/hidraw4

Info source

@Lysquid
Copy link

Lysquid commented Jun 17, 2023

The Arch wiki has an answer that works permanently : Configuration of VIA compatible keyboards
(I had to reboot for it to work)

@JoelMon
Copy link

JoelMon commented Jul 5, 2023

Changing the permission for /dev/hidraw* also worked for me. After making the changes, you have to restart Chrome for the changes to take effect in the browser.

The basic idea is that the permissions are set to root, so Chrome cannot open the device, which causes VIA to fail to pair to the device. When you open chrome://device-log/ after receiving the errors via https://usevia.app, you'll see which device failed due to permission issues. That's the device on which you run sudo chown $USER:$USER /dev/<hidraw #>. Then restart your browser and try again.

image

@aabccd021
Copy link

In my case I had to restart the PC for it to take effect. Probably Chrome was running in the background (not actually closing and reloading the new config).

@slabua
Copy link

slabua commented Aug 31, 2023

Changing the ownership solved my issue.
I did't need to reboot nor even restart chrome.

@CheeseManFuu
Copy link

CheeseManFuu commented Sep 24, 2023

Still getting this issue with my own firmware for my own custom board. I've tried to cross-reference several other already-existing firmwares as well as comb through the VIA docks and don't get anything. And of course, the above solutions around hidraw3 only works for Linux users, but I'm on Windows.

image

Also uploaded my (probably rough) firmware in case somebody can tell what's going on: https://github.com/CheeseManFuu/alicianroneproto/tree/main/alicianrone It's functional for the QMK side, just the VIA side that's been causing me pain all day.

@vinhbui2430
Copy link

Here's the fix that worked for me

  1. Open chrome://device-log/
  2. See which device has FILE_ERROR_ACCESS_DENIED
  3. If /dev/hidraw4, then sudo chmod 777 /dev/hidraw4

Info source

you're a saviour, works flawlessly

@gabcamilo
Copy link

This would help if you are on linux and chrome
in chrome://device-log find hidraw3(or hidraw2 it depends)

sudo chown $USER:$USER /dev/hidraw3

the-via/app#91 (comment)

Only hidraw2 appeared in chrome log (actually brave://device-log/ but whatever) but changing the permissions on hidraw2 didn't fix for me. However I noted that when I plug my keyboard, it adds /dev/hidraw1 /dev/hidraw2 and /dev/hidraw4, and changing the permissions on the 3 did fixed the issue.

the same for me, only it was 4, 5, 6, thank you very much :)

@timnolte
Copy link

OK, thanks to everyone commenting here on what worked for them. For me it was a new Nuphy Air96 v2 and I had to both chmod 777 the device that was returned in the Chrome debug-log but also ensure that I was plugged directly into my machine and not through my USB-C Dock.

@Otpvondoiats
Copy link

设备没有权限的问题,插拔设备前后对比下 ls /dev/hidraw*多出那些的节点,chmod 777 “sudo chmod 777 /dev/hidraw10”

@kemkem221
Copy link

Here's the fix that worked for me

  1. Open chrome://device-log/
  2. See which device has FILE_ERROR_ACCESS_DENIED
  3. If /dev/hidraw4, then sudo chmod 777 /dev/hidraw4

Info source

you're a saviour, works flawlessly

Mình dùng Monsgeek M2 cũng bị vậy thì làm sao ạ

@rashen
Copy link

rashen commented Mar 17, 2024

I had this same issue when trying to access VIA through chromium installed from snap. It turns out that chromium snap package does not have access to hidraw, so you need to install it from a different source. It worked instantly when I swapped to chrome from a .deb package.

@kitsunekyo
Copy link

i resolved it by loading the json from here: https://www.keychron.com/pages/firmware

@Soappiness
Copy link

For my part I use a HS60 v3 ISO and connecting it through a Dell Dock was causing me the same errors, connecting it directly on my PC solved all the problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests