Chat freely about anything...

User avatar
By damage31
#43399 I'm struggling here.
For whatever reason(s), I'm not having any success with my attempts at trying to use OTA. I've read through tons of the various posts, etc. I could find looking for what I'm missing, but for whatever reason, I'm never seeing the network port show up.

Here's where I'm at currently:
Windows 7 Home Premium SP1 w/Norton 360 Security Suite
Adafruit Huzzah board
Arduino 1.6.5 IDE
Python 2.7 installed
Boards Manager esp8266 2.1.0 installed. (Also tried using 1.6.5-947, and 2.0.0)
Using the BasicOTA sketch to keep it as simple as possible.
I select the huzzah from Tools/Board. I've also tried generic esp8266 module option, but didnt see any difference
I've temporarily opened up all ports through my PC firewall to ip address 192.168.2.2 - which is the esp8266

Now - riddle me this:

I keep seeing mention about python, but how is it used? Does the IDE automatically use it? Or is there something I need to manually do? I've never worked with python before, so other than installing it, I've got no clue what else I need to do with it.

After I upload my sketch, I see via serial monitor (with the USB hooked up) that the huzzah gets an IP address.

When I build with the IDE, this is what the very last couple of lines look like, and from what I've seen on another post, I'm not seeing python, I see esptool.exe instead? Does this point to some incorrect configuration on my end?

C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\tools\esptool\0.4.8/esptool.exe -eo C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/bootloaders/eboot/eboot.elf -bo C:\Users\Dan\AppData\Local\Temp\build6015921208496576786.tmp/BasicOTA.cpp.bin -bm qio -bf 40 -bz 4M -bs .text -bp 4096 -ec -eo C:\Users\Dan\AppData\Local\Temp\build6015921208496576786.tmp/BasicOTA.cpp.elf -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec
User avatar
By damage31
#43400 One more thing, in case it helps... I switched the board to be "nodemcu 1.0", switched "Upload Using" to OTA, and tried to upload. Here is the output: (I guess this is where python gets used... so that parts answered I suppose)

python.exe C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py -i COM6 -p 8266 -f C:\Users\Dan\AppData\Local\Temp\build2887128271096886714.tmp/BasicOTA.cpp.bin
Traceback (most recent call last):
File "C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py", line 318, in <module>
sys.exit(main(sys.argv))
File "C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py", line 313, in main
return serve(options.esp_ip, options.host_ip, options.esp_port, options.host_port, options.auth, options.image, command)
File "C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py", line 95, in serve
sent = sock2.sendto(message.encode(), remote_address)
socket.gaierror: [Errno 11004] getaddrinfo failed


Now, I see that com is showing as COM6, and I suppose this is simply because something isnt quite right where the network port shows up...
My exp8266 serial monitor shows:
Booting
Ready
IP address: 192.168.2.2
User avatar
By damage31
#43401 So other than not being able to use the IDE - I've just now been able to upload my first OTA sketch, but was forced to use the cmd line.
Thoughts on why Arduino IDE wont show me the network connection, would be greatly appreciated.

Ready
IP address: 192.168.2.2
Start
Progress: 0%
Progress: 1%
Progress: 1%
... more listed
Progress: 100%
End

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
@cp:0
ld
Booting
Ready
IP address: 192.168.2.2
User avatar
By krzychb
#43419 Hi damage31,

Congratulations on finding a workaround to upload your first OTA sketch :D

In your first post I see you are using Arduino 1.6.5 IDE. If this is the case then this is also the problem. You will not be able to see the network port with BasicOTA.ino sketch and 1.6.5 IDE. Please check out this doc for required s/w versions.

Regarding python, it is used to run the espota.py script to do the OTA upload. In your previous post it is attempting to do so but fails miserably since it has been provided COM6 that you selected from menu.
Code: Select allpython.exe C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py -i COM6 -p 8266 -f C:\Users\Dan\AppData\Local\Temp\build2887128271096886714.tmp/BasicOTA.cpp.bin

Instead, if you were able to selecti a network port, it would look as follows:
Code: Select allpython.exe C:\Users\Dan\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py -i 192.168.2.2 -p 8266 -f C:\Users\Dan\AppData\Local\Temp\build2887128271096886714.tmp/BasicOTA.cpp.bin

Upgrade IDE to 1.6.7 or 1.6.8, Arduino core to 2.0.0 or 2.1.0, try again and post your results.

Good luck – you got so far that now you cannot fail.


Krzysztof