udp multicast STA breaks when AP is enabled

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Geva_2134536
Level 3
Level 3
First like received First like given

Hello,

I have an udp multicast running on the STA interface, this is running without any problems.

However at the moment I enable the AP interface the UDP send function returns an error (code 15) and is unable to send my UDP packet.

I have also tried to disable my mutlicast functionality before I enable the AP en enable it again after the AP is up, but this won't work either.

The UDP multicasst udp packets are still received when enable the AP, only the sending back seems to go wrong.

Could it be that it tries to send the reply back over the AP network instead of the STA network?

I am using LWIP.

Cheers,

Gerard

0 Likes
5 Replies
JoYi_1844281
Level 6
Level 6
100 sign-ins 100 replies posted 50 likes received

Maybe I am wrong!

As I know WICED SDK 3.1.2 did not enable multi-home feature in Network Stack!

So you could not create socket on one interface then send/received on different interface!

0 Likes

I don't want it to work on multiple interfaces.

It is working on the STA interface.

But when I turn on the AP interface in words of wiced_network_up, then I get above problems on STA interface.

It can still receive the UDP packets but not send them anymore.

0 Likes
Anonymous
Not applicable

May be a wild guess...

Is that causing beacause there's an argument to specify what mode are we in while creating UDP socket , may be that's not proper

wiced_udp_create_socket( &udp_socket, PORTNUM, WICED_AP_INTERFACE )

Here the expected mode is AP mode, but here if you're running in STA mode this might can cause the issue

0 Likes
Geva_2134536
Level 3
Level 3
First like received First like given

The UDP socket is already created on the STA interface, but when I turn on the AP interface later on the UDP send is broken on the existing socket.

0 Likes

In the end I figured out that both interfaces were on same subnet. The app interface was on 192.168.1.x/16 and my STA interface was on 192.168.0.x/24.

The ip_route function in lwip looks for the first match of ip address and subnet with the destination address. Reply's were send out on the AP network instead of the STA when the AP was activated.

Ended up putting the AP interface in 172.16.x.x range and then it works without any problems.

0 Likes