Here is a scenario.
I have two wifi modules, M1 and M1. I created a hotspot on my android phone and the two modules connect to it. Can I send a message from my phone to either of the two wifi modules using their IP address? Is that even possible? if it is what are the steps going about doing this. I'm going to use Java.

Any help is much appreciated