Chat freely about anything...

User avatar
By jonshouse
#4270 Does any version of the firmware for these modules that works as a listening socket.

I find that the module stops listening to the socket at random.


For example the following linux script I use to send data to all station on the wireless LAN

Code: Select all#!/bin/bash
while :
do
        D=`date`
        echo $D
        echo $D |socat -  UDP4-DATAGRAM:255.255.255.255:2081,broadcast
        sleep 1
done



I then set the ESP to socket listen
Code: Select all       AT+CWJAP="bla","blabla"
       AT+CIPMUX=1
       AT+CIPSERVER=1,2081
       AT+CIPSTO=0


Data starts to appear, so far so good. But after a min or two data stops appearing, it will sometimes start to re-appear, sometimes not

Sending UDP data to the module fast sometimes causes the module to reset itself.

I have tried every firmware image I can get my hands on, does anyone have a firmware binary that works for UDP receive ?

Thanks,
Jon
User avatar
By platforma
#4294 i'm actually trying to do exatcly the same at the moment, but I can't get the messages on the ESP even if broadcast messages directly to it via socat or ncat
when you receive the message on the ESP, what does it look like?

using
Code: Select allsocat - tcp:192.168.1.1:1234
works absolutely fine after setting the server
but i can't do
Code: Select allsocat - udp-sendto...


is there any way of explicitly starting a UDP server?
User avatar
By jonshouse
#4298 [quoteis there any way of explicitly starting a UDP server?][/quote]

Best I can tell it listens to UDP and TCP ports at the same time, though sending can be either.
Once AT+CIFSR gives you an IP on your lan issue "AT+CIPMUX=1" then "AT+CIPSERVER=1,UDP_PORT" and see what happens.


So
Code: Select allAT+CIPSERVER=1,80


Will listen on TCP port 80 and UDP port 80 at the same time.

when you receive the message on the ESP, what does it look like?


Code: Select all+IPD,0,28:Mon Dec 8 17:53:41 GMT 2014

OK

+IPD,0,28:Mon Dec 8 17:53:43 GMT 2014

OK

+IPD,0,28:Mon Dec 8 17:53:44 GMT 2014

OK
]



It is not a PSU issue, as I am using a good quality bench PSU current limited at 2Amps.
I think my problem may partly be be local wifi network issues here, I am still not quite sure, I am testing that at the moment. Do other people find the server (socket listen) on the Wifi module stable ?
Last edited by jonshouse on Mon Dec 08, 2014 1:22 pm, edited 1 time in total.