I finally have a working build of Vial firmware for my F77!
It does appear that I was running into some sort of software bug. Through trial and error testing, I determined that building against a checkout of the Vial source tree that pre-dates when they did their last quarterly merge with QMK master (on September 12) results in a working firmware. There was a lot that changed,
so it's a huge commit, and I haven't taken the time to try to narrow down the culprit yet.
But since the last public update of the Vial GUI
(v0.4.1) was back in July, and since that was well before the regression, I figured it would make sense to do a build based on the state of the Vial QMK fork at that point in time. So far, it seems to be working great! So I'm attaching my F77 Vial firmware here for anyone else who might want to give it a spin, as well as provide build instructions.
So far, I'm enjoying Vial a lot more than VIA. It has a bunch of great benefits compared to VIA: besides the lighter-weight GUI utility, it is also much more feature-full. If used with this firmware, you don't have to sideload a JSON..."it just works". It also allows you to configure things like Tap Dance and Combos directly from the GUI itself without recompiling and reflashing, which you can't do with VIA. If anybody else ends up trying this out, I'd love to hear your thoughts and compare notes (though at this point I've barely scratched the surface myself...so far I've just made sure the basics work, reconfigured my layout, etc.).
Some notes:
- I have only compiled one firmware image, targeting my F77 with HHKB-style split right shift and otherwise standard ANSI layout. But I'm attaching the unified diff of all my changes to the QMK/Vial/pandrew sources (they're really quite minimal), and it should hopefully be fairly obvious how to apply the same changes to the source tree of whichever other board variants you might wish to target. Feel free to drop questions for me here if this assumption on my part proves invalid. Also keep in mind that I only own F77s, so I can only advise when it comes to other board models, not actually test.
`
- Since early April when Ellipse made his most recent QMK builds, there has been additional progress both with pandrew's private QMK fork as well as on the haptic/solenoid driver front. However, as I've said before, I don't have a solenoid, so I have no way to test the difference in performance or experience (if any) between the state of the code as it existed in April, and as it currently stands today. So for my build, instead of using the latest-and-greatest, I made the decision to use the exact same code from pandrew (for the xwhatsit controller driver/implementation) and darkcruix (for the solenoid changes) as Ellipse used when he compiled his firmware. That way, there should be few-to-no surprises for people.
`
- I happened to notice that pandrew's QMK port piggybacks on top of Zenith's USB Vendor ID. It looks like this in turn was just inherited / blindly carried forward from xwhatsit's original ibm_capsense firmware. Why xwhatsit chose to use that Vendor ID, no clue...maybe he figured that they're a defunct company so what harm could it do. Anyway, I would advocate that we use the USB Vendor ID from pid.codes who gives out Product IDs to open source hardware projects. We will need to follow their instructions for requesting a USB PID from them. I haven't started the process, and it might even be best if I wasn't the point of contact for this (? though if people think it would be helpful for me to spearhead this, I can't promise anything at this point but I'll see what I can do). But for this firmware build, I've gone ahead and changed over to using the pid.codes VID and picked an unused PID.
`
- I built a special copy of pandrew's utility that works with this firmware! I will attach it to this post. Note that this copy will only work with this firmware (not with the QMK firmwares built by Ellipse, and not with the VIA firmwares none of which work with any version of pandrew's utility anyway AFAICT). And I only compiled it for Windows. But the unified diff I'm attaching also contains the necessary patch to the pandrew util source should somebody want to build Mac or Linux binaries.
`
- ...that said, the Vial GUI has an option built right into it that allows you to kick the keyboard controller over into bootloader/DFU mode. So if that's all that you use the pandrew utility for, then you don't really need it anymore. (Though it's handy for other things.)
`
- Vial has a "secure unlock" mode that prevents you from making changes to your keyboard from the PC host until you have pressed a specific combination of keys first to "authenticate" your intention; this is briefly described here. Note, however, that I compiled my Vial firmware with the security feature disabled. If you actually want this feature, then you'll have to build your own.
`
- All Vial firmwares work with / are backwards-compatible with VIA itself, and this one is no exception. But assuming anybody actually cares to use VIA with this Vial firmware ("but why?"), since the USB VID & PID have changed, the original JSON from darkcruix that Ellipse distributed will not work here. You'll have to use this modified one that I've attached to this post instead.
`
- There isn't enough EEPROM space on the 32U2 for all of the features + the default # of keymap layers (4) + the default # of tap dance and combos entries (8/ea), so I fixed them at 3 layers and 4 each for tap dance and combos. But after more testing, it looks like there is at least some remaining headroom to expand the count of either one (layers) or the other (TDs & combos), should you desire. Just edit the appropriate lines in config.h before compiling.
In summary, I believe that this is a fairly no-compromises firmware:
- ...it works with Vial (and supports all of its enhanced features vs. VIA)
- ...it also still works with VIA, if you so choose
- ...it is compatible with (a special build of) pandrew's utility
- ...it contains the exact same solenoid implementation and default settings/tweaks for it as Ellipse's
There's a 7zip archive attached with all the bits (split into two, because of forum file size attachment limits, but not named correctly ALSO because of forum file EXTENSION limits...so rename *.001.7z > *.7z.001, same for 002, etc.). This is what's included:
- newf77-vial-0p4p1-ansi_hhkb_splitshift_numeric.hex (the F77 Vial firmware binary itself)
- newf77-via-vial.json (VIA JSON keyboard definition)
- pandrew-util-for-vial.exe (pandrew utility compatible with Vial firmware)
- newf77-vial-0p4p1-patches.diff (unified diff patch against vial-qmk + pandrew sources)
Here are the command-by-command build instructions...if you follow this precisely, you should end up with a firmware image
100% identical to what is attached to this post for download. To start with, make sure that you have a working QMK build environment; if you have successfully built QMK in the past (
e.g. by following Ellipse's instructions) then you should be good to go. Just make sure to clear your existing 'qmk_firmware' directory out of your home directory first (move/rename/delete it) before proceeding.
Code: Select all
cd ~
wget "https://deskthority.net/download/file.php?id=71432" -O ~/newf77-vial-package.7z.001
wget "https://deskthority.net/download/file.php?id=71433" -O ~/newf77-vial-package.7z.002
7z x ~/newf77-vial-package.7z.001 -o`echo ~`
wget https://www.modelfkeyboards.com/wp-content/uploads/2020/07/QMK-layout-files.zip -O ~/QMK-layout-files.zip
unzip ~/QMK-layout-files.zip zF77_-_HHKB_Split_Shift,_everything_else_ANSI_-_0-9.json -d ~
git clone http://purdea.ro/qmk_firmware ~/pandrew-qmk
git -C ~/pandrew-qmk reset --hard ecc46a7
qmk clone vial-kb/vial-qmk -b vial
git -C ~/qmk_firmware reset --hard ff5d361
git -C ~/qmk_firmware/lib/chibios reset --hard ffe54d6
git -C ~/qmk_firmware/lib/chibios-contrib reset --hard 61baa6b
rm -r ~/qmk_firmware/lib/chibios-contrib/ext/mcux-sdk
git -C ~/qmk_firmware/lib/googletest reset --hard ec44c6c
git -C ~/qmk_firmware/lib/lufa reset --hard ce10f76
cp -a ~/pandrew-qmk/keyboards/xwhatsit ~/qmk_firmware/keyboards
cd ~/qmk_firmware
patch -p1 < ~/newf77-vial-package/newf77-vial-0p4p1-patches.diff
qmk compile ~/zF77_-_HHKB_Split_Shift,_everything_else_ANSI_-_0-9.json
mv ~/qmk_firmware/xwhatsit_brand_new_model_f_f77_wcass_default_fff892d.hex ~/qmk_firmware/newf77-vial-0p4p1-ansi_hhkb_splitshift_numeric.hex
Enjoy!
EDIT: ...oh yeah, and
duh, probably should've mentioned that you also need to go and
download the Vial GUI to configure the darn thing after you flash it, obvs.