UDP message broadcast from android phone to arduino mega - how?

My android phone has an ip address of while my arduino has an ip address of

I am broadcasting from my android app to

However my arduino mega is not receiving it.

However if I broadcast a udp message from another arduino mega on then my receiving arduino receives the message OK.

Has anyone had success interfacing and android phone app to an arduino via udp?

If so how did you get it to work.

Does my failure have anything to do with the fact that the android phone and arduino are on different sub-domains (I think they are called from memory)?

My android phone has an ip address of

That is NOT the IP address of the phone on any network. That is the IP address of any device that is not connected to a network. You can’t broadcast to a network if you are not connected to a network.


Don't suppose you have used Android Studio yourself have you?

It seems that, from Lollipop onward, your app has to connect separately to the wifi network.

Just getting a 'pointer' to the Android WifiManager is not enough.