python esptool.py -b 57600 -p /dev/cu.usbport write_flash 0x000000 "nodemcu.bin"
However, both ways give me the same output:
A fatal error occurred: Failed to connect to ESP8266: Invalid head of packet ('\x08')
I have tried sending AT commands to the ESP01 like "AT" or "AT+GMR" and everything works fine, performed several code variations (mainly timing and baud rate) and to connect the GPIO0 to a pushbutton to ground but I still cannot upload any sketch because of that error.