Page 1 of 1

Flash New Model F with VIAL firmware

Posted: 26 May 2022, 22:06
by Kurk

Hi all,
Thanks to NathanA's efforts, I was able to flash the VIAL firmware to my New Model F keyboard. Here's a step-by-step manual for others to follow.

  • New Model F with factory-installed QMK software
  • Objective: install VIAL firmware
  • OS: Windows 10
---1---
Unzip NathanA's VIAL firmware to a convenient location
"newfxx-vial_20220405.zip"
newfxx-vial_20220405.zip
See also NathanA's post: viewtopic.php?p=503356#p503356

---2---
Install Atmel Flip
https://www.microchip.com/en-us/development-tool/flip

---3---
Connect New Model F to PC (note: directly to PC; not via an USB hub) -> new keyboard gets installed
Put Keyboard into bootloader mode (LShift+RShift+B. Note: only works with original QMK firmware, i.e not anymore after flashing VIAL).

---4---
Install ATmega USB driver: Control Panel -> Device manager -> Other devices -> ATmega32U2 DFU -> update driver (from local file): select the following directory: C:\Program Files (x86)\Atmel\Flip 3.4.7\usb
Note: this only needs to be done once.

---5---
Start FLIP
Select target Device (ATmega32U2)
Select communication medium (USB -> open)
File -> load HEX file "eeprom_eraser.hex" (from NathanA's zip)
Keep 'Erase', 'Blank Check', 'Program' and 'Verify' check boxes selected and press 'Run'
Upon successful completion, click the "Start Application" button

---6---
As above, but load the proper firmware file ("newf62-vial-0p4p1.hex" or "newf77-vial-0p4p1.hex")

Note: always flash the "eeprom_eraser.hex" before flashing new firmware.

---7---
Install and use VIAL
https://get.vial.today/
From now on, the keyboard can be programmed with VIAL (Windows/MacOS/Linux).

Re: Flash New Model F with VIAL firmware

Posted: 26 May 2022, 22:33
by Muirium
Does QMK Toolbox work for flashing the firmware? I’ve certainly used it on Intel and M1 Mac with success on my Xwhatsit controllers in OG Kishsaver, AT and 3278 for Pandrew’s QMK hex file. (Toolbox is also my tool of choice for flashing Soarer’s converters and TMK.)

https://github.com/qmk/qmk_toolbox

It’s cross platform and nicely lightweight. I’d try it first on an Ellipse model if I had one.

Re: Flash New Model F with VIAL firmware

Posted: 27 May 2022, 05:42
by NathanA
Kurk, thanks for this & for your enthusiasm for Vial on the New Model Fs.
Muirium wrote:
26 May 2022, 22:33
Does QMK Toolbox work for flashing the firmware?
Yes of course, and like you I both prefer & recommend it. FLIP can of course be used in a pinch, but even setting aside the question of multiplatform support / portability, I find it to be too "fiddly", and I don't like the Java runtime dependency that it has.

To be absolutely clear: the ability to use either flashing tool has everything to do with the particular microcontroller being used, and (at least in the case of Atmel microcontrollers with native USB support) virtually nothing to do with the either the controller board itself or the keyboard that it is driving. The reason you can use either Atmel FLIP or QMK Toolbox to flash an Ellipse board is because both tools support flashing the Atmel ATmega32U2 microcontroller chip, and that's the chip that was used as the "brains" of the controller on the Ellipse boards. It has nothing to do with some kind of specific support for "the Ellipse keyboards" having been added to either flashing program, as nobody went out of their way to add such support to either app.

It also has absolutely nothing to do with *which* firmware (QMK / VIA / Vial / xwhatsit / whatever) you're flashing to the controller...from the flashing tool's perspective, they're all just arbitrary sequences of bits that it is sending over the wire to the bootloader (which in turn is what actually writes them to flash memory).

Incidentally, the original xwhatsit controllers *also* are based around the ATmega32U2, and so *also* can be flashed both by FLIP as well as QMK Toolbox. In fact, though the controller boards inside Ellipse's keyboards look visually distinct from the original xwhatsit, schematically/electrically they are about 95% identical...extremely close to the xwhatsit "reference design". It's so close to being identical that you might as well treat both the original xwhatsit controller and the wcass-redesigned one that Ellipse has been using as interchangeable with each other from a software perspective. Can you flash an xwhatsit with QMK Toolbox? Yes? Well then the same goes for a controller or keyboard you got from Ellipse. Simple as that.

(In fact, the controller designs are so similar to each other that this also extends to the firmware itself. The rows/columns mapping is slightly different between the two board designs, but that's really about it. There is no reason that you cannot flash QMK to an original xwhatsit, or flash xwhatsit's original ibm_capsense to the wcass/Ellipse model. Heck, Ellipse's keyboards initially shipped with ibm_capsense flashed to them from the factory before pandrew released his QMK port!)

One important distinction between QMK Toolbox and Atmel FLIP besides what has already been discussed is that Atmel FLIP was written by the vendor who manufactures the microcontroller, and so only supports flashing Atmel MCUs, while QMK Toolbox aspires to support however many different microcontrollers that QMK itself has first-party support for. So if you are using QMK on a whole fleet of keyboards that are all built around different microcontrollers, you can stick with just one tool -- QMK Toolbox -- to service all of them, and maintain a fairly unified experience that way, rather than be required to learn how to use a dozen different flashing tools.

Re: Flash New Model F with VIAL firmware

Posted: 27 May 2022, 18:26
by flowchartsman
I followed these instructions exactly for my f77 with xwhatsit 2u backspace and split right shift, but now my backspace key doesn't work any more! Every other key shows up fine in the vial matrix no matter what I do. Can anyone help me out?

EDIT: looks like the the spring might have slipped when I was getting at the board. Not sure how, since I didn't take the keys off, but I removed it and reseated it and it fired again.

Re: Flash New Model F with VIAL firmware

Posted: 24 Jun 2022, 15:16
by OxC0FFEE
This is great! Now I have Vial on my F77! Thanks so much for this, it worked like a charm.

For those who don't know, you can now configure a Vial-flashed board entirely from a web browser at https://vial.rocks, no host-side software install needed! Play with your config, prank a coworker, it's your choice. What a time to be alive!

Re: Flash New Model F with VIAL firmware

Posted: 30 Jun 2022, 22:57
by Kugelkopf
Having just switched over to Vial successfully, I might share one or two clarifications for the unexperienced:

Using QMK toolbox seems to be even simpler, than with Flip: step 4 is not needed. As mentioned elsewhere, QMK Toolbox isn't available for users of older OS X versions, but dfu-programmer may be installed using Mac Ports and should work equally well. It may not make much sense, though, since Vial itself isn't available for older OS X versions. This holds for the online version, too. At least the latest Chrome version available for Mavericks doesn't work. Both QMK Toolbox and Vial β v0.6 worked fine under "Catalina" as far as I can tell today.

NathanA's files work nicely, thanks for sharing! Once in Vial one can easily make minor adjustments, like setting an ISO Enter key, e.g. Unlike with QMK configurator, there is no need to set positions with only stabilisers on guard to N/A.

What had caused me some headaches before advancing was the fear to lose the ability to enter bootloader mode. Better prepared readers may shake their heads but for those equally unaware I'm clarifying here, that NathanA's files override this combination, indeed, but "Reset" is still within reach at layer 2 ("Fn" + "Space" + "r"). Contrary to what I'd feared, it not only resets the MCU, but really enters bootloader mode, so it remains possible to return to plain QMK or even xwhatsit's firmware any time. I wasn't successful yet to redefine that combination in Vial's "combo" tab, but will investigate further.

A minor annoyance for the really unexperienced is the lack of a "clear" button in Vial to get rid of overhastily made key assignments. Double clicking and manually assigning the keycode "KC_NO" did the trick for me, while carefully analysing the documentation might unearth a more elegant way.

Re: Flash New Model F with VIAL firmware

Posted: 10 Oct 2023, 01:46
by billm
Trying this with dfu-programmer on either mac or linux. All I get is dfu-programmer "no device present". I've tried shorting the PROG pads about 10 times. NOTHING. I've tries l shift + r shift + b about 50 times. NOTHING. How do I get this god damn thing into bootloader mode? Is there a better substitute for flip on mac that dfu-programmer?

Re: Flash New Model F with VIAL firmware

Posted: 10 Oct 2023, 11:47
by Muirium
billm wrote:
10 Oct 2023, 01:46
Is there a better substitute for flip on mac that dfu-programmer?
Yes. :D

I can’t answer the pins issue as my hardware is original IBM with Xwhatsit controller. But presumably you are trying to short the appropriate pins while it’s plugged into the host computer with the firmware updater running…

Re: Flash New Model F with VIAL firmware

Posted: 12 Oct 2023, 19:41
by NathanA
Somehow missed Kugelkopf's post here last year...
Kugelkopf wrote:
30 Jun 2022, 22:57
NathanA's files work nicely, thanks for sharing!
Just in case anybody finds their way to this thread later and sees the link to my Vial firmwares supplied by OP Kurk at the top, there are newer/updated versions & I definitely recommend those. Here is the link to the latest publicly-available versions. If you look for whatever my most recent post is in that thread that has attachments, it's likely that is going to be the latest version. (Though sometimes I do post minor test versions for specific people using specific board models to play with...if it is a general release it will most likely be referred to by release # in the body of the post.)
Kugelkopf wrote:
30 Jun 2022, 22:57
What had caused me some headaches before advancing was the fear to lose the ability to enter bootloader mode. Better prepared readers may shake their heads but for those equally unaware I'm clarifying here, that NathanA's files override this combination, indeed, but "Reset" is still within reach at layer 2 ("Fn" + "Space" + "r"). [...] I wasn't successful yet to redefine that combination in Vial's "combo" tab, but will investigate further.
I'll dive further into the various ways to enter bootloader mode in more detail in my response to billm below this, but I did not "override" the LShft+RShft+B combination. That is a built-in QMK combo called a "Command Key" (or "Magic Key" in older versions). This QMK feature is documented here and includes more than just a bootloader enter feature. The modifier combo needed to access Command Keys is LShft+RShft by default & this can only be changed by editing your config.h and recompiling QMK from source. No need to bother with that in the case of my Vial firmwares, though...any change made to the Command Key combo will be wholly ineffective as I have DISABLED Command Keys in my Vial firmwares. THAT is why LShft+RShft+B does not work on them.

The poor ATmega chip just doesn't have enough space to fit all of the QMK and Vial features desired, so something had to give. The fact is that most people using QMK or a derivative on their Xwhatsit-controller-based boards were only using that bootloader feature from Command Keys, though, and since there are many many other ways to get to the bootloader, this sacrifice didn't strike me as a particularly big deal (and still doesn't).

One such method for entering the bootloader is to define a particular key on a particular layer to have the key code of 'RESET' (raw hex 0x5C00). Pressing that key will kick your controller over to the bootloader. Vast majority of default layouts that Ellipse came up with program the 'R' key on Layer 2 to 'RESET', and access to Layer 2 is also set to Layer 1's Spacebar on the vast majority of Ellipse layouts, too. So, "Fn" (to access Layer 1 from Layer 0) + Spacebar (to access Layer 2 from Layer 1) + R will trigger bootloader mode. You can change this by just programming whatever key on whatever layer you want to be the 'RESET' key. Simple as that. (By the way, this holds true whether you are using VIA, Vial, or even base-line QMK firmwares that you are compiling yourself or obtaining via pandrew's instance of the web QMK Configurator. Also, most keyboards that shipped with basic QMK instead of Vial have this key defined in addition to having Command Keys enabled, so both LShft+RShft+B and Fn+Space+R work on those keyboards running that firmware. Given that Fn+Space+R works universally across all, it seems most logical to me to have that combo documented for people to use, and not the LS+RS+B combo. Anyway...)
Kugelkopf wrote:
30 Jun 2022, 22:57
A minor annoyance for the really unexperienced is the lack of a "clear" button in Vial to get rid of overhastily made key assignments.
As you noted, KC_NO (0x0) is the way to blank a key to have no action. This is identical to using the blank key under the Basic tab. There is also KC_TRNS (0x1), identical to the upside-down triangle key right next to it on the Basic tab. This key code is what you use if you want a key press on a higher layer to "fall through" to whatever the layer below it has programmed as the action for that key. If you set a key to KC_TRNS on the lowest layer (0), then pressing it does nothing, so it is effectively equal to KC_NO on layer 0.
Muirium wrote:
10 Oct 2023, 11:47
I can’t answer the pins issue as my hardware is original IBM with Xwhatsit controller.
Original Xwhatsit and wcass "shrunk" Xwhatsit are nearly identical electrically...it's the same design functionally, just with a reduced physical footprint. I quickly Googled for images of the original Xwhatsit PCB, and it too has a set of pads on it labeled "PROG", also located on the back. It serves exactly the same function.
billm wrote:
10 Oct 2023, 01:46
I've tried shorting the PROG pads about 10 times. NOTHING. I've tries l shift + r shift + b about 50 times. NOTHING.
I too have found the PROG-shorting trick to be somewhat finicky. I suspect it is just tricky to make solid contact to both pins with one hand at the same time that one is fumbling around with attempting to plug the USB cable back in with the other. I only have so many limbs and fingers, people! I will once again lament how these were left as unpopulated pads on the production boards, rather than populated with a button, or a switch, or -- heck -- just give me a couple of freaking pins, for Pete's sake. But alas, it is what it is.

I realize that you mentioned elsewhere that you finally got this working. As you noted in your reply to the other thread, the best strategy is probably just to leave QMK Toolbox open and running, and watch its console while you are attempting to get the controller into bootloader mode, since it will immediately tell you when it detects an MCU that's in bootloader mode.

Assuming, though, that you have a functioning keyboard with working firmware already, there are far, far easier ways to get into bootloader mode. As I noted earlier in this reply, on keyboards where LShft+RShft+B doesn't seem to be working, Fn+Space+R likely will (assuming you haven't changed anything about the default layout). However, assuming you were actually running the original QMK firmware that shipped with the keyboard, and not VIA or Vial or something else entirely, LS+RS+B really should have worked...which makes me think that you actually WEREN'T running base-line QMK. Is it possible that you got this keyboard second-hand? In which case, you really have no idea what was done to it firmware-wise before it became yours...

If this keyboard was from the very earliest batches shipped out, they would have been preloaded with xwhatsit's original IBM USB Capsense firmware. If you run the Xwhatsit config utility on your computer with the keyboard plugged in, it will have a menu option that allows you to kick the keyboard into bootloader mode.

If you're already running Vial firmware, Vial itself knows how to kick the keyboard into bootloader mode, too: go to Security menu > click Reboot to bootloader.

If this keyboard is running either the original QMK firmware or my Vial firmware, you can use the pandrew QMK capsense util to enter bootloader mode. The latest version of this (at the time of writing) for both Windows and Mac that supports all known firmwares across all keyboard models released to-date is attached to my post about my Release 4 firmwares. The "Enter Bootloader" button is very prominently displayed on the main window.

In fact, the pandrew util can ALSO kick controllers flashed with the original Xwhatsit firmware into bootloader mode, too! So it is (nearly) one-stop shopping! I'd just keep a copy of the most recent version on hand at all times, as using it is absolutely the easiest way to do this across most firmwares for this controller (again, assuming your controller works and isn't running corrupt or broken firmware, in which case you'd have no choice but to crack the keyboard open anyway in order to access the PROG pads).

The only (non-broken) scenario that I'm aware of where the pandrew util can't help you is if you are running one of the old builds of VIA firmware that either darkcruix or Ellipse released. It doesn't know how to talk to those & won't detect them. Assuming the keyboard works, though, you can just launch the VIA app, configure a given key to be the 'RESET' (0x5C00) code, and then press that key. (Or look to see if possibly R on Layer 2 is already configured to be that, in which case Fn+Space+R probably already works anyway.)

Re: Flash New Model F with VIAL firmware

Posted: 06 Nov 2023, 22:52
by jho1670
What's the easiest way to tell if I have newfssk or newfssk_r2?

Re: Flash New Model F with VIAL firmware

Posted: 08 Nov 2023, 04:36
by jho1670
... and what do the _r2, _ns suffixes mean on the .hex files?

Re: Flash New Model F with VIAL firmware

Posted: 02 Oct 2024, 11:02
by NathanA
jho1670 wrote:
06 Nov 2023, 22:52
What's the easiest way to tell if I have newfssk or newfssk_r2?
jho1670 wrote:
08 Nov 2023, 04:36
... and what do the _r2, _ns suffixes mean on the .hex files?
"R2" means "revision 2", "release 2", or "round 2" ...take your pick. (I tend to think "rev 2" or "revision 2" makes the most sense.)

It means the second revision or release of that model of keyboard. In the case of the B104 or BSSK, it means you ordered a round 2 keyboard with the larger/classic-style chassis, instead of the original round of "new Beamspring" boards. Likewise, for F104 and FSSK, it means you ordered the newer classic-style case version of the keyboard, instead of the "ultra compact" style version.

The new keyboard models with the classic cases don't just have the same "guts" as the originally-released "ultra compact"-cased models. The board electronics have been reworked enough between the releases that the firmware for the original keyboard model is not compatible with the later revision, and vice-versa.

The "_ns" firmware is a second variant of the firmware for the "ultra compact" F104. A few select "ultra compact" F104 keyboards managed to ship with the Scroll Lock and Caps Lock LEDs wiring flipped internally. If you flash your rev1 F104 with firmware and discover that pressing Caps Lock causes the "Scroll Lock" LED to illuminate, then re-flash with the "_ns" version instead to fix that. (I think "ns" stands for "non-shrink" if I remember correctly. I'm not entirely sure I remember where that term came from and am not in a position to look it up at the moment.)

Finally, in order to make sure that readers of this thread know where to go, here's the link to the latest version of the firmware files.