Go Down

Topic: Arduino uno programming over OTA with ESP8266 (Read 8567 times) previous topic - next topic

Itsch

thanks, i try it. with the old esp the sketch works and i have a wifi connection but ota upload don´t work i have the dfu libary and change to GPIO 0

Juraj

#121
May 29, 2019, 08:20 pm Last Edit: May 29, 2019, 08:21 pm by Juraj
thanks, i try it. with the old esp the sketch works and i have a wifi connection but ota upload don´t work i have the dfu libary and change to GPIO 0
great
give me a copy of messages of the upload. not of "Serial Monitor not working on network port"

Itsch

Arduino: 1.8.9 (Windows 10), Board: "Arduino Uno WiFi"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kaisc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kaisc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kaisc\Documents\Arduino\libraries -fqbn=arduino:avr:unowifi -ide-version=10809 -build-path C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066 -warnings=none -build-cache C:\Users\kaisc\AppData\Local\Temp\arduino_cache_752382 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.avr-gcc.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -verbose C:\Users\kaisc\Documents\Arduino\forum\forum.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kaisc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kaisc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kaisc\Documents\Arduino\libraries -fqbn=arduino:avr:unowifi -ide-version=10809 -build-path C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066 -warnings=none -build-cache C:\Users\kaisc\AppData\Local\Temp\arduino_cache_752382 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.avr-gcc.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -verbose C:\Users\kaisc\Documents\Arduino\forum\forum.ino
Using board 'unowifi' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp" -o nul
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\kaisc\\Documents\\Arduino\\libraries\\arduino-library-wifilink-master\\src" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp" -o nul
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\kaisc\\Documents\\Arduino\\libraries\\arduino-library-wifilink-master\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SoftwareSerial\\src" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp" -o nul
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\WiFiClient.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\WiFiLink.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\WiFiServer.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\WiFiUdp.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\utility\comm.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\utility\server_drv.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\utility\spi\spi_drv.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\utility\uart\serial.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\utility\uart\uart_drv.cpp
Using cached library dependencies for file: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master\src\utility\wifi_drv.cpp

Itsch

Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src\SoftwareSerial.cpp
Generating function prototypes...
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\kaisc\\Documents\\Arduino\\libraries\\arduino-library-wifilink-master\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SoftwareSerial\\src" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp" -o "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch wird kompiliert...
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200 "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\kaisc\\Documents\\Arduino\\libraries\\arduino-library-wifilink-master\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\SoftwareSerial\\src" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp" -o "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp.o"
Compiling libraries...
Compiling library "arduino-library-wifilink-master"
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\WiFiServer.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\WiFiClient.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\WiFiUdp.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\WiFiLink.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\utility\comm.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\utility\server_drv.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\utility\wifi_drv.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\utility\spi\spi_drv.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\utility\uart\serial.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\arduino-library-wifilink-master\utility\uart\uart_drv.cpp.o
Compiling library "SoftwareSerial"
Zuvor kompilierte Datei wird verwendet: C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066\libraries\SoftwareSerial\SoftwareSerial.cpp.o
Compiling core...
Using precompiled core: C:\Users\kaisc\AppData\Local\Temp\arduino_cache_752382\core\core_arduino_avr_unowifi_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/forum.ino.elf" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\sketch\\forum.ino.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\WiFiClient.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\WiFiLink.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\WiFiServer.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\WiFiUdp.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\utility\\comm.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\utility\\server_drv.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\utility\\spi\\spi_drv.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\utility\\uart\\serial.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\utility\\uart\\uart_drv.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\arduino-library-wifilink-master\\utility\\wifi_drv.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066\\libraries\\SoftwareSerial\\SoftwareSerial.cpp.o" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/..\\arduino_cache_752382\\core\\core_arduino_avr_unowifi_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066" -lm
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/forum.ino.elf" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/forum.ino.eep"
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/forum.ino.elf" "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/forum.ino.hex"
Bibliothek arduino-library-wifilink-master in Version 1.1.0 im Ordner: C:\Users\kaisc\Documents\Arduino\libraries\arduino-library-wifilink-master  wird verwendet
Bibliothek SoftwareSerial in Version 1.0 im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial  wird verwendet
"C:\\Users\\kaisc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\5.4.0-atmel3.6.1-arduino2/bin/avr-size" -A "C:\\Users\\kaisc\\AppData\\Local\\Temp\\arduino_build_505066/forum.ino.elf"
Der Sketch verwendet 8554 Bytes (26%) des Programmspeicherplatzes. Das Maximum sind 32256 Bytes.
Globale Variablen verwenden 642 Bytes (31%) des dynamischen Speichers, 1406 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.
C:\Users\kaisc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1/bin/arduinoOTA -address 192.168.2.113 -port 80 -sketch C:\Users\kaisc\AppData\Local\Temp\arduino_build_505066/forum.ino.hex -upload /pgm/upload -sync /pgm/sync -reset /log/reset -sync_exp 204:SYNC
Resetting the board
Failed to reset the board, upload failed
Beim Hochladen des Sketches ist ein Fehler aufgetreten

Itsch

I try the new esp with the esp8266 boards package version 2.4.2.
and the web Panel works :)

but with OTA Upload is the same problem like the old-esp one: "Failed to reset the board, upload failed":/


Juraj

I try the new esp with the esp8266 boards package version 2.4.2.
and the web Panel works :)

but with OTA Upload is the same problem like the old-esp one: "Failed to reset the board, upload failed":/


do you use the dfu library from this link?
https://github.com/jandrassy/arduino-firmware-wifilink/wiki/lib/dfu.zip


Juraj

try to OTA upload the firmware to test the network

Itsch


Juraj

to the esp? or what do you mean ?
yes. the firmware can be ota uploaded. the spiffs too

Itsch

so now work the upload to the nodemcu. but how i connect the nodemcu to the arduino as a shield i dont find informations for this ?

Juraj

so now work the upload to the nodemcu. but how i connect the nodemcu to the arduino as a shield i dont find informations for this ?
so the firmware OTA upload works?

can you post a photo of the wiring?

Itsch

Yes
Nodemcu-Arduino


RX-6
TX-7
GND-GND
Vin-3V
EN-3V
D0-Reset

Juraj

#133
Jun 18, 2019, 10:13 am Last Edit: Jun 18, 2019, 10:13 am by Juraj
Yes
Nodemcu-Arduino


RX-6
TX-7
GND-GND
Vin-3V
EN-3V
D0-Reset

what did you set in esp8266-serial-arduinouno-hacked.cpp? 16?

D0 is io 16.
D3 is io 0
D1 is io 5

https://electronics.stackexchange.com/questions/402066/esp8266-free-gpios-for-relay-switching/404845#404845

Itsch

Ok thanks, the other connections are right ? 

Go Up