BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 09-05-2008, 09:10 AM   #1 (permalink)
New Member
 
Join Date: Sep 2008
Model: 8320
PIN: N/A
Carrier: a
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening HTTP Connection

Please Login to Remove!

Hi all,

Im having trouble opening an HTTP connection on a real device.
The code does work on the simulator...

I've tried both ";deviceside=true" and ";deviceside=false".
Im using Wi-Fi so I guess I dont need APN (I dont even have a SIM card on that device).

I have 2 different exceptions,
when using deviceside=false - the exception I get is "java.io.IOException: Invalid url parameter."
when using the deviceside=true - I get "java.io.IOException: Tunnel failed", which is the same exception I get without adding the deviceside parameter at all.

Here is the code if it helps...:

Code:
    	InputStream x = null;
    	String bla = null;
    	String mybla = null;
    	String connectionString = "http dots //www dot google dot com/;deviceside=true";
    	
    	System.out.println("Enteting Program");
    	
    	try {
    		System.out.println("Connection String is: " + connectionString);
			x = Connector.openInputStream(connectionString);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			System.out.println("Failed Opening Stream for GOOGLE");
			bla = e.toString();
			mybla = e.getMessage();
			
			System.out.println("bla: " + bla + " my bla: " + mybla);
		}
		
		connectionString = "http dots //www dot google dot com/;deviceside=false";
		
		try {
    		System.out.println("Connection String is: " + connectionString);
			x = Connector.openInputStream(connectionString);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			System.out.println("Failed Opening Stream for GOOGLE");
			bla = e.toString();
			mybla = e.getMessage();
			
			System.out.println("bla: " + bla + " my bla: " + mybla);
		}
(sorry about the dot and dots in the code, it wouldnt let me post it otherwise)

Any help would be very much appriciated since Im really stuck...
I gave this application every security allow possible... (I think...).

BTW, Im using BlackBerry 8320 Curve (with OS version 4.5.0)

Thanks!
Offline  
Old 09-08-2008, 12:22 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

try adding
Quote:
;interface=wifi
to the url
Offline  
Old 09-08-2008, 12:22 PM   #3 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you might try adding ;ConnectionTimeout=100000 or whatever you want for the time. Dunno if that has an actual effect on your issue, but it might work.
Offline  
Old 09-12-2008, 06:55 AM   #4 (permalink)
New Member
 
Join Date: Sep 2008
Model: 8320
PIN: N/A
Carrier: a
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, I tried the interface=wifi, and yet i'm getting this at the debug strings:

"
APN: 'blackberry.net'
APN username: 'null'
APN password: 'null'
"

maybe I dont fully understand how the blackberry device works, isn't there a way to get a CLEAN wifi connection ? no apn, bes, mds, or any other of those things?
Im connected to the wifi at my house which has a fully working internet connection, and all I want is to use IM+ Skype software and stuff like that through this wifi connection without any proxies...

any ideas?

Thanks!
Offline  
Old 09-12-2008, 08:32 AM   #5 (permalink)
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question

which device are you using? I mean model...
Offline  
Old 09-12-2008, 10:41 AM   #6 (permalink)
New Member
 
Join Date: Sep 2008
Model: 8320
PIN: N/A
Carrier: a
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

8320
Offline  
Old 09-14-2008, 12:32 PM   #7 (permalink)
Thumbs Must Hurt
 
nyte3k's Avatar
 
Join Date: May 2008
Model: 8320
PIN: N/A
Carrier: Tmobile
Posts: 62
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mamoos1 View Post
8320
who is your carrier?
Offline  
Old 09-20-2008, 06:29 AM   #8 (permalink)
New Member
 
Join Date: Sep 2008
Model: 8320
PIN: N/A
Carrier: a
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Orange Israel,
but I bought the device in the USA (if it matters)
Offline  
Old 11-04-2008, 06:39 PM   #9 (permalink)
New Member
 
Join Date: Nov 2008
Model: 880
PIN: N/A
Carrier: at&t
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Red face Deviceside true or false

I found this out the hard way and it took alot of time to do so but I have
a method where I pass a 0 or 1 to represent ;deviceside=true or false.
I can tell you that when using the Simulator you must set that value to
0 (Likely False) but before you load your application with the desktop manager into the blackberry, you must set it to 1 and sign your Jars as well.
Sign the Jars after you re-compile with the value 1 or in other words
;deviceside=true (I'm pretty sure this is for inside the blackberry).
What happens if you don't is that you will get a Timeout on your connection
be that in the simulator or in the blackberry.
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.