Search code examples
javanetwork-programmingblackberryblackberry-jde

WAP2 not working: Critical Tunnel Failure



I'm developing an app for Blackberry but I'm stuck with something.
I wanna use WAP2 to connect to the world, but I get this error:

Critical tunnel failure

I'm posting the code below:

private String connectionParameters() {
        if(WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
            return ";interface=wifi";
        } else {
            int coverageStatus = CoverageInfo.getCoverageStatus();
            ServiceRecord record = this.getWAP2ServiceRecord();
            if(record != null && (coverageStatus & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT) {
                return ";deviceside=true;ConnectionUID=" + record.getUid();
            } else if((coverageStatus & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS) {
                return ";deviceside=false";
            } else if((coverageStatus & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT) {
                return ";deviceside=true";
            }
        }
        return null;
    }

I really hope it's not Vodafone who's blocking WAP2 :(
Thanks in advance to everyone!


Solution

  • Just got confirmation from Vodafone Albania. WAP is limited to their services, so there's no error in the code above.