Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By luc VdV
#39944 I don't know if it is possible to implement the sending and receiving packets with UDP-protocol instead of TCPIP.
With the AT-commands, this can be done very easy.
It creates a complete different way to communicate with the module, not depending on the compatibility of the web-browsers anymore but giving the user the freedom to decide exactly what data to send and/or receive.
Again, just asking....
I am gratefull for your efforts so far, as the interpreter is a handy tool for small projects.
User avatar
By AcmeUK
#39961 Try this http://www.esp8266.com/viewtopic.php?f=29&t=2451

For a simple Python Listener I used this code :-
Code: Select allimport socket
import time

UDP_IP = "IP of your listener"
UDP_PORT = 5005

sock = socket.socket(socket.AF_INET, # Internet
                     socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
    data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
    print "received message:", data
time.sleep(5)