cancel
Showing results for 
Search instead for 
Did you mean: 

ST67W611M1 UDP client socket blocked (mission_t01)

SlawekN
Associate

Hi,

while integrating the module, we noticed that UDP client connections appear to be explicitly blocked in the driver (w61_at_net.c) for mission_t01 firmware (LwIP offload). The following code only allows TCP and SSL connections:

if ((conn->Protocol != W61_NET_TCP_CONNECTION) && (conn->Protocol != W61_NET_TCP_SSL_CONNECTION)
#if (W61_NET_IPV6_ENABLE == 1)
&& (conn->Protocol != W61_NET_TCPV6_CONNECTION) && (conn->Protocol != W61_NET_TCPV6_SSL_CONNECTION)
#endif /* W61_NET_IPV6_ENABLE */
)
{
NET_LOG_ERROR("Only TCP and SSL protocols are supported for client connections\n");
return W61_STATUS_ERROR;
}

However, according to the official AT command documentation, UDP client connections are supported:
https://applist67.github.io/Web_AT_Documentation_ST67/v2.0.106/index.html#establish-udp-connection

After commenting out this restriction, I was able to establish a UDP client connection successfully, and communication seems to work.

Is there a specific reason why UDP client sockets are blocked at this level?
Are there any known limitations or risks when enabling UDP this way?

Thanks in advance for your clarification.

1 ACCEPTED SOLUTION

Accepted Solutions
Louis AUDOLY
ST Employee

Hello @SlawekN ,

The UDP sockets are available on the middleware. You have to create a new UDP socket and then call the 

W61_Net_SendData_Non_Connected() function as you are working in UDP.
This is enough to have a UDP client connection.
 
This is also possible to do the way you are pointing, but this is a choice of implementation we have done in our code, so you may encounter unexpected behavior doing this way.
We keep the function W61_Net_StartClientConnection() for connected types, TCP (v4/v6) and SSL.
For unconnected connections you can directly use the API function W6X_Net_Sendto() to exchange data once your socket is created
 
Hopping this answer your question.
Regards
Louis
 

View solution in original post

1 REPLY 1
Louis AUDOLY
ST Employee

Hello @SlawekN ,

The UDP sockets are available on the middleware. You have to create a new UDP socket and then call the 

W61_Net_SendData_Non_Connected() function as you are working in UDP.
This is enough to have a UDP client connection.
 
This is also possible to do the way you are pointing, but this is a choice of implementation we have done in our code, so you may encounter unexpected behavior doing this way.
We keep the function W61_Net_StartClientConnection() for connected types, TCP (v4/v6) and SSL.
For unconnected connections you can directly use the API function W6X_Net_Sendto() to exchange data once your socket is created
 
Hopping this answer your question.
Regards
Louis