01-28-2009 11:55 AM
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.
01-28-2009 01:49 PM
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
Network Transports video:
http://www.blackberry.com/DevMediaLibrary/view.do?
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_gatew
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
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.
01-29-2009 02:07 AM
Thanks a lot, i'll try to use the WiFi connectivity and the APN settings you mentioned.