11-11-2009 03:14 PM
I want to develop an application to communicate two blackberry devices over wifi. Both devices are in the same LAN. Starting with the fact that multicast and broadcast are disabled for UDP packages, so what would be the best solution to make them discover each other (without typing any IP).
I don´t want to include an external server to help them find each other, but if it is the only option...what would be a proper protocol to do so? This will be a discover protocol, once they are both visible, they should make a direct connection.
This is very confusing I'm newbie in BB programming; in iphone we have bonjour to solve this problem. Is there anything in blackberry? I believe there must be some game that needs this too.
11-11-2009 11:47 PM
Like you said. You can use bonjour if you know how to implement the protocol in the BB. Or you can design your own protocol. It is actually very simple. Each BB registers itself with a known server. The server keeps track of the IP address and port of each BB device for every other device to find. So the server accepts two commands, register and service look up. Also put a timeout in it just in case if the BB does not re-register, the server removes its IP address from the look up table.
11-11-2009 11:54 PM
Perhaps you should also investigate if you can use BlueTooth to get two devices to discover and talk to each other.
Please do post your insights/thoughts on whatever solution you choose.