Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Broadcast in LAN

Hello,

 

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

 

 

Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: Broadcast in LAN

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 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Broadcast in LAN

AFAIK, There is no IP attached to BB devices.

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: Broadcast in LAN

oho

 

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

 

any solution?

Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: Broadcast in LAN

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.

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=29104#M29104

 

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.

Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: Broadcast in LAN

ok final attempt .. i want to achieve "listening to upd broadcast message" .. are you sure that on todays date no blackberry device support this ???
Highlighted
Developer
Posts: 205
Registered: ‎07-14-2008
My Device: 7230, 8700, 8820, 9000

Re: Broadcast in LAN

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:

 

udp://192.168.1.255:1984/;deviceside=true;interface=wifi

 

and the second device opens a server connection as follows:

 

udp://:1984/;deviceside=true;interface=wifi

 

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.

 

Earl

Earl Oliver
BlackBerry Development Advisor
Posts: 15,300
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Broadcast in LAN

That is correct, BlackBerry handhelds do not currently support UDP broadcast messages.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: Broadcast in LAN

Okay.

 

If not broadcasting , is there any way by which i can have list of ip addresses in my LAN? So that i can do unicasting with each IP address.

 

Developer
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: Broadcast in LAN

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 121.45.255.255 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.....

 

Good Luck.

 

-Donald