Skip to main content
scash9
Associate
July 5, 2016
Question

UDP receive issue

  • July 5, 2016
  • 3 replies
  • 1045 views
Posted on July 05, 2016 at 11:06

Hi,

I can't receive the UDP packets sent from SockTest (SERVER) to the Wi Fi module (CLIENT).

I connect the Wi Fi module via TeraTerm, configure it and then sent an ''AT+S.SOCKON=192.168.32.255,4999,u,ind'' to prepare the Wi Fi module to listen for udp packets.

Now, from SockTest, I sent a message to 192.168.32.255 (or the specific IP of theWi Fi module) / port 4999 but I don't receive nothing (I should receive the WIND:55 indication).

I try to test even with the CubeExpansion WIFI1 V2.1.0 - Client_Socket firmware for IAR, the sent function is OK but I can't receive the message from the Server (SockTest ) on the Wi Fi Module.

I only change the protocol from ''t'' of TCP to ''u'' UDP.

If I use the with TCP protocol it work well.

I need to have the UDP packets receive.

The FW is 160129-c5bf5ce

Regard.

Stefano.

    This topic has been closed for replies.

    3 replies

    Gerardo GALLUCCI
    ST Employee
    July 5, 2016
    Posted on July 05, 2016 at 13:52

    SOCKON configures a socket client (connect), SOCKD opens a socket server (listen).

    - Open SockTest (server)

    - Call SOCKON (client) -> since UDP, traffic is not generated, ans, so, ''connection'' is not performed since at least 1 packet sent/received

    - Call SOCKW to send a packet -> now ''connection'' is created

    - Send packets from SockTest to module

    As an alternative, call SOCKD on module, and use SockTest as client

    scash9
    scash9Author
    Associate
    July 5, 2016
    Posted on July 05, 2016 at 15:44

    The problem is I am trying to put the module Wifi to listen the broadcast messages in UDP, no mater who is sending my task is to send and receive broadcast messages in or from UDP. I have tried to make UDP server with Wifi module and tried to communicate with a simple client and it works but if I try to make my wifi module listen to the broadcast messages passing in network then it doesnt receive anything at all.

    Gerardo GALLUCCI
    ST Employee
    July 22, 2016
    Posted on July 22, 2016 at 08:35

    Ciao Stefano,

    can you share your test case? Mainly AT-Commands used.

    Please remember, if you are using socket server, that it's able to manage only one connection at a time. Doesn't matter if unicast or broadcast. In this case, when a connection is established (even if UDP), other incoming packets are discarded.

    Regards

    j