04-17-2009 10:16 AM
how can i broadcast in a LAN ? i want to send request in LAN , machines will resond to it and i will accept only that responce with satisfies my requirement.
how can i do this?
Thanks in advance
04-20-2009 08:10 AM
ok some more detailed description what i want to do
i want to know IP address of my handset and as am testing code on simulator , i want to know ip address of my blackberry emulator.
then i need need to know other ip addresses in my LAN or the LAN in which the emulator's IP address belongs .
after this i want send a request to all machines in my LAN. for sending request i wil be using upd connection and am done with udp connection thing ..
any one out there? who can guide me to achieve this
am working on JDE 4.7
Thanks in advance
04-20-2009 08:53 AM
then how can i send request to machines in my LAN ..
i need to identify firstly that my intended machine (which am trying to access) is in LAN then broadcast in that LAN
04-20-2009 08:57 AM
Agree with BBDeveloper, since the Storm is NOT a Wi-Fi device.
So when you are running on a real Storm, the closest thing it has to an IP address will actual depend on which connection method you are using. I suggest you review the following for more information.
You need to think carefully about what you are trying to achieve with this requirement. I suspect there is a better way to solicit input from other devices that attempting to broadcast over a wireless connection.
04-24-2009 11:23 AM
Do you mean "Broadcast in WAN?" or do you actually mean LAN?
I am pretty sure that even WiFi enabled BlackBerrys will not accept broadcast packets on the (wireless)LAN.
For example, assuming two devices are on a 192.168.1/24 subnet and one device opens a connection as follows:
and the second device opens a server connection as follows:
Then ZERO packets will be received at the second device. If the first device makes a unicast, then the second device will receive the packet as usual.
04-30-2009 04:43 PM
05-04-2009 01:49 AM
You can broadcast to your local network if you have WIFI by trying to send a message to 255.255.255.255
Give it a try. This will definitely not work with the WAN if you do not have WIFI.
However, across the wan, and locally, you might be able to use the non-variable part of the network address. Lets say youre site has a static IP
address 121.45.x.x, (depending on what class IP address you have), you could just fill the variable part with ones, and it'll be broadcast, so in that
example, just quoted, sending to 188.8.131.52 would send a broadcast signal to the site at 121.45
If you have a dynamic IP address, you could try it from the WAN side of your cable modem (the IP address from the WAN side) and make sure that
you let UDP through on the port that you are going to use. It'll work as long as your IP address doesn't change. If that works, you could then try to
get a DDNS address at one of the many free sites that give you them like no-ip.com
I've been able to access my home computer remotely from another site using DDNS but I've never tried a broadcast transmission.
DDNS is a way to set up a static IP address that goes through another site and it gets forwarded to your PC at home from that site through your WAN.
This way you can do the same thing as GOTOMYPC without paying for it. (I never understood why people were paying for something that's free anyways).
Hope that helps a bit. Again, I don't know what the phone will disallow, only how UDP normally works.....