01-28-2009 11:55 AM
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:
Gateway IP: 126.96.36.199
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:
Now the 'APN information you have looks like WAP information, see the following link for APN information
(with thanks to simon_hain)
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:
So you need to add
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.