I have an atreus that used to work fine. Then several months ago I tried flashing the firmware using chrysalis and now I get no input when I type on it. At the time I read something about problems when you hold the esc key too long while flashing and thought that may be the issue, but I had no luck making that work at the time. Since a new version of Chrysalis came out in October I decided to try again.
I’m on OS X 12.6, intel silicon, with the latest release of Chrysalis and Kaleidoscope.
Right after I plug it in or press the reset button, if I open the system report I can see the Atreus Bootloader USB device attached, but that always disappears after about 30 seconds. Chrysalis, Arduino IDE, and ardunio-cli can all pick it up in that first 30 seconds also.
0. Assumptions about bootloader mode
First, to clarify an assumption I made, I’ve seen posts and Chrysalis refer to holding esc while flashing, holding esc while plugging in, and pressing the reset button all relating to entering bootloader mode. I think these are all roughly the same thing:
- When I plug it in it boots up, and holding esc tells it to load the bootloader only.
- When I hold esc as I tell Chrysalis to flash, it is programmatically rebooted and then loads the bootloader.
- When I press the reset button, it is manually rebooted and since I pushed that button it knows to load the bootloader (I think, or maybe this one is part of my device’s broken behavior).
Notably, whether I hold esc or not, every time I plug it in I see the bootloader appear in the system report. I’m not sure if that’s the expected behavior or not. If any of this is incorrect, please let me know.
1. Flashing with Chrysalis
I can only connect the keyboard to Chrysalis in that 30 sec bootloader window, so I do that and race through the menus to flash with the latest firmware and do a factory reset, but this always fails. I get an “Error flashing the firmware” popup. Here’s the “report a problem” bundle.
{
"timestamp": "2022-12-22T00:16:44.061Z",
"uuid": "fc954ffa-cc48-48ce-a72b-6d9a1df0e1f5",
"chrysalis": {"version": "0.12.0"},
"os": {"platform": "darwin", "distro": "macOS", "release": "12.6", "codename": "macOS Monterey", "kernel": "21.6.0", "arch": "x64", "hostname": "Tims-MacBook-Pro-2.local", "fqdn": "Tims-MacBook-Pro-2.local", "codepage": "UTF-8", "logofile": "darwin", "serial": "06A10466-36D7-3A0B-9EE7-A9053A8991A3", "build": "21G115", "servicepack": "", "uefi": true},
"usb": [{"id": null, "bus": null, "deviceId": null, "name": "AppleUSBXHCI Root Hub Simulation", "type": "Hub", "removable": false, "vendor": "Apple Inc.", "manufacturer": "Apple Inc.", "maxPower": null, "serialNumber": null}, {"id": 2, "bus": null, "deviceId": null, "name": "Bluetooth USB Host Controller", "type": "Controller", "removable": false, "vendor": "Broadcom Corp.", "manufacturer": "Broadcom Corp.", "maxPower": null, "serialNumber": null}, {"id": 17, "bus": null, "deviceId": null, "name": "USB Receiver", "type": "Storage", "removable": true, "vendor": "Logitech", "manufacturer": "Logitech", "maxPower": null, "serialNumber": null}, {"id": 23, "bus": null, "deviceId": null, "name": "Atreus Bootloader", "type": "Storage", "removable": true, "vendor": "Keyboardio ", "manufacturer": "Keyboardio ", "maxPower": null, "serialNumber": "atreus"}],
"logs": [
{"args": ["/keyboard-select"], "level": "debug", "message": "navigating to location", "timestamp": "2022-12-22T00:03:37.121Z"},
{"function": "find", "label": "focus", "level": "debug", "message": "serial port list obtained", "portList": [{"path": "/dev/tty.Bluetooth-Incoming-Port"}], "timestamp": "2022-12-22T00:16:01.230Z"},
{"function": "find", "label": "focus", "level": "warn", "message": "no supported devices found", "timestamp": "2022-12-22T00:16:01.234Z"},
{"function": "find", "label": "focus", "level": "debug", "message": "serial port list obtained", "portList": [{"path": "/dev/tty.Bluetooth-Incoming-Port"}, {"locationId": "14100000", "manufacturer": "Keyboardio ", "path": "/dev/tty.usbmodematreus1", "productId": "2302", "serialNumber": "atreus", "vendorId": "1209"}], "timestamp": "2022-12-22T00:16:05.404Z"},
{"devices": [{"focusDeviceDescriptor": {"bootloader": true, "info": {"displayName": "Keyboardio Atreus", "product": "Atreus", "urls": [{"name": "Homepage", "url": "https://shop.keyboard.io/products/keyboardio-atreus"}, {"name": "Forum", "url": "https://community.keyboard.io/"}, {"name": "Chat", "url": "https://keyboard.io/discord-invite"}], "vendor": "Keyboardio"}, "keyboard": {"columns": 12, "rows": 4}, "usb": {"bootloader": {"productId": 8962, "protocol": "avr109", "vendorId": 4617}, "productId": 8963, "vendorId": 4617}}, "locationId": "14100000", "manufacturer": "Keyboardio ", "path": "/dev/tty.usbmodematreus1", "productId": "2302", "serialNumber": "atreus", "vendorId": "1209"}], "function": "find", "label": "focus", "level": "debug", "message": "supported devices found", "timestamp": "2022-12-22T00:16:05.420Z"},
{"level": "info", "message": "Connecting to port", "path": "/dev/tty.usbmodematreus1", "timestamp": "2022-12-22T00:16:06.853Z"},
{"args": ["/focus-not-detected"], "level": "debug", "message": "navigating to location", "timestamp": "2022-12-22T00:16:07.076Z"},
{"args": ["/firmware-update"], "level": "debug", "message": "navigating to location", "timestamp": "2022-12-22T00:16:08.481Z"},
{"level": "info", "message": "Starting to flash", "timestamp": "2022-12-22T00:16:14.723Z"},
{"label": "flash", "level": "info", "message": "executing step", "step": "flash", "timestamp": "2022-12-22T00:16:14.737Z"},
{"error": {}, "label": "flash", "level": "error", "message": "Error during flash", "timestamp": "2022-12-22T00:16:19.279Z"},
{"error": {}, "level": "error", "message": "Error while uploading firmware", "timestamp": "2022-12-22T00:16:19.279Z"},
{"label": "toast", "level": "debug", "message": "Toast message received", "msg": {"message": "Error flashing the firmware", "variant": "error"}, "timestamp": "2022-12-22T00:16:19.300Z"},
{"args": ["/keyboard-select"], "level": "debug", "message": "navigating to location", "timestamp": "2022-12-22T00:16:19.318Z"},
{"level": "info", "message": "Disconnecting from keyboard", "path": "/dev/tty.usbmodematreus1", "timestamp": "2022-12-22T00:16:19.319Z"},
{"args": ["./"], "level": "debug", "message": "navigating to location", "timestamp": "2022-12-22T00:16:19.319Z"},
{"args": ["/keyboard-select"], "level": "debug", "message": "navigating to location", "timestamp": "2022-12-22T00:16:19.324Z"},
{"function": "find", "label": "focus", "level": "debug", "message": "serial port list obtained", "portList": [{"path": "/dev/tty.Bluetooth-Incoming-Port"}, {"locationId": "14100000", "manufacturer": "Keyboardio ", "path": "/dev/tty.usbmodematreus1", "productId": "2302", "serialNumber": "atreus", "vendorId": "1209"}], "timestamp": "2022-12-22T00:16:19.344Z"},
{"devices": [{"focusDeviceDescriptor": {"bootloader": true, "info": {"displayName": "Keyboardio Atreus", "product": "Atreus", "urls": [{"name": "Homepage", "url": "https://shop.keyboard.io/products/keyboardio-atreus"}, {"name": "Forum", "url": "https://community.keyboard.io/"}, {"name": "Chat", "url": "https://keyboard.io/discord-invite"}], "vendor": "Keyboardio"}, "keyboard": {"columns": 12, "rows": 4}, "usb": {"bootloader": {"productId": 8962, "protocol": "avr109", "vendorId": 4617}, "productId": 8963, "vendorId": 4617}}, "locationId": "14100000", "manufacturer": "Keyboardio ", "path": "/dev/tty.usbmodematreus1", "productId": "2302", "serialNumber": "atreus", "vendorId": "1209"}], "function": "find", "label": "focus", "level": "debug", "message": "supported devices found", "timestamp": "2022-12-22T00:16:19.344Z"}
]
}
Additionally, the electron console reports this error:
Error: Firmware on the device does not match local data
2. Flashing with Kaleidescope’s Makefile / ardunio-cli
I followed the instructions in the readme here GitHub - keyboardio/Kaleidoscope: Firmware for the Keyboardio Model 01 and other keyboards with AVR or ARM MCUs.
When I try VERBOSE=1 make flash
it looks like it compiles just fine but I saw this in the output that looked suspect:
Bootloader file specified but missing: /Users/tsaylor/projects/Kaleidoscope/.arduino/user/hardware/keyboardio/avr/bootloaders/Atreus2/Caterina.hex
And the upload step gave me this error:
To update your keyboard's firmware, hold down the key in the lower left corner of your Atreus.
When you're ready to proceed, press 'Enter'.
ARDUINO_DIRECTORIES_USER=/Users/tsaylor/projects/Kaleidoscope/.arduino/user ARDUINO_DIRECTORIES_DATA=/Users/tsaylor/projects/Kaleidoscope/.arduino/data /Users/tsaylor/projects/Kaleidoscope/bin/arduino-cli upload --fqbn keyboardio:avr:keyboardio_atreus \
\
--input-dir "/var/folders/db/s5945whx13zgfcxtrjqyhr400000gn/T//kaleidoscope-tsaylor/output/2693763974-Atreus.ino" \
--verbose
Error during Upload: Failed uploading: no upload port provided
make: *** [flash] Error 1
I noticed that second line of the command with just a \
on it and guessed that it was supposed to include the --port
argument, so I reset the keyboard and ran that command individually with the --port
option and got this output that looked successful, but no change in the keyboard’s behavior.
$ ARDUINO_DIRECTORIES_USER=/Users/tsaylor/projects/Kaleidoscope/.arduino/user ARDUINO_DIRECTORIES_DATA=/Users/tsaylor/projects/Kaleidoscope/.arduino/data /Users/tsaylor/projects/Kaleidoscope/bin/arduino-cli upload --fqbn keyboardio:avr:keyboardio_atreus \
--port "/dev/tty.usbmodematreus1" \
--input-dir "/var/folders/db/s5945whx13zgfcxtrjqyhr400000gn/T//kaleidoscope-tsaylor/output/2693763974-Atreus.ino" \
--verbose
Performing 1200-bps touch reset on serial port /dev/tty.usbmodematreus1
Waiting for upload port...
No upload port found, using address:"/dev/tty.usbmodematreus1" protocol:"serial" as fallback
"/Users/tsaylor/projects/Kaleidoscope/.arduino/data/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/tsaylor/projects/Kaleidoscope/.arduino/data/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega32u4 -cavr109 -P/dev/tty.usbmodematreus1 -b57600 -D "-Uflash:w:/var/folders/db/s5945whx13zgfcxtrjqyhr400000gn/T//kaleidoscope-tsaylor/output/2693763974-Atreus.ino/Atreus.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/tsaylor/projects/Kaleidoscope/.arduino/data/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/Users/tsaylor/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/tty.usbmodematreus1
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "/var/folders/db/s5945whx13zgfcxtrjqyhr400000gn/T//kaleidoscope-tsaylor/output/2693763974-Atreus.ino/Atreus.ino.hex"
avrdude: writing flash (28646 bytes):
Writing | ################################################## | 100% 2.20s
avrdude: 28646 bytes of flash written
avrdude done. Thank you.
3. Flashing with Arduino IDE
I followed the instructions here Setting up your development environment — Kaleidoscope documentation
This method was basically the same as Kaleidescope, but using the IDE. When I reset the keyboard I could see it in the “port” menu, so I selected it and uploaded the firmware. I got very similar looking output (though the port is different), but still no change in keyboard behavior.
Sketch uses 26022 bytes (90%) of program storage space. Maximum is 28672 bytes.
Global variables use 983 bytes (38%) of dynamic memory, leaving 1577 bytes for local variables. Maximum is 2560 bytes.
Performing 1200-bps touch reset on serial port /dev/cu.usbmodematreus1
Waiting for upload port...
No upload port found, using address:"/dev/cu.usbmodematreus1" label:"/dev/cu.usbmodematreus1" protocol:"serial" protocol_label:"Serial Port (USB)" properties:{key:"pid" value:"0x2302"} properties:{key:"serialNumber" value:"atreus"} properties:{key:"vid" value:"0x1209"} as fallback
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/tsaylor/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
"/Users/tsaylor/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/tsaylor/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega32u4 -cavr109 -P/dev/cu.usbmodematreus1 -b57600 -D "-Uflash:w:/private/var/folders/db/s5945whx13zgfcxtrjqyhr400000gn/T/arduino-sketch-C81EF0A9FB51A90FA3EFFA0B985C098E/Atreus.ino.hex:i"
User configuration file is "/Users/tsaylor/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodematreus1
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "/private/var/folders/db/s5945whx13zgfcxtrjqyhr400000gn/T/arduino-sketch-C81EF0A9FB51A90FA3EFFA0B985C098E/Atreus.ino.hex"
avrdude: writing flash (26022 bytes):
Writing | ################################################## | 100% 2.06s
avrdude: 26022 bytes of flash written
avrdude done. Thank you.
Any advice on how to get this device working again would be greatly appreciated!