BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-17-2007, 08:33 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 8800
PIN: N/A
Carrier: vodafone
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default cant connect to a socket server

Please Login to Remove!

Hi whenever my program attempts to connect to a socket server, the program hangs in the server = (SocketConnection) Connector.open(url); it simply times out on a real blackberry device but in the emulator it works fine.

it use to work before but when i recently deleted the phones application data due to a exception in the midlet constructor i am unable to run any of my programs due to my programs needing to connect to some server.

i've checked my apn settings and they are correct and i have the deviceside=true statement on my url. i even tried deviceside=false but still no joy

i can freely browse any website from within the phones web browser so why cant i simply connect to a socket server?

the network provider is vodafone UK and i have set my apn settings to internet = apn access point name and web for both user/password.

can anybody please help?

here is part of my code that connects to a server. this code is on its own seperate thread btw.

Code:
public String url = "socket://24.xxx.xxx.xx:7502;deviceside=true";

public void open()
    {
        
        
        try
        {
            data.append("about to connect to the server");
            server = (SocketConnection) Connector.open(url);
            data.append("succesfuly connnected to the server");
            is = server.openInputStream();
            data.append("open input stream");
            os = server.openOutputStream();
            data.append("open output stream");
        }
        catch(Exception e)
        {
            e.printStackTrace();
            System.out.println(e.toString());
            data.append(e.toString() + "\n\n");
        }
    }
i know it hangs in connector.open because i have posted a form screen to indicate at what stage the code is being executed on
Offline  
Old 12-17-2007, 08:49 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i'm getting exactly the same error on a new 8310 with a httpConnection, it's a vodafone branded but unlocked device from rim running on a t-mobile bis account.

connector.open(someString) is throwing an illegal argument exception

i've no idea why this is happening as the code runs fine on other devices, if you get to the bottom of it please let me know, what device are you seeing this error on? is it a commercial purchase from vodaphone or a test device?

i'm thinking some remnant of an i.t. policy is causing the error on bis devices, or the new os for 8310 has introduced an error when using deviceside=true (which the native apps don't use)
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!

Last edited by jfisher : 12-17-2007 at 08:53 AM.
Offline  
Old 12-17-2007, 09:00 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 8800
PIN: N/A
Carrier: vodafone
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

developing stuff to work on a blackberry is god awful stressful especialy when dealing with network connections. i've tried everything i can think of to get this to work and still no joy. i even tried running an older version of my program that was once working fine when i last used it and that still doesnt bloody work.

i dont think there is nothingw rong with my code as far as i know due to the fact that the same program works on the emulator and on actual real none blackberry devices such has N95's etc
Offline  
Old 12-19-2007, 05:45 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 8800
PIN: N/A
Carrier: vodafone
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

any suggestions guys? i still cant connect to a server using a socket:

update i called vodafone uk and all the settings is correct. i thought it was my code untill i found out that when i used and downloaded a program called MIDP SSH , that program still failed to connect to the server . if the server is down then how come i can conect to the server on my pc's web browser and standard mobile phone devices such has nokia's?

Last edited by jonneymendoza : 12-19-2007 at 11:43 AM.
Offline  
Old 12-21-2007, 09:06 AM   #5 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i'm seeing more and more issues like this on messageboards and have encountered it myself on two devices, one in-house and another today with a client - everything seems to be fine but they hang when opening a connector - the anecdotal evidence is building that something is broken somewhere, (incidentally all the devices have been uk vodafone) - if the issue is know rim are keeping very quiet about it.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!

Last edited by jfisher : 12-21-2007 at 09:29 AM.
Offline  
Old 12-21-2007, 11:06 AM   #6 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 8800
PIN: N/A
Carrier: vodafone
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

yea whatever i do it just doesnt work and now my boss is begining to think i dont do no work or taht im useless but what can you do when its not your fault that the app's are not working?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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