-->
Page 1 of 1

Receiving UDP packets

PostPosted: Sun Oct 26, 2014 2:42 pm
by trev
Hi, I did write this once but I can not see it on the list. It might turn up twice, sorry.

Anyway, I am trying to set up a UDP connection to send and receive packets. I used the following :

AT+CIPSTART=1,"UDP","192.168.0.255","2000"

From my pc I used wireshark to monitor network traffic. I could send data out of the esp8266 using AT+CIPSEND

But when I send packets out from the PC I do not receive anything from the esp8266. Is there some special magic?

I have seen TCP exampples but nothing for UDP. Anyone got any suggestions/help?

Thanks

Trev

Re: Receiving UDP packets

PostPosted: Thu Mar 05, 2015 7:39 am
by Felix_B
Hi ! I have exactly the same probem.
No data appears on the ESP8266.

There are tutorials out there, followed them exactly step by step, but no +IPD

Re: Receiving UDP packets

PostPosted: Fri Mar 06, 2015 2:27 pm
by Demolitron
This may be a crappy response since the solution seems to point to fixing the AT command set....

I think it may have something to do with Broadcast and Multicast reception. I couldn't get it to work with Multicast when trying to do uPnP and mDNS stuff. But, at this point I can receive packets. However, I still can't send them. Definitely a work in progress.

The key is using SDK v0.9.5 which has functions to join and leave IGMP groups... The biggest problem is that there are no AT command to access these SDK functions. So, I starter over and rolled my own interface which is an escaped message based binary streaming protocol. REALLY unstable at the moment...

Here is a reference to the functions: (I got them from the 0.9.5 SDK documentation released by expressif)
Sin8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
Sin8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip)

Re: Receiving UDP packets

PostPosted: Sun Mar 15, 2015 12:45 pm
by Adam Gontarek
AT+CIPSERVER=1,2000

ESP starts listening on port 2000, for both protocols TCP and UDP