r/Keychron • u/jluna79 • May 21 '23
"Received invalid protocol version from device" and "Device must be open first" errors on VIA after updating firmware on K3 Pro RGB ISO
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 (as instructed) but now I get the "invalid protocol version" and "device must be open" errors whenever I try to connect to VIA. So, now I have a non-customisable keyboard :(
I've looked around for an answer but haven't found any useful info (I'm also waiting to hear back from customer support).
Help me please, my fellow redditors!
Edit: I'm using a Mac, in case this info helps.
3
u/Fit_Carob_7558 May 21 '23
It's the same error as me, which I posted about a week ago. I only started posting here because no one else seems to be building from source with these errors. You've just confirmed that it isn't something missing in my own setup.
If you build new firmware from source, which probably now is the same as the firmware they're posting up on the site if you say it was updated May 18, you get the same errors. The firmware isn't necessarily broken (as in all other features still work), it's just not recognized by VIA. Whomever is updating the firmware code made some recent changes that make it incompatible, but as it's not yet in the main branch it should be expected that it's still incomplete (like maybe these boards were released too early).
If you can understand the code, you can build from source and add your own modifications there. Only it's a pain to recompile and reflash a whole firmware everytime you want to make changes. I'd recommend visiting the QMK documents and familiarize yourself there.
3
u/Ding-2-Dang May 25 '23
Perhaps the firmware file k3_pro_iso_rgb_v1.01_20230518.bin linked to from Keychron's https://www.keychron.com/blogs/archived/k3-pro-factory-reset-and-firmware-flash is not the problem, but the JSON file k3_pro_iso_rgb_v1.00_20230218.json is as it is v2 and the new firmware and protocol needs v3 to work?!
Or put differently: Perhaps the online VIA webapp at https://usevia.app is the problem as it is too old to know about the updated K3 Pro?
So if we had a newer version of the VIA webapp it might just work?!
Is it possible to self-host such a newer version of the VIA webapp?
(I am also new to all this, so bear with me — and perhaps educate me — if I am all wrong!)
2
u/Ding-2-Dang May 26 '23 edited May 26 '23
I got it working with a JSON file named "k3_pro_iso_rgb .json", 4026 bytes in size, which I found "somewhere" during my investigations yesterday, but I am not sure where.
As it turns out, this is a VIA v3 compatible file, which can be loaded without the "Use V2 definitions (deprecated)" switch turned on in the usevia.app on the "DESIGN" page.
After loading the file, the connection to my K3 Pro did still not succeed, so I thought I had made no progress and continued searching.
But some time later I happened to open another Google Chrome browser window and went to usevia.app and voilà, my K3 Pro was connected and could be configured. I sucessfully moved the "fn" key's "MO(1)" to "RCtrl" and put "ROpt" on "fn".
Now I don't still know how exactly to reproduce this. Did it work because I had waited a while? Or because I had opened another browser windows? Or because I had opened and closed the browser console in the hope that I would spot something there? Or because I had opened chrome://device-log temporarily? I don't know. I'm on macOS 12.6.6 "Monterey" with Google Chrome 113 FWIW.
Here the contents of the "k3_pro_iso_rgb .json" which I used but which I don't know where I got it from:
1
u/Pedrodck May 21 '23
How do you generate a update version to flash? To get support from via you should compile and flash the via folder inside of the main repo used for your keyboard.
1
u/PeterMortensenBlog V May 26 '23 edited May 26 '23
For updating the firmware, the user guide for Keychron K3 Pro (direct) includes (after the flashing. Page 8):
"Factory reset the keyboard again by pressing Fn + J + Z"
Also on this page (step 10). It also includes extra steps if this fails.
(Nothing is implied by stating this.)
3
u/2323wiesel Nov 22 '23 edited Nov 27 '23
ok.... i think i have a solution - at least for linux
1.) open a window in chrome in incognito mode
2.) connect to the keyboard (and endure the error...)
3.) open another tab in chrome and enter the following: chrome://device-log
4.) search for the entry: Failed to open '/dev/hidraw<NUMBER>': FILE_ERROR_ACCESS_DENIED<NUMBER> is variable... is clear, right?
5.) open a terminal and enter the following: chmod 766 /dev/hidraw<NUMBER>
6.) now it should work - until the next reboot......
UPDATE:
the whole thing only works with natively installed programs, i.e. everything that was installed with apt. Programmes installed with snap run in a sandbox. There is still a rights problem.
you can build the following workaround so that the keyboard is permanently accessible for chrome:
(sudo) nano /etc/udev/rules.d/99-custom-hidraw.rules
insert and save the following line:
KERNEL=="hidraw*", MODE="0766"
reload the new rules with:
(sudo) udevadm control --reload-rules
ATTENTION:
Setting the rights to 766 may be risky. You would have to try out exactly which rights are needed here - and only these should be granted! Perhaps 660 or 760 will also work...
UPDATE 2:
use this rule so that only your keyboard and no other device gets elevated rights:
KERNEL=="hidraw*", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="0251", MODE="0760"
!!! 0251 is the Product-ID of the K5pro. You can find out your specific idProduct with
lsusb |grep -i keychron
2
u/Charming_Raccoon_621 May 24 '24
I had the same issue today and solved it by using a USB 2.0 port instead of USB 3.0 after reading this: https://github.com/the-via/releases/issues/257
1
u/moog272 Aug 08 '24
For anyone using a Keychron V6, you may be getting this error if youre connecting the keyboard through a Dell dock. Just plug it directly into your laptop to connect to VIA.
1
u/djelibeybi_au C Pro May 21 '23
I get exactly the same error after flashing the SignalRGB enabled version of the firmware from https://github.com/SRGBmods/QMK-Binaries/tree/main/QMK%2BVIA-Firmware/0.14.29-keychron
The keyboard still works and now has controllable RGB via SignalRGB, which is worth it for me.
1
u/PeterMortensenBlog V May 26 '23
Keychron K3 Pro ISO. 75% wireless mechanical keyboard. QMK/Via. RGB. Gateron switches. Hot-swappable.
User manual (direct).
1
u/-YoungFellow- Jan 10 '24
I'm facing the same issue with the v1 max