pi@Lenovo-Linux:~ $ esptool.py --port /dev/ttyUSB0 erase_flash esptool.py v2.2 Connecting..... Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 0) Uploading stub... Running stub... Stub running... Erasing flash (this may take a while)... Chip erase completed successfully in 4.0s Hard resetting... pi@Lenovo-Linux:~ $ esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20180111-v1.9.3-240-ga275cb0f.bin esptool.py v2.2 Connecting..... Chip is ESP32D0WDQ6 (revision 0) Uploading stub... Running stub... Stub running... Configuring flash size... Auto-detected Flash size: 4MB Compressed 935888 bytes to 587153... Wrote 935888 bytes (587153 compressed) at 0x00001000 in 51.9 seconds (effective 144.4 kbit/s)... Hash of data verified. Leaving... Hard resetting... pi@Lenovo-Linux:~ $ ampy --help Usage: ampy [OPTIONS] COMMAND [ARGS]... ampy - Adafruit MicroPython Tool Ampy is a tool to control MicroPython boards over a serial connection. Using ampy you can manipulate files on the board's internal filesystem and even run scripts. Options: -p, --port PORT Name of serial port for connected board. Can optionally specify with AMPY_PORT environemnt variable. [required] -b, --baud BAUD Baud rate for the serial connection (default 115200). Can optionally specify with AMPY_BAUD environment variable. -d, --delay DELAY Delay in seconds before entering RAW MODE (default 0). Can optionally specify with AMPY_DELAY environment variable. --version Show the version and exit. --help Show this message and exit. Commands: get Retrieve a file from the board. ls List contents of a directory on the board. mkdir Create a directory on the board. put Put a file or folder and its contents on the... reset Perform soft reset/reboot of the board. rm Remove a file from the board. rmdir Forcefully remove a folder and all its... run Run a script and print its output. pi@Lenovo-Linux:~ $ ampy -p /dev/ttyUSB0 ls b'\x02\x02`\x0e\xeer\xec' Traceback (most recent call last): File "/usr/local/bin/ampy", line 11, in sys.exit(cli()) File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/pi/.local/lib/python3.5/site-packages/ampy/cli.py", line 147, in ls for f in board_files.ls(directory): File "/home/pi/.local/lib/python3.5/site-packages/ampy/files.py", line 94, in ls self._pyboard.enter_raw_repl() File "/home/pi/.local/lib/python3.5/site-packages/ampy/pyboard.py", line 192, in enter_raw_repl raise PyboardError('could not enter raw repl') ampy.pyboard.PyboardError: could not enter raw repl