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– Andre Courchesne2016年12月29日 02:10:56 +00:00Commented Dec 29, 2016 at 2:10
-
IDE is running on Windows.wewa– wewa2016年12月29日 07:01:12 +00:00Commented Dec 29, 2016 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– Gerben2016年12月29日 13:19:08 +00:00Commented Dec 29, 2016 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– uint128_t2016年12月29日 17:53:11 +00:00Commented Dec 29, 2016 at 17:53
-
Thanks for your suggestions. The OTA option looks interesting.wewa– wewa2017年01月04日 06:30:08 +00:00Commented Jan 4, 2017 at 6:30
2 Answers 2
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– wewa2017年01月04日 06:31:58 +00:00Commented Jan 4, 2017 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– Andre Courchesne2017年01月08日 00:42:09 +00:00Commented Jan 8, 2017 at 0:42
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
andcom2tcp
on the Windows machine andsocat
on the Raspberry. - Then add a virtual COM-pair (
COM0 <-> COM25
) on the Windows machine with the help ofcom0com
. - Execute following command on the Raspberry.
socat file:/dev/ttyAMA0,raw,echo=0,b115200 tcp-l:3016,fork&
(adjust the device/dev/ttyAMA0
, baudrateb115200
and port3016
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
Explore related questions
See similar questions with these tags.