0

I currently use Arduino IDE to generate binaries for ESP8266. Afterwards I copy the binaries with SFTP to my Raspberry Pi and flash the binaries using esptool.py.

These are lots of steps I need to do manually. Is it possible to automate this and use the Raspberry Pi as a programmer known to the Arduino IDE?

The goal is, that the "Upload" button in Arduino IDE does the full job.

  • Are you running the Arduino IDE on Windows, Linux or macOS ? – Andre Courchesne Dec 29 '16 at 2:10
  • IDE is running on Windows. – wewa Dec 29 '16 at 7:01
  • You could try using serial over IP ( playground.arduino.cc/Interfacing/SerialNet ). Alternatively add the OTA updating to the ESP so you can do away with the Pi entirely. – Gerben Dec 29 '16 at 13:19
  • You could switch over to an entirely command-line workflow, and then a Makefile would suffice. You will bash/cygwin/some other *nix environment on Windows. – uint128_t Dec 29 '16 at 17:53
  • Thanks for your suggestions. The OTA option looks interesting. – wewa Jan 4 '17 at 6:30
0

Have you tried installing Python for Windows?

http://docs.python-guide.org/en/latest/starting/install/win/

In theory it should work and you should be able to run esptool.py on a Windows command line like you do on your Pi (provided that your usb to serial in recongnized by Windows).

If esptool.py fails to run under Python for Windows I would first suggest to open a ticket with the esptool maintainer and then try under a cygwin environement (https://www.cygwin.com).

  • I think, I forgot to mention, that I don't have a USB UART Interface on my PC. So there is no way to program over UART and without the Raspberry Pi. – wewa Jan 4 '17 at 6:31
  • Get a FTDI adapter. Here is a blog post I wrote a while ago about it : net-forces.blogspot.ca/2016/07/… – Andre Courchesne Jan 8 '17 at 0:42
0

I was able to find a solution based on this post: http://www.linuxquestions.org/questions/linux-networking-3/serial-over-lan-from-linux-to-windows-825334/#post4062960

Following steps are necessary.

  • Install com0com and com2tcp on the Windows machine and socat on the Raspberry.
  • Then add a virtual COM-pair (COM0 <-> COM25) on the Windows machine with the help of com0com.
  • Execute following command on the Raspberry. socat file:/dev/ttyAMA0,raw,echo=0,b115200 tcp-l:3016,fork& (adjust the device /dev/ttyAMA0, baudrate b115200 and port 3016 according your needs)
  • Start com2tcp on the Windows PC with following command. com2tcp --baud 115200 --ignore-dsr \\.\COM25 192.168.0.1 3016
  • Now you can use COM0 in Arduino IDE to flash the ESP8266 attached to /dev/ttyAMA0 on the Raspberry

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.