12-03-2008 12:45 AM
I am developing an application using BlackBerry JDE ,where, i have to access through Socket Server.
my code is given below..........
SocketConnection sc = (SocketConnection)
is = sc.openInputStream();
os = sc.openOutputStream();
but its unable to make connection,andthroughing Exception as Java.io.IOException - Open tunnel - max timeout.
And when i made ";deviceside=false", then it not throughing this Exception ; but my Socket Server is not listening its request.May be there is something minnor problem with the BlackBerry JDE settings.or anything else which i am missing. Please reply me...............
12-03-2008 04:29 AM
Can you confirm that you are trying to use a Socket Connection to a Server running on "192.168.1.110"?
Are you running this code on the BlackBerry or Simulator? If the simulator, when you use deviceside=false, are you running the MDS Simulator? Is there a Web Service on this address that you can access via the Browser to confirm connectivity?
12-03-2008 04:39 AM
YEs i am testing on Simulator. This Simulator is provided with the BlackBerry JDE 4.3.0. So i am not sure about MDS simulator. And my Socket Server is listening when i run that application by using Net-Beans.
Thanks for Replying..........
12-03-2008 05:12 AM - edited 12-03-2008 05:13 AM
I would suggest that we try running with the MDS because it produces a log of its activity. You will find the MDS in Start-->Programs-->RIM-->BlackBerry JDE 4.3-->MDS - i.e. the same place you use start the JDE. Alternatively you can have the MDS always come up, by doing the following in the JDE: Edit-->Preferences, select Simulator Tab, the check the box that says "Launch MDS with Simulator".
So start the JDE, change your app to ";deviceside=false", start the simulator, and start MDS (if not started automatically). Try your application and note what happens in the MDS log - this is the "DOS Console" that should appear when you start MDS. I'm hoping you will see some activity there and be able to figure out what is going wrong.
You should of course be able to ping your Server IP address from the PC that is running the Simulator - can you confirm that is the case? Also normally 8080 is a Web Server alternate address rather than a socket connector address, are you sure that you Server is listening on 8080.
Let us know how you get on.
12-03-2008 08:39 AM
Thanks for Reply...
I opened the MDS DOS console,but nothing happened in that. And I am getting still the same exception.
Please tell me that is there any APN setting required when making connection through Simulator.
12-03-2008 09:07 AM
When you start the MDS Simulator, it will start a 'Command' window (one of the Black MS-DOS ones) and dump loads of text into it as it is progressing. If you do not see this window, or it appears and disappears, then do you do not have the MDS started. Can you try the MDS Simulator and let us know what you do see. There are Threads in here and articles in the KB that deal with what to do if your MDS doesn't start.
Re APN settings, the answer is none. You just specify ";deviceside=true" and it will work, without MDS, on the simulator, with no specific APN settings.
12-03-2008 11:26 AM
12-03-2008 01:58 PM
When you connect, you should see in the MDS log, a message like the following:
<2008-12-03 18:52:38 GMT>::<MDS_MDS>:<DEBUG>:<LAYER = IPPP, EVENT = EndExec
ting, TAG = -1492178666, DEVICEPIN = 2100000a, VERSION = 16, CONNECTIONID = 121
984391, SEQUENCE = 0, TYPE = CONNECTION-REQUEST, CONNECTIONHANDLER = , PROTOCOL
= TCP, PARAMETERS = [192.168.1.11:8890], SIZE = 74>
The key information is the address, 192.168.1.11:8890, which proves that the application is correctly attempting to connect to the IP Address and port specified (these are parameters that I put in to my processing, you will look for your own address and port). If you see this in the output, then your Blackberry code is working fine, you have a problem elsewhere in your network.
12-04-2008 01:00 AM
Yes I have checked , and I found no such IP CONNECTION PARAMETER.
I am using "deviceside = true", therfore i am trying to connect directly,and not through MDS.
Thanks for reply...
12-04-2008 04:06 AM