Introduction
It is possible to install a debugging firmware on the device’s MCU (Microcontroller) that will enable printing text outputs from the device to a terminal. To do so, follow these steps:
-
Download the updater and the debug firmware and install the Python Loader with pip install ledgerblue
.
-
Exit any instance of Ledger Live or any other program able to communicate with a Ledger device.
-
Plug your Nano S to your computer while keeping the left button pressed. Keep it pressed until the screen displays BOOTLOADER
.
-
Open a terminal and move to the directory containing the files downloaded at step 1.
-
Install the updater (only if you MCU firmware is not already in version 1.11, otherwise just go to step 6):
python3 -m ledgerblue.loadMCU --targetId 0x01000001 --fileName blup_0.11_misc_m1.hex --nocrc
Wait until BOOTLOADER
is displayed again on the device’s screen.
-
Install the debugging firmware:
python3 -m ledgerblue.loadMCU --targetId 0x01000001 --fileName mcu_1.11-printf_over_0.11.hex --reverse --nocrc
If you can notice a small dbg
block at the bottom of the screen, it’s a success !
A Nano S with the debugging firmware
Uninstalling this debugging firmware is also very easy:
- Download the normal firmware.
- Repeat the installation from step 2 to 5.
- Flash the normal firmware with this command:
python3 -m ledgerblue.loadMCU --targetId 0x01000001 --fileName mcu_1.11_over_0.11.hex --reverse --nocrc
The dbg
block should now be gone.