Chat freely about anything...

User avatar
By Solomon Candy
#83875 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!
User avatar
By eriksl
#83878 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.