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
Contributor
Posts: 30
Registered: ‎03-30-2012
My Device: BlackBerry Bold 9000
My Carrier: airtel

TLS: S222 - Strange sort of TLS error

I have an app which implements an SSL REST client. Seems to work fine on the simulator but on some devices with 3G networks, SSL handshake fails with TLS: S222 error in the logs. 

 

Does anyone know what this could be?

Contributor
Posts: 30
Registered: ‎03-30-2012
My Device: BlackBerry Bold 9000
My Carrier: airtel

Re: TLS: S222 - Strange sort of TLS error

Need help from the experts!!

 

Works pretty as picture over WiFi but on 2G/3G networks on BIS plan, fails with TLS: S222 , this does not seem to be a valid TLS error code as well. 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: TLS: S222 - Strange sort of TLS error

When you say "BIS plan", do you know which gateway you are using - BIS-B, WAP or Carrier TCP?

 

I suspect the request is being thrown out by one of these.

 

Are you attempting a socket or http connection?

Contributor
Posts: 30
Registered: ‎03-30-2012
My Device: BlackBerry Bold 9000
My Carrier: airtel

Re: TLS: S222 - Strange sort of TLS error

Think it's Carrier tcp. We just do an http connection with no particular preference. Is there a way to find out?

 

The url is in the format https://xyz.com:443/services/abc , Curiously it used to work 4-5 weeks ago.

 

	ConnectionFactory factory = new ConnectionFactory();
		
		//Set the connection timeout
		factory.setConnectionTimeout(30000);
		
		String url = req.getUrl() + ";DisableCbcSecurity=true";

		ConnectionDescriptor conDescriptor = factory.getConnection(url);
		HttpConnection request=null;

		if ( conDescriptor != null ) {

			// connection suceeded
			int transportUsed = conDescriptor.getTransportDescriptor().getTransportType();

			Logger.debug("Using transport type:" + transportUsed);

			// using the connection
			request = (req.getConType()==ConnectionType.HTTP)? (HttpConnection) conDescriptor.getConnection()
					: (HttpConnection)conDescriptor.getConnection();
		}
		else
		{
			ServerResponse response = new ServerResponse();
			response.setErrorMessage("Unable to connect to n/w");
			response.setStatusCode(-1);
			return response;
		}

 

Highlighted
Contributor
Posts: 30
Registered: ‎03-30-2012
My Device: BlackBerry Bold 9000
My Carrier: airtel

Re: TLS: S222 - Strange sort of TLS error

I did more investigation, it seems that the device is trying to access on WAP2 when this error is thrown. 

 

On WiFi works just fine.