clockworkpi

DevTerm Keyboard firmware mods

During the stream yesterday, I made a couple of comments on how the keyboard/trackball could be improved and I made these changes on my own copy of the DevTerm repository:

The changes are:

Fn + Trackball no longer trigger the "slow movement mote" but allow to use the mouse scroll wheel (only up/down for now, need to find how to set for left/right)
Now to set the trackball speed you use Fn + Left button for normal speed
Fn + Middle button for "slow" speed
Fn + Right button is currently an unused third mode that do the same as the normal one.
Cmd now send LEFT META by default (left command or left windows key)
Fn + Cmd send the RIGHT META Key.
Fn + "-" (the key just on the right of the trackball) do send a volume mute key.

Hope it will be useful to someone, I will document how to flash the keyboard firmware a bit later.

A bit of a warning from @guu if you want to hack the keyboard firmware:

and do not use Serial.println , if your code need to print through Serial, use something like dev_term._Serial->println("setup done");
once the Serial.println executed, it will block the bootloader of DT’s keyboard

And the only way to recover then is to flash using an external programer, so be careful people!

9 Likes

Can you elaborate a bit how you updated the keyboard firmware, for reference? Using Arduino IDE?

Updated the readme with some infos on how to build:

8 Likes

I followed the steps, but when I tried to upload, it gives

Searching for DFU device [1EAF:0003]...
dfu-util - (C) 2007-2008 by OpenMoko Inc.
Couldn't find the DFU device: [1EAF:0003]

Did I missed something?

There is a bug in some conditions with the Arduino IDE where the upload will not work, try to run the DFU app by hand from the command line, it should work.

I tried to run dfu-util.exe -l with the DevTerm’s keyboard plugged in, but it didn’t find any DFU device.

In Windows 10, I had to install a separate stm32 DFU driver and then reboot to enable unsigned drivers in order to get the Arduino IDE upload to work!

1 Like

Has Jory said, you probably miss a driver, does windows show an unknown device in the device list?

I installed the driver from here by installing and running C:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin\Driver\Win10\dpinst_amd64.exe, and after that I was able to use dfu-util.exe to upload. However after that, the whole keyboard became unresponsive. Running dfu-util.exe -l now gives the following and I was unable to upload:

Found DFU: [1eaf:0003] ver=0201, devnum=35, cfg=1, intf=0, path="1-2", alt=2, name="UNKNOWN", serial="UNKNOWN"
Found DFU: [1eaf:0003] ver=0201, devnum=35, cfg=1, intf=0, path="1-2", alt=1, name="UNKNOWN", serial="UNKNOWN"
Found DFU: [1eaf:0003] ver=0201, devnum=35, cfg=1, intf=0, path="1-2", alt=0, name="UNKNOWN", serial="UNKNOWN"

In the device manager, it shows as Maple 003 under USB devices:
image

Update: I fix the problem and successfully upload the new firmware. Here is what I did:

  1. Uninstall the device from the device manager. Only the device.
  2. With the device still connected, set the switch 2 (the one closer to R3). That switch is connected to BOOT0 for the STM32 according to the schematic.
  3. Short the S1 (which is connected to RSTN) to reset the device to make it enters DFU Mode. (According to the schematic, there should be some kind of button there?)
  4. Upload the new firmware.

With this board running STM32, would it be possible to flash QMK on it? It would be great to be able to use a non-QWERTY layout.