2015-12-14 06:24 AM
Hi.
I am trying to listen udp broadcast packets from server but no data received.
My st module is station configured and its possible to ping in both direction.
Server Wireshark frame :
IP Source IP Destination Protocol
192.168.33.2 192.168.33.255UDP
60
Sourceport: 44219 Destination port: 4999Data packet: 00544f54485356523132
c0a821020fa1
My question is, how configure the module to listen this packets?
I try this ''
AT+S.SOCKON=192.168.33.255,4999,u'' ,but not work.
Somebody can help me please.
Regard.
Emerson.
#udp #sockets #broadcast2015-12-15 12:55 AM
Hi,
if the module opens a socket without indicator (AT+S.SOCKON=192.168.33.255,4999,u), you have to use the ''at+s.sockq=ID'' command to read the amount of pending data and then ''at+s.sockr=ID,len'' command to read the data.
Alternatively, you can use the ind parameter (AT+S.SOCKON=192.168.33.255,4999,u,ind) in order to automatically receive the indication of the pending byte.
Please refer to the UM for details (http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00100306.pdf - starting from page 16)Regards,Salvatore