Monday, August 23, 2010

Connections in Blackberry and DeviceSide

There are 5 different ways to connect to internet using Blackberry.They are
1)BES(Blackberry EnterPrise Server) using MDS(Mobile Data System)
2)BIS(Blackberry Internet Services)
3)Direct TCP/IP
4)WIFI Network
5)WAP(Wireless Application Protocol) Gateway


By using BES we can directly pass url as connection parameter without appending any deviceSide.

(HTTPConnection)Connector.open("http://www.blackberry.com");

While connecting to internet using BES the connection pathway is MDS by default except for some devices(6500,7500).In order to explicitly connect using MDS in all append deviceside=false at the end of the URL.

(HTTPConnection)Connector.open("http://www.blackberry.com;deviceside=false");

From Blackberry 3.8 there is a possibility for direct TCP/IP connection without using MDS.
For Blackberry smartphones operating using IDen networks(developed by Motorolla) a direct TCP connection is established if deviceside is not specified.For Blackberry smart phones doesn't operate on IDen networks Connection is established through MDS if deviceside is not specified.If blackberry MDS is not available during time of connection a direct tcp is established.

To override the default behavior of connection append deviceside=true at the end of url.

(StreamConnection)Connector.open("socket://testserver:600;deviceside=true");

In Wifi connections Blackberry smart phone is directly connected to blackberry infrastructure via WIFI.Blackberry Infrastructure exists between blackberry smart phone and BES or BIS.For the connections through WIFI no special logic is required except appending ;interface=wifi to the required url.

(StreamConnection)Connector.open("socket://testserver:600;interface=wifi");

In WAP connections Connection string parameters are hosted by wireless network provider.

References:

http://supportforums.blackberry.com/t5/Java-Development/Different-ways-to-make-an-HTTP-or-socket-connection/ta-p/445879


Complete reference:

http://supportforums.blackberry.com/t5/Java-Development/Connecting-your-BlackBerry-http-and-socket-connections-to-the/td-p/206242

Glance on networks in blackberry:
Some Video tutorials:

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransports

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransportsII

No comments:

Post a Comment