Re: How to have 2 or more UPD services running at the same t
Posted:
Fri Sep 20, 2019 3:14 am
by eriksl
Interesting? I am also using multicast and never had these problems. Also not the beforementioned issue too.
Maybe the TS should post some code.
Is this really an "advanced user" topic?
Re: How to have 2 or more UPD services running at the same t
Posted:
Fri Sep 20, 2019 11:18 pm
by Solomon Candy
I checked out your source and it's a different problem from mine. I had two UDPs, bound to different local ip-addresses, one to the station's and the other to the AP's, listening on the same PORT, and the packets got mixed-up.
You are receiving on two different PORTs so it's a really strange problem for the packets to get mixed up!
Re: How to have 2 or more UPD services running at the same t
Posted:
Sat Sep 21, 2019 3:10 am
by eriksl
Ah ok I see.
I think your problem is inherent to the way it works. LWIP has only one entrance point for incoming ether-style packets from the lower levels (hardware + SDK lib). Once at this point, I don't think LWIP can or does distinguish between two or more destination ip adressess. Another thing that comes to mind is that LWIP can be configured to be very "small", very "big" and everything in-between. The way Espressif configure LWIP by default is somewhere in-between. It may very well be that there is an option for distinguishing between multiple local destination addresses and Espressif turned it off. The next step, imho, would then be to take a look at the LWIP source code, especially the config options, and see if something like this is present. If so, you could consider compiling LWIP yourself (but you can't use "espconnect" after that...).
Another, I think much simpeler, option is to check the received packets for the destination ip address, so to demux in your application.