vial-kb / vial-gui

Vial is an open-source cross-platform (Windows, Linux and Mac) GUI and a QMK fork for configuring your keyboard in real time.
https://get.vial.today
GNU General Public License v2.0
896 stars 167 forks source link

Unsupported protocol #134

Open GermanG opened 1 year ago

GermanG commented 1 year ago

I own an ymdk air40 keyboard, before I had to flash it because it ended up in DFU bootloader loop and never got it back. So I checked out the latest QMK repo and flashed it with the ymd40v2 firmware. That worked right away but Vial started to throw the "Unsupported protocol version!" error. Went to the via website and it was detected as a ymd40v2 and no issue at all. Downloaded the vial-gui code (I have the appImage), faced the python 3.10 issue (got 3.6 to make it work) and after a quick hack got it working, seems to be that the protocol is nowadays at version 10. src/main/python/protocol/keyboard_comm.py

-SUPPORTED_VIA_PROTOCOL = [-1, 9]
+SUPPORTED_VIA_PROTOCOL = [-1, 10]

Tested it and it just works, no issues so far with my keyboard. I don't know what changed from 9 to 10, and I don't think it what I did is the proper solution.

xyzz commented 1 year ago

Yes, the latest VIA protocol is currently not supported. You should use the VIA application instead for these keyboards. I'm unconvinced it is worth the effort of adding proper support for the new protocol.

GermanG commented 1 year ago

I'm clueless about VIA, can you point me where to look for the protocol specs? (no promises, just want to figure how much effort it is)

xyzz commented 1 year ago

I don't think there's a spec for the protocol, you can look at the source code - https://github.com/qmk/qmk_firmware/blob/master/quantum/via.c as far as I can tell the changes are in https://github.com/qmk/qmk_firmware/commit/4efe6330c49f076b9c01d3f609dea0cd9f9b0214 however, the keycodes also changed in qmk between via's protocol 9 and 10 - specifically, qmk changed the TO() keycode macro, and I'm not sure what via plan is with regards to that, I think as of now it's just outright broken

GermanG commented 1 year ago

Checking the commit you mention, looks like it is a change to manage the encoder knob, regretfully none of my keyboards have one so I can't check how it looks in the via web interface. (Not at home right now, but I'm going to check if the TO() messes my keyboard and edit this comment)