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
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified

Re: Can't hit an IP address

Hi Peter,

Quick question, My device is 8320 and OS version is 4.2.2.x but SDK version is 4.5.0.

Is this the matter?

 

Thanks,

DK

BlackBerry Development Advisor
Posts: 14,971
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Can't hit an IP address

Yes, that is a problem.  Please see this link for details.

 

What Is - Appropriate version of the BlackBerry JDE
Article Number: DB-00537

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/What_Is...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified

Re: Can't hit an IP address

So then if my device software version is v4.2.2.180 for blackberry 8320, then should I use JDE v4.2 or 4.2.1?

 

Thanks,

DK. 

Developer
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified

Re: Can't hit an IP address

Mark,

 

Now I follow the version as you said.

And I'm getting HTTP 500 error which means internal error.

So I hooked up protocal analyzer in my server to see any request from device.

But I couldn't see any reauest. But I see some network transaction on my device.

 

So I'm guessing that may RIM or T-Mobile is blocking or not by passing my request to my server.

Is there any service or registration need to get through?

 

Device can download applications, and I joined data service.

What else do I need?

 

By the way, There is Default Service in Option-> Advances, what is the Default Service?

 

Thanks,

DK

Developer
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified

Re: Can't hit an IP address

Mark,

 

I solved the problem.

The problem was because of Firewall, we just blocked all port except port 80.

It seems like that carrier network or MDS server is using another port numbers.

 

I don't which number of port we should open.

 

Thanks,

DK.

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can't hit an IP address

I'd like to get the official answer from Mark, butthought I migth contribute something while the US is waking up!.  My understanding and experience is that if you are using an http connection and don't specify a port, then it will use port 80.  Can you give us your complete URL and confirm that you are creating an http connection?

Developer
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified

Re: Can't hit an IP address

Peter,

 

Thank you for your help.

The URL is  

public static String main_url_post = http://65.98.94.68/mobile/myconcierge/controller.php;deviceside=true;

 

I didn't specify the port number here.

So I thought just 80. 

 

I have another problem and I already posted it as new thread.

The problem is that most http reauests fine but one request need 2 about 2 minute to be responsed by server.

But I'm getting 504 error which means upstream server is not responding to client.

I'm thinking the MDS or carrier's gateway is not waiting the response from my server and give http 504 error.

This means connectiontimeout.

Do you know how to handle this problem?

Please help me.

 

Thanks,

DK.

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can't hit an IP address

OK, that looks like a normal http request, as far as I know there is no reason why it should not be coming through Port 80.  I will leave it for Mark, however I believe he is in Canada, not US, and I think it is a public holiday there today.

Developer
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified

Re: Can't hit an IP address

Peter,

 

It looks like that I can not use MDS server to get connection with my server.

Do I need to set up MDS in device? If so how to?

deviceside=false is not working to me and I need to set ConnectionTimeout parameter for my request because one of  my resonse need to take more than 1 minute.

I heard that DirectTCP is not supporting Timeout feature.

 

Please help me on this.

 

Thanks,

DK.

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Can't hit an IP address

You question about MDS does not actually make sense.

 

I suggest you review this again:

What Is - Different ways to make an HTTP or socket connection
DB-00396
http://tinyurl.com/3ynfr5

 

You can not use deviceside=false, because you have a BIS device.  MDS is a Server feature associated with the BES.

 

There are two ways that I am aware of for setting timeout.

i) There is a parameter that you can specify if you have a BES connection.  I think it is ConnectionTimeout, so to use this in a BES environment, your URL would be

http://....;deviceside=false;ConnectionTimeout=200000 

This should set your connection timeout to 200 seconds.  However you can't use this option, you don't have a BES connection.  And I've tried this in non BES environments and it was ignored.  I've only included it in here for completeness.

2) SocketConnectionEnhanced.READ_TIMEOUT

I'm not sure if you can use this, but it is certainly worth a try.  Once you have done your Connector.open(..), you can try to if you can Cast this to a SocketConnectionEnhanced and then set the Timeout

if ( connection instanceOf SocketConnectionEnhanced ) {

((SocketConnectionEnhanced)connection ).setSocketOptionEx(SocketConnectionEnhanced.READ_TIMEOUT, 200000);

}

Sorry I should test this, but don't have time ATM.

 

The default time out is 2 minutes, so perhaps you are OK anyway.