cancel
Showing results for 
Search instead for 
Did you mean: 

listen udp packet problem

emerson
Associate
Posted on December 14, 2015 at 15:24

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.255

    

 UDP

   60   

Sourceport: 44219  Destination port: 4999

 

Data 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 #broadcast
1 REPLY 1
Nickname3786_O
Associate II
Posted on December 15, 2015 at 09:55

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