the-via / releases

GNU General Public License v3.0
2.06k stars 223 forks source link

Received invalid protocol version from device #257

Open Pultag opened 1 year ago

Pultag commented 1 year ago

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 commented 1 year ago

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

Pultag commented 1 year ago

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

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

jluna79 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

https://github.com/the-via/app/issues/91#issuecomment-1505095474

polku commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

JoelMon commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

CheeseManFuu commented 1 year ago

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 commented 1 year ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 7 months ago

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

kemkem221 commented 7 months ago

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 commented 6 months ago

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 commented 3 months ago

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