Skip to content

Commit dd8e67e

Browse files
authored
Improve error message on ESP32 bootloader failure (#235)
***NO_CI***
1 parent f57e074 commit dd8e67e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nanoFirmwareFlasher.Library/EspTool.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@ public Esp32DeviceInfo GetDeviceDetails(
161161
null,
162162
out messages))
163163
{
164+
if(messages.Contains("A fatal error occurred: Failed to connect to Espressif device: No serial data received."))
165+
{
166+
Console.ForegroundColor = ConsoleColor.Red;
167+
168+
Console.WriteLine("");
169+
Console.WriteLine("Can't connect to ESP32 bootloader. Try to put the board in bootloader manually.");
170+
Console.WriteLine("For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html.");
171+
Console.WriteLine("");
172+
173+
Console.ForegroundColor = ConsoleColor.White;
174+
}
175+
164176
throw new EspToolExecutionException(messages);
165177
}
166178

0 commit comments

Comments
 (0)