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
New Developer
Calexah
Posts: 3
Registered: ‎08-30-2009
My Device: Not Specified
Accepted Solution

Wifi connection, direct tcp/ip with internal IP address

Hello all,

 

Hopefully someone has been able to successfully do this before and knows the answer as we have been beating our heads for days on this.  We have read the posting on the wifi connection along with the other threads and tried various implementations without success.

 

We are attempting to open a tcp /ip connection via wifi to an internal ip address; eg. 192.168.1.99.  Inevitably the tunnel connection times out.  We have tried interface=wifi, deviceside settings and a combination of the two of them.  Of course they work from the simulator since the simulator uses whatever IP connection the development machine has but when we try on a device the connection times out.

 

Does anyone know the working correct way to open a connection directly from a device specifically;

1) settings for the actual connector call

2) settings on the phone; eg bold to make sure that it can navigate to the internal network

 

Thanks so much

Please use plain text.
New Developer
Calexah
Posts: 3
Registered: ‎08-30-2009
My Device: Not Specified

Re: Wifi connection, direct tcp/ip with internal IP address

Update: Still not able to get the code to connect to an external or internal ip address when on wifi only.  The device is able to connect via the browser to addresses without an issue on wifi and can ping the servers from the devices on wifi without an issue so it does not appear to be an issue with the device settings.  However that said we are trying to make a socket connection and not an http connection so it could be something on the tcp/ip APN settings but we have verified them for the att/cingular network and they are correct.
Please use plain text.
New Developer
Calexah
Posts: 3
Registered: ‎08-30-2009
My Device: Not Specified

Re: Wifi connection, direct tcp/ip with internal IP address

Resolved - Found the issue.  If you put a semicolon at the end of the parameter list in the url such as:

 

"socket://192.168.1.99:3000;interface=wifi;ConnectionTimeout=15000;"

 

This will not return an error or exception from the simulator or device but will not do what you expect.  It will not use wifi.  The parameter blackberry parser in this ignores all parameters and attempts to open the socket without any parameters and thus fails.

 

This can be especially troublesome if you are programmatically adding the parameters.  There should be an exception thrown such as Invalid Parameter List or the like, but there is not.

Please use plain text.
New Contributor
amirlaribi
Posts: 2
Registered: ‎03-08-2010
My Device: bold 9000
My Carrier: student

Re: Wifi connection, direct tcp/ip with internal IP address

Hello,

im trying to make a wifi connection( HTTP,HTTPS or Socket  doesnt matter what type ! ) to an Access point in my university so that i can get the signal strength from the AP.i have as information the ip adress of the AP,port , login and password

 

can someone tell me how can i specifiy the informations in my connection?!

i have found this example DB-00532.

 

Connector.open
("socket://yourServer:5445;deviceside=true;apn=internet.com;
tunnelauthusername=user165;tunnelauthpassword=user165password")

 

but im not sure if this was meant for connection over wifi .


 

i already watched the videos of  NetworkTransport and read about the different connections types but no one covers how to connect with the ip ,login and password .

 

 

 

 

thx in advance

Please use plain text.
Developer
DAquilina
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: Wifi connection, direct tcp/ip with internal IP address

Amir,

 

Have you seen/read this post?

 

Making HTTP and Socket Connections

 

Peter Covers most network connection issues, tips, and tricks.

 

Hope that helps,

~Dom

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
Please use plain text.