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
robybd
Posts: 216
Registered: ‎09-11-2008
My Device: 9000(Bold)

StreamConnection on O2 germany network

 

Hello,

I'm using BB 9000 which is from T-Mobile and i'm using SIM from O2.

I'm trying to open socket connection from my application to a remote server and i'm getting error message:

net.rim.device.api.io.ConnectionClosedException: Connection closed

The code i'm using is: 

String URL = "socket://" + SERVER + ":" + PORT;

connection = (StreamConnection)Connector.open(URL);

 

I've tried to add to the URL ";deviceside=false" Or ";deviceside=true" but it didn't help.

I think the problem is the combination of the SIM and the Device which are from different carriers but i can't tell for sure. I looked for the AN values for O2 germany and i found the following details:

APN: wap.viaginterkorn.de  
Gateway IP: 195.182.114.52
Port: 9201

 

The problem is that i didn't understand where i should add the GateWay and Port as there's are no such items in the TCP/IP menu.

 

Please advise, thanks  a lot.

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: StreamConnection on O2 Germany network

Don't think you are running a supported configuration (phone from one carrier, SIM from another) however....

 

The first thing you should check is to make sure that you are actually getting data connectivity.  In "Manage Connections" the Mobile Network should be On and green.  Also on the Home screen, in top right hand corner, is the network strength.  next to that is some characters.  I'm not sure but I think you are GSM, so the letters should say GPRS in capitals, or edge.  if not, then you might not have data connectivity.  (BTW.  I presume that you can actually use the phone?).

 

Given you have data connectivity, then you should review the following, if you have not done so already:

 

What Is - Different ways to make an HTTP or socket connection
Article Number: DB-00396

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is... 

 

Network Transports video:

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

 

Now the 'APN information you have looks like WAP information, see the following link for APN information

(with thanks to simon_hain)

http://www.pinstack.com/carrier_settings_apn_gateway.html

 

I would say you have to have an APN that the SIM can get to, which is O2.  In fact I don't think the pinstack list includes O2 Germany, so look here: 

http://www.modmyi.com/wiki/index.php?title=Carrier_APN_Settings&diff=3712&oldid=3669#O2_Germany 

 

So you need to add

APN: surfo2
Username: leave blank
Password: leave blank

 

Alternatively, try the WAP2.0 code from the KB article, where it picks a connectionID from your Service Books. 

 

I'm not saying that this will work, as noted at the start, hardly a supported configuration.

 

Please use plain text.
Developer
robybd
Posts: 216
Registered: ‎09-11-2008
My Device: 9000(Bold)

Re: StreamConnection on O2 germany network

Thanks a lot, i'll try to use the WiFi connectivity and the APN settings you mentioned.

Please use plain text.