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
New Developer
Posts: 5
Registered: ‎12-16-2008
My Device: Not Specified

UDP support on different software versions

My company's application setup prefers the use of UDP, as it's more optimised on our servers.

 

However, some software versions seem to have problems with it. 4.5 fails with an "invalid digit" exception if the URL includes ";deviceside=true" but gets nowhere if it's missing.

 

Is there a list of specific software versions where I should avoid using UDP? I can roll-over to TCP pretty easily but I'd prefer not to attempt it in scenarios where it can be expected to fail.

 

Cheers,

Kirwan

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

Re: UDP support on different software versions

The deviceside parameter can be used fort socket and HTTP connections, but should not be used for UDP connections (which are always made directly from the BlackBerry handheld).

 

Note that support for UDP connections also varies by carrier.  Some carries don't support or block these types of connections.  In this case the connection can appear to work from the handheld but the data never arrives at the other end.

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
New Developer
Posts: 5
Registered: ‎12-16-2008
My Device: Not Specified

Re: UDP support on different software versions

Thanks Mark.

 

Should I also be able to route UDP traffic via wi-fi, by appending ";interface=wifi"? In 4.5 an exception seems to occur if any routing suffix is added to the URL, something which doesn't happen in other versions.

 

Cheers,

Kirwan

Developer
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: UDP support on different software versions

Same problemo here trying to use wifi with udp.

 

Illegal arg exception: invalid digit

 

Is there any solution?

 

 

New Developer
Posts: 5
Registered: ‎12-16-2008
My Device: Not Specified

Re: UDP support on different software versions

[ Edited ]

I ended up using TCP over wi-fi.

 

I did however notice in the Development Guide that the / after port details is mandatory when connecting over UDP, so if the following is different to what you have, you could try:

 

(DatagramConnection) Connector.open( "udp://host:dest_port[;src_port]/;interface=wifi" );

 

My guess is that until it sees that slash only digits are accepted for the port value(s) and anything else, semi-colon included, will trigger the exception.

 

Would be interested to know if that works for you.

 

Cheers,

Kirwan

Message Edited by klyster on 02-18-2009 09:36 AM
Developer
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: UDP support on different software versions

You da man!

 

The slashy at the end works.

 

It doesn't seem to matter if you append deviceside=true.

 

Thanks.

 

Jon

Developer
Posts: 45
Registered: ‎07-29-2008
My Device: Z10 Red, 8900, PlayBook
My Carrier: E-Plus

Re: UDP support on different software versions

Regarding to Marks Reply in http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=15967 UDP does not work on 4.5 devices prior to 4.5.0.83.

 

I run into the same problem after updating my 8100 which no runs the buggy 4.5.0.69.

Klaus Nahr
Developer
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: UDP support on different software versions

Yes, it's a little inconsistent.

 

If I try to send udp over wifi on 4.2.2 I get an ioexception at the send method.

 

Jon