-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Automatic programming #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This A and B of connecting electronic equipment regardless of the bus/protocol used. |
As for the 3.3V rail, this really depends on your implementation as it is used to transfer power between the devices having common ground (mandatory for power and signal) and 3.3V rail. |
Ground loops can also be a problem, in general you should have only 1 (one) ground connection point. Since the ESP module connects signal and power grounds together. It should be the one common point. So common cases are
|
I'm not offended, I'm grateful. I'm learning very fast with you all. Now I've a new problem. With the released version I can open Serial Monitor, upload the sketch, etc without unplug RST and DTR from the CP2101, everithing run OK. Recently I install the staging version and I can upload the sketch with no problem, but when I open Serial Monitor ---> RST and GPIO0 are activated (Ground) and while I don't close Serial Monitor both are activated, forcing me to unplug RST and DTR from CP2101. I've RST, CH_PD, GPIO0 and GPIO2 pulled up, GPIO15 pulled down. What can I do? |
It is the same issue as #22. |
its a problem of the arduino IDE from arduino.cc
are not integrated there. i use realterm for testing there you have the full control.
|
Thanks! I'm using CoolTerm now and OK. And I have OTA running very good. I modify the Python script and now try a new connection every 5sec and my ESP-12 try to OTA every restart along 10sec. It's the python script: #!/usr/bin/python
# -*- coding: cp1252 -*-
#
# this script will push an OTA update to the ESP
#
# use it like: python ota_server.py <ESP_IP_address> <sketch.bin>
#
# on the ESP side you need code like this: https://gist.github.com/igrr/43d5c52328e955bb6b09 to handle the update
#
# Need PYTHON 2.7
import socket
import sys
import os
def serve(remoteAddr, filename):
serverIP = '192.168.1.35'
serverPort = 48266
clientPort = 8266
while True:
socket.setdefaulttimeout(5)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
server_address = (serverIP, serverPort)
sock.bind(server_address)
sock.listen(1)
sock2 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
remote_address = (remoteAddr, clientPort)
content_size = os.path.getsize(filename)
message = '%d %d %d\n' % (0, serverPort, content_size)
print >>sys.stderr, 'Esperando para la conexion'
sent = sock2.sendto(message, remote_address)
try:
connection, client_address = sock.accept()
print >>sys.stderr, 'OK'
try:
f = open(filename, "rb")
while True:
chunk = f.read(4096)
if not chunk:
break
print >>sys.stderr, 'Enviando %d' % len(chunk)
connection.sendall(chunk)
print >>sys.stderr, 'Hecho!'
connection.close()
f.close()
finally:
return 1
break
except socket.timeout:
print >>sys.stderr, 'Error'
sock.close()
sock2.close()
finally:
pass
def main(args):
if len(args) > 2 :
return serve(args[1], args[2])
elif len(args) > 1:
print "No ha introducido uno de los argumentos"
print "Introduzca como argumentos la IP del Cliente y la direccion del fichero"
print "Por ejemplo: python ota_server 192.168.1.1 c:\user.bin"
elif len(args) > 0:
print "Introduzca como argumentos la IP del Cliente y la direccion del fichero"
print "Por ejemplo: python ota_server 192.168.1.1 c:\user.bin"
# return serve('','')
if __name__ == '__main__':
sys.exit(main(sys.argv)) |
@JeroenBeemster |
thanks that did the job. |
I think you must add a note to the Readme.md in the "esp to Serial" hardware section for clarify and improve the stability of the module.
**Oblogatory: GND must be connected between ESP8266 and Serial Interface.
** Optional: 3.3V between ESP8266 and Serial Interface
I know it's a silly problem but I was having many problem with it and a simple note can help.
Regards and excuse for my english.
The text was updated successfully, but these errors were encountered: