Hi there,
I was working with UDP library to send messages to "255.255.255.255" to let all the devices on my local network receive my message.
That worked until I found that this is not the correct way to do that. It works under some pre defined conditions, mostly in home lans that everyone is on WiFi only for example, there is a lot of exceptions.
I was looking for an explanation and I found what is the right way to do that, however I don't know how to get that information with B4A.
The fact is that there is always 1 IP andress on the local sub-net reserved for Brodcast, for example:
192.168.0.1 - my ip for example
255.255.255.0 - my mask (needed to calculate this)
192.168.0.255 - Broadcast IP
Anything send to the specific Broadcast IP on this network will be listen by all devices and routed by any access point or router (of course depends on the topology) with no need to configure it.
It is not the case on sending to all 255 IP network. Many routers do not even consider it.
What I have found so far is that each platform has a way to access this information. It is part of the basic lan management. Somehow Android has this information. How to get it PLEASE?
More Info: http://stackoverflow.com/questions/2993874/android-broadcast-address
Many thanks,
Eduardo
I was working with UDP library to send messages to "255.255.255.255" to let all the devices on my local network receive my message.
That worked until I found that this is not the correct way to do that. It works under some pre defined conditions, mostly in home lans that everyone is on WiFi only for example, there is a lot of exceptions.
I was looking for an explanation and I found what is the right way to do that, however I don't know how to get that information with B4A.
The fact is that there is always 1 IP andress on the local sub-net reserved for Brodcast, for example:
192.168.0.1 - my ip for example
255.255.255.0 - my mask (needed to calculate this)
192.168.0.255 - Broadcast IP
Anything send to the specific Broadcast IP on this network will be listen by all devices and routed by any access point or router (of course depends on the topology) with no need to configure it.
It is not the case on sending to all 255 IP network. Many routers do not even consider it.
What I have found so far is that each platform has a way to access this information. It is part of the basic lan management. Somehow Android has this information. How to get it PLEASE?
More Info: http://stackoverflow.com/questions/2993874/android-broadcast-address
Many thanks,
Eduardo