esp-link
esp-link copied to clipboard
Program from Arduino IDE
esp-link can be used directly from Arduino IDE if the hardware/arduino/avr/boards.txt file in your Arduino IDE installation is updated with lines like this:
mega.upload.network.endpoint_upload=/pgmmega/upload
mega.upload.network.endpoint_sync=/pgmmega/sync
mega.upload.network.sync_return=204:SYNC
mega.upload.network.endpoint_reset=/log/reset
mega.upload.network.port=80
pro.upload.network.endpoint_upload=/pgm/upload
pro.upload.network.endpoint_sync=/pgm/sync
pro.upload.network.sync_return=204:SYNC
pro.upload.network.endpoint_reset=/log/reset
pro.upload.network.port=80
There are a few problems with this:
- You have to add five lines for every type of arduino you want to program.
- The baud rate have to be set to 115200 for Arduino Mega 2560 or else the upload will fail
Another way to do this is to modify avrflash slightly and add the following line to hardware/arduino/avr/platform.txt in your Arduino IDE installation: tools.avrdude.upload.network_pattern=/path/to/avrflash -p {build.mcu} {serial.port} {build.path}/{build.project_name}.hex
The modified avrflash can update both Arduino Mega 2560 and "normal" Arduinos and it will change the baudrate for Arduino Mega 2560 to 115200 during programming and then change it back. I also modified megaflash to call avrflash to remove much of the code duplication.
I can make a pull request if you want this change.
Hello,
I tried to edit the boards.txt file, but I was unsuccessful, please, could you give me details of how I can do for the Pro Mini 16MHz 5V?
I am using a batch file to send the hex file, it is described here: https://forum.arduino.cc/index.php?topic=561440.msg3828616#msg3828616
The hex file is exported by the IDE in the same sketch folder, so the batch file identifies this file and causes the avrdude to write to the esp-link specified by the hostname.
The Arduino IDE should be able to program your Arduino Mini Pro using esp-link without installing any extra scripts or programs... just add the following lines to the end of your boards.txt file:
pro.upload.network.endpoint_upload=/pgm/upload
pro.upload.network.endpoint_sync=/pgm/sync
pro.upload.network.sync_return=204:SYNC
pro.upload.network.endpoint_reset=/log/reset
pro.upload.network.port=80
or use "Arduino Uno WiFi" since it is using the same AVR cpu as the Arduino Mini Pro and alredy have these lines configured.
Remember to use a recent version of Arduino IDE and to set mDNS sevice name to "arduino" in esp-link... if you do not change the service name it will not show up as a "Network Port" in the Arduino IDE.
If this does not help, please describe in detail how it does not work and include the output from the failed upload.
Hello,
I modified the hostname of my esp-01 (with esp-link firmware) to "arduino" (I can see the positive response when doing: ping arduino) and I selected the Arduino Uno Wifi card, but still the port does not appear.
I already tested the Arduino OTA on an ESP8266, sometimes it takes too long to appear the port. Do you have any way to force a network port search?
The IDE is ver. 1.8.5 (for Windows, zip installer)
Hello,
Has Arduino Uno Wifi been discontinued?
I saw in a post on the internet that it was discontinued.
And I found instructions on how to upgrade the esp chip firmware, based on IDE version 1.7: https://www.arduino.cc/en/Guide/ArduinoUnoWiFiChangeFw
I looked for this folder in IDE 1.8.5, but I did not find this path:
Note: You can find the updated user1.bin file directly into Arduino Software (IDE), here the path: arduino-1.7.x\hardware\arduino\avr\firmwares\esp8266\unowifi\firmware_arduino_esp8266_20xx_xx_xx_file1.bin
Unbelievable, where is IDE 1.7 to be downloaded?
Look at this:
https://www.arduino.cc/en/Main/OldSoftwareReleases#previous
From 1.6.13 Jump to 1.8.0.
After many attempts, it worked.
I put "arduino" in Hostname (Home/System overview) and in Service Name (Services/mDNS)
I do not know how Windows identifies the host name, but if I change the host name sometimes it takes time for the ping command to find, that should be why the IDE does not find the network port soon.
Tested with clean scketch:
Sketch uses 1776 bytes (5%) of program storage space. Maximum is 32256 bytes. Global variables use 184 bytes (8%) of dynamic memory, leaving 1864 bytes for local variables. Maximum is 2048 bytes. Resetting the board Waiting for the upload to start SYNC at 57600 baud: bootloader v1.16 Uploading the sketch Success. 1776 bytes at 57600 baud in 0.4s, 3707B/s 64% efficient Sketch uploaded successfully Resetting the board
I got tired of trying to find Hostname with Windows, and I went to test with Linux, the IDE looks much more responsive, and mDNS seems to be working much better than Windows. But Linux is 32-bit and Windows is 64-bit.
Thank you!
You can use whatever name you want for the hostname (Home/System overview) but the Service Name (Services/mDNS) have to be "arduino" to be visible in the Arduino IDE. If you restart the Arduino IDE the device will show up in a few seconds... ~10 seconds.... if you have the Arduino IDE running and then start your device it can take a very long time before it becomes visible in the Arduino IDE. I hope new versions of the Arduino IDE will be better at this or add a scan button. There is 64-bit versions of the Arduino IDE for Linux.
Hello, i programmed an Wemos D1 with actual esplink and connected an arduino pro mini 3V. mDSN is changed to arduino and detected by the Arduino IDE. The arduino is running with a sketch which is writing to the serial port, which i can see in the esplink mc-console, also reset is fine.
But when i try to upload a sketch with the IDE to the Port "ESPLINK to 192.168.3.41", the IDE is aking for an Upload passoword. Where i can set this pasoword? If i use a blank password, IDE cannot connect to the Board an upload the sketch. I'm also wondering about the output
processing.app.debug.RunnerException: Konnte nicht mit 192.168.3.41 verbinden at cc.arduino.packages.uploaders.SSHUploader.uploadUsingPreferences(SSHUploader.java:143) at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78) at processing.app.SketchController.upload(SketchController.java:713) at processing.app.SketchController.exportApplet(SketchController.java:686) at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168) at java.lang.Thread.run(Thread.java:748) Konnte nicht mit 192.168.3.41 verbinden
What does it mean, SSHUploader?
I changed the board.txt to `pro.name=Arduino Pro or Pro Mini
pro.upload.tool=avrdude pro.upload.protocol=arduino
pro.bootloader.tool=avrdude pro.bootloader.unlock_bits=0x3F pro.bootloader.lock_bits=0x0F
pro.build.board=AVR_PRO pro.build.core=arduino pro.build.variant=eightanaloginputs
pro.upload.network.endpoint_upload=/pgm/upload pro.upload.network.endpoint_sync=/pgm/sync pro.upload.network.sync_return=204:SYNC pro.upload.network.endpoint_reset=/log/reset pro.upload.network.port=80`
Can anyone help me?
Hi, I had no problems using the Arduino Pro Mini with the UNO bootloader (because of the watchdog), but my board is 5V and 16MHZ. (I selected the "Arduino Uno WiFi" board in the IDE) No password was requested.
(no problem, except for the blockage that occurred in data send function, to avoid this I reduced the amount of data that the arduino sends to the esp)
Note: I had more stability when using this system, after configuring the esp with fixed IP address.
I found some hints i have to use IDE <2.6 because with higher releases the network upload is changed. But i also tried the HWVSP Serial Virtual Port, same issue. I can read all outputs from the Arduino, but Upload fails. I will have another go with the avrdude on the commandline.
Hello,
I've the same problem as T0rax above.
I've flashed the esp8266-01 correctly, successfully connect to esp-link AP, switch to STA mode, connect to my wifi network, I see the port with the ip address in the EDI Arduino. Then, when I try to upload my sketch (klynk.ino from the samples) from Arduino EDI, after compilation, a window open ask me a password that I don't know and can't find in the doc. Everything is connected as in this illustration :

@rtek1000 could you tried on recent ide?
EDI version is 1.8.7, I can't see a more recent version on arduino.cc
I have asked @rtek1000 @overisberg as it was working for him before.
I forgot to mention that I modified the file hardware/arduino/avr/boards.txt as indicated by @overisberg
Hello everyone, I am using a version 1.8.5 on windows 7 x64, I had no problems with the password, in linux I also had no problems, the only thing I did was to change the bootloader of my arduino pro mini, and I put the bootloader of the arduino UNO. So in the IDE I selected the Arduino UNO WiFi. I am doing some things here, when it is possible to pause I will try to update the ide, we are already with 1.8.7 on the arduino site.
One interesting thing I noticed, is that the wifi network needs to have a strong signal, if the ping (ping.exe) time is too high, or if it fails, strange things can happen. I had to use a wifi signal repeater.
Hi @rtek1000 , where did you find "the bootloader of the arduino UNO" ?
the bootloader accompanies the arduino ide
https://www.instructables.com/id/Burn-a-New-Bootloader-Arduino-Pro-Mini/
but, instead of selecting arduino pro mini, I select arduino UNO, both have the atmega328 (5V) and run at 16mhz
I had to replace the bootloader because I had problems with the watchdog. <ProMini: Reboot loop when using watchdog> https://github.com/arduino/Arduino/issues/4492
but maybe the serial port speed is different between the pro mini and the Uno, maybe that's why I have not had many problems, because I was already with a board similar to arduino Uno wifi
I will burn the UNO bootloader from the IDE to to eliminate / control this possibility of error
Some news today. I try to burn the bootloader but no change. I tried also with other boards, a Seeduino Mega v1.1 (Atmega 1280) and Arduino Mega 2560 without success.
The famous password window :
The message in the console :

Hello, I have not yet had a chance to test the new IDE, but I suggest you take this issue to the arduino forum, because this IDE should work with arduino wifi (which seems to be discontinued)
Hello, I have tried IDE 1.8.7 with the esp-link, on windows 7 x64, and it looks normal, the only problem is that it does not work right if the serial port is with data traffic, to avoid problems, the port serial of the Arduino must be stopped, without sending or receiving data at the time of programming. It is recommended to use a programming in which the Arduino only sends data through the serial port, when it is requested by some external device. Perhaps adding a large delay at startup helps you avoid this problem if your program has to send data continuously.
