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
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

You don't have to read the whole file in one go. Just make sure you don't attempt to read more than the length of the file (e.g., read in 4kB chunks, but the read request for the last chunk should not request more than the length of the last chunk). Try this, to see if it works. It's not a good solution, but, if it works, it will at least give us all an idea what the issue is.
New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

Great Smiley Wink On the transfer side there are no improvements. I lowered the buffer size to 2048, not it SEEMS to be working on the simulator, but not on the BB. Could this be a problem of the 8900? Is there anybody from RIM who can look into this?
New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

OK, I´ll try ... (sorry we posted at the same time, I missed your last reply).

New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

No change - at this time the BB stopped at 2% at the first try - simulator is still working and running - about 10 downloads for now.
New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

BTW: the simulator is now working with IIS7 AND my C# app ... no problems at all (for now).

 

Please - there must be a solution for this problem. I can´t be the only person doing (chunked) HTTP transfers on a 8900 over direct wifi....

New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

The connection on the simulator now hangs as well ... so there is no change at all Smiley Sad

New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

[ Edited ]

More results:

 

 

- tried 9000er simulator - no success

- tried to read 7MB at once, no success

 

If nobody can help me out, how can I open a ticket at RIM to get help? This is a very simple application and a simple network transfer which is NOT working as designed.

 

What would also help is a short app for the Blackberry which simply downloads a >10MB file from a webserver - nothing more. I need a direect tcp wifi connection.

 

Thanks in advance.

Malte

Message Edited by maltic on 10-07-2009 08:00 AM
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

[ Edited ]

I stripped the test down to the essentials, and I can confirm that I'm getting this issue on some simulators (including v5.0). I suggest you create a small test app that demonstrates the issue without doing anything extraneous (e.g., read from the InputStream without saving the results anywhere and just count the number of bytes read) and then submit this to RIM's Developer Issue Tracker.

 

P.S. Try this for as a yet another workaround: read the stream byte-by-byte using "int InputStream.read()" -- it's slower and more taxing on the CPU, but, may be, it works.

Message Edited by klyubin on 07-10-2009 01:42 PM
New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

[ Edited ]

Hi,

thanks for testing this.

I´ve written a small app which can be downloaded here: http://files.toad.de/HTTPTester.jad.

Source and project is here: http://files.toad.de/HTTPTester.zip

 

On the simulator it takes a lot of loops until it hangs, one time 51, one time never - well I gave up at 90. Using the Blackberry it took me 3 to 5 loops for the process to be hanging - with and without saving the file.

Perhaps some people can test this, simply put in a (local) URL with some file and put in a local path to save the file. Start the process, wait for the security dialog to be opened (if any) and then count the loops until the app hangs. Sometimes it hangs at 100% sometimes between 0% and 100%.

 

Please test with AND without saving the file, reboot the device after a failed test.  

 

Cheers,
Malte

Message Edited by maltic on 10-07-2009 10:52 AM
New Developer
Posts: 49
Registered: ‎09-25-2009
My Device: Not Specified

Re: TCP connections suck ... any of them

[ Edited ]
Sorry, there was one small bug in the app. For those who downloaded, please download again - sorry for the inconvenience.
Message Edited by maltic on 10-07-2009 11:20 AM