BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 12-23-2009, 03:40 AM   #1 (permalink)
New Member
 
Join Date: Sep 2009
Model: 7100t
PIN: N/A
Carrier: o2
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default 3g connection not working

Please Login to Remove!

I am now testing my app on the actual device (bold 4.6). My application will connect using wifi,

connSuffix=";interface=wifi";

however I am struggling to get it to work using 3g. I assume 3g is a WAP2 connection, so I have tried the following,

connSuffix = ";deviceside=true;ConnectionUID=WAP2";

but this does not work, i.e. no connection gets made. I am doing checks in the following way,

Code:
public static String connType(){

        String connSuffix = "";                 

        if (DeviceInfo.isSimulator()) {
            connSuffix = "";
        } else if ( (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) &&
            RadioInfo.areWAFsSupported(RadioInfo.WAF_WLAN)) {
            connSuffix=";interface=wifi";
        } else {
            String uid = null;
            ServiceBook sb = ServiceBook.getSB();
            ServiceRecord[] records = sb.findRecordsByCid("WPTCP");
            for (int i = 0; i < records.length; i++) {
                if (records[i].isValid() && !records[i].isDisabled()) {
                    if (records[i].getUid() != null &&
                        records[i].getUid().length() != 0) {
                        if ((records[i].getUid().toLowerCase().indexOf("wptcp") != -1) &&
                            (records[i].getUid().toLowerCase().indexOf("wifi") == -1) &&
                            (records[i].getUid().toLowerCase().indexOf("mms") == -1)   ) {
                            uid = records[i].getUid();
                            break;
                        }
                    }
                }
            }
            if (uid != null) {
                // WAP2 Connection
                connSuffix = ";ConnectionUID="+uid;
            } else {
                // error no connection available
                Dialog.alert("no suitable internet connection detected");
                connSuffix = ";deviceside=true;ConnectionUID=WAP2";
            }
        }
        return connSuffix;
     }
I have noticed that when running on the device i get alert of "no suitable internet connection detected" so I am wondering how is it not detecting the other connection types?

I really need to get the application using a wap2 3g connection. Any help with this would be much appreciated!!!
Offline  
Old 12-23-2009, 07:15 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 9000
Carrier: Airtel
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

this article will be helpful for you.
How to programmatically connect to the internet in blackberry
__________________
blog.vimviv.com
Offline  
Old 12-23-2009, 09:43 AM   #3 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Not all carriers support WAP2, or populate the service book with the WAP2 UID.

I think the first thing is to use CoverageInfo to determine if you have BES connectivity - this should be your first choice.

After that, try the WAP2.

If WAP2 fails, you'll need to fall back to WAP1 or direct TCP. Both of these require carrier-specific APN or Gateway information to be encoded in your URL parameters.

Livelink - Redirection

Livelink - Redirection
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

SMAKN USB Programmer CH341A Series Burner Chip 24 EEPROM BIOS LCD Writer 25 S...
$13.3
SMAKN USB Programmer CH341A Series Burner Chip 24 EEPROM BIOS LCD Writer 25 S... picture20Pcs AT24C64 DIP8 24C64 Eeprom 64Kbit 400Khz
$5.82
20Pcs AT24C64 DIP8 24C64 Eeprom 64Kbit 400Khz pictureMicrochip AT25160AN-10SI-2.7 EEPROM SERIAL EEPROM, 16K (2K X 8), SPI, 1M CYCLES
$350.0
Microchip AT25160AN-10SI-2.7 EEPROM SERIAL EEPROM, 16K (2K X 8), SPI, 1M CYCLES pictureAllen-Bradley, SLC 500, 1747-M13, 64K Flash EEPROM Memory
$35.0
Allen-Bradley, SLC 500, 1747-M13, 64K Flash EEPROM Memory pictureNEW LCD Flash BIOS Writer Burner Chip USB Programmer CH341A Series 24 EEPROM
$2.99
NEW LCD Flash BIOS Writer Burner Chip USB Programmer CH341A Series 24 EEPROM picture






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