Skip to content

Setting Up Solo Hacker

Yasmine Codes edited this page Mar 28, 2023 · 4 revisions

Solo for Hackers Setup

This is the final environment setup that worked for me.

Hardware Setup

  • PC running on Windows
  • Booting Ubuntu from an external SSD
  • Solo Hacker Key with USB-C
  • USB-C to A Adapter

Software Setup

  • ARM Compiler tool chain
  • Solo python tool
  • Rust
  • Additional fixes to outdated libraries

Getting started

  1. Install the ARM Compiler (on linux simply run sudo apt install gcc-arm-none-eabi) and make sure it is installed properly by running arm-none-eabi-gcc. If everything worked the output should look like this:
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.
  1. Install Rust and add the thumbv7em-none-eabihf target by running rustup target add thumbv7em-none-eabihf

  2. Install the solo tool

sudo apt install solo-python
  1. Make sure that the solo hacker key is being recognized when plugged in by running solo ls which should result in something like:
:: Solos
204C3790324B: SoloKeys Solo Hacker 3.1.2
  1. Check if newest solo firmware is installed on the device by running solo key version (should be 4.1.5).

  2. To update to the newest version, run solo key update. After update the solo key should return following description:

:: Solos
204C3790324B: SoloKeys Solo Hacker 4.1.5

Compiling and deploying code to the solo hacker key

  1. Checking out the code
git clone --recurse-submodules https://github.com/solokeys/solo
cd solo
  1. Make sure the requirements are installed
cd solo #move to source folder
pip install -r tools/requirements.txt
  1. Change the firmware in the C-files (in folder targets/stm32l432/src)

  2. Building the code

cd targets/stm32l432
make cbor
make build-hacker
cd ../..
  1. Deploying it to the device
solo1 program aux enter-bootloader
solo1 program bootloader targets/stm32l432/solo.hex

Debugging

Solo has a USB Serial port that it will send debug messages through (from printf). These can be read using a normal serial terminal like picocom or putty. For hacker version set the debug environment variable at end of make command:

make build-hacker DEBUG=1

Then connect to the corresponding serial port via putty (find the /dev/ttyACMx number with ls /dev/tty* command) with baud 115200.

Using debug-2 means Solo won't boot until something starts reading the debug messages. So it will wait to tether to a serial terminal so that no debug messages will be missed. The solo tool can be used for this:

solo monitor <serial-port>

Troubleshooting

  • The Solo Hacker Key with USB-C was not recognized so I had to use an Adapter to plug it in via USB-A.
  • The cli solo1 does not exist as reported in the outdated documentations, so it's now referred to as solo
  • Updating the solo key at first did not work, simply rerunning the command fixed the issue by itself and the key was correctly updated.
  • Due to no updates to the solo clt anymore, running the solo commands return errors. To fix the ImportError: cannot import name "CTAP1" from "fido2.ctap1" that probably hinders this, pin an older fido protocol version to the environment with pip3 install fido2==0.9.3
  • If errors occur when making the firmware, this is likely solved by linking python3 to python (explained here) by running
sudo apt install python-is-python3
alias python=python3

Setting up an External SSD to boot Ubuntu