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
Highlighted
Developer
Posts: 21
Registered: ‎10-09-2008
My Device: Not Specified
Accepted Solution

Use of ;ConnectionUID=

 

Hello,

I have a problem with some devices in our fleet. We have some devices that are not conected to our BES. Our application on these devices is unable to reach a file on a webserver but the can download the application from their Internet browser. In the logs, they had a "Invalid tunnel name" message.

I started to search for information about this error and found a lot of documents like :

- What Is - Different ways to make an HTTP or socket connection

- What Is - Network Diagnostic Tool

- Network Transports


So, I have found that using ";ConnectionUID=<A_UID>" option at the end of the url was maybe the solution if the device is not connected to a BES. So I tried on my device, which is being a BES, the following solutions :

ServiceRecord[] records = ServiceBook.getSB().findRecordsByCid("WPTCP");
for (int i = 0; i < records.length; i++)
{
ServiceRecord record = records[i];
if (record.isValid() && !record.isDisabled() && record.getUid() != null && record.getUid().length() != 0)
{
return record.getUid();
}
}
}
return null;

...

HttpConnection httpConnector = (HttpConnection) Connector.open(url+";ConnectionUID=" + uid);

 

But it doesn't worked. I have an Exception: "IOExcpetion: none Connection Handler does not exist".

 

 

I also tried this:


ServiceRecord[] records = ServiceBook.getSB().findRecordsByCid("BrowserConfig");
for (int i = 0; i < records.length; i++)
{
ServiceRecord record = records[i];
if (record.isValid() && !record.isDisabled() && record.getUid() != null && record.getUid().length() != 0)
{
return record.getUid();
}
}
}
return null;

...

HttpConnection httpConnector = (HttpConnection) Connector.open(url+";ConnectionUID=" + uid);

 

But it alse doesn't worked. I have another error: "Failed to transmit".



So my device works perfectly if I don't specify a ConnectionUID because the device is behind a BES. But I don't understand why I can't use the WAP2 et BrowserConfig Connection UID. Is that because I am behind a BES ? Or maybe I have made some mistakes ? Maybe the first occurence is not the right one ?

I also wonder how to detect that a device is behind a BES or not. I mean not at a precise time (no coverage workaround) but in general in order to switch between different Connection UID.

Thanks.       
     
Sylvain
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Use of ;ConnectionUID=

For the WAP 2.0 connection, are you also specifying deviceside=true?  Note that there can be multiple WPTCP service records.  You should also ensure that the UID of the record also contains the "wap2" string.

 

Third party applications are not able to communicate using BrowserConfig service records.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 144
Registered: ‎12-20-2008
My Device: Not Specified

Re: Use of ;ConnectionUID=

I have also an error trying to access service book but i manage toget all teh conexions available what will be the best approach to connject and which one is available as per my conexion lists

Service Registry

WAP BrowserConfig

UID WAP BrowserConfig

CID BrowserConfig

Useer ID -1

gateway IP: //206.51.26.192:19305;19304/Blackberry.net/GPAK

WAP2 Transport

UID WAP2 trans

CID WPTCP

User Id -1

GATEWAY ip //127.0.0.1:0;0/wap.movistar.ve/GPAK

BLACKBERRY INTERNET SERVICE

UID GPMDSNA01

CID BrowserConfig

User Id -1

Gateway IP //206.51.26.192:19305;19304/BLACKBERRY.NET/GPAK

IPPP forBIS-B

UID GPMDSNA01

CID IPPP

User Id -1

Gateway IP //206.51.26.192:19305;19304/blackberry.net/GPAK

 

 

Can i use some of this to make the conexions ? how

Developer
Posts: 21
Registered: ‎10-09-2008
My Device: Not Specified

Re: Use of ;ConnectionUID=

Thank you Mark,

 

It worked with "deviceside=true" and I also ensured that the UID contains the "wap2" string. It's too bad that these informations were not present on that page : What Is - Different ways to make an HTTP or socket connection

 

And also thank you for the "BrowserConfig" information.

 

Regards,

 

Sylvain

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Use of ;ConnectionUID=

Good point.  I will have this article updated.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Regular Visitor
Posts: 1
Registered: ‎04-15-2010
My Device: All
My Carrier: All

Re: Use of ;ConnectionUID=

The approach described here, in other threads, and in the knowledge base works great as long as there is a WAP 2 service book entry (which seems to be the vast majority of the time).  One of the testers working on this project, however, brought me a device with no WAP 2 service book entry. 

 

I'm trying to assess how common a scenario it is to have a device with no WAP 2 service book entry.

 

What are the mechanisms by which a device could be in the field with no WAP 2 service book entry?

My presumption is that about the only way this could happen is if the user (or BES administrator) explicitly removed it - but neither myself nor the tester working on this removed any service book entries.

 

Another presumption is that the carrier can configure the service book entries, but I don't have any insight into the process.  I'd also like to understand the process better in general.  Can anyone point me at a Knowledge Base article, forum thread, case study, or other source of information regarding the actual process by which the service book entries are configured for a real-world device in the field?

 

Thanks!

 

-Tim

 

 

New Contributor
Posts: 4
Registered: ‎04-20-2010
My Device: -
My Carrier: -

Re: Use of ;ConnectionUID=

This was almost 2 years ago and the article has not yet been updated. It would have saved me a great deal of time had the documentation been accurate.