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

Posts: 42
Registered: ‎06-14-2010
My Device: 8900 Bold, 9300
My Carrier: Vodafone
Accepted Solution

Understand device log: TXch & TXun



I use an FTP connection to send compressed text file.

I have a big problem with file larger than 40K.


Basically the process is:

- generate a String with data;

- compress it using something similar to GZipOutputStream sample;

- connect to FTP server using socket connection

- send it


the code of send is something like this: 



OutputStream output = dataSocket.openOutputStream();
byte[] buffer = new byte[512];
int bytesRead = 0;

while ((bytesRead = inputStream.read(buffer)) != -1) {
	output.write(buffer, 0, bytesRead);
output = null;


All work good with file smaller than 40K, but larger are send corrupted.

I try to open it on FTP server and the error message is unexpected end of file.


Trying it on device, I see that on log event there are some strange warning:


E net.rim.tcp - TXch

E net.rim.tcp - TXun

... repeated several times


Any idea?


To solve it i try to break file into 40K file, but I don't like it so much.


Thank for help!


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

Re: Understand device log: TXch & TXun

There are limits to how much data you can send in a single connection using wireless (non WiFi) connections on a BlackBerry.  These limits depend on a number of factors, including the type of file (for example using a browser you can download large mp3 files).


You will find more information here:



In this case, the device does not know what sort of file you are downloading.  In addition, I've seen comments from people downloading gzipped files that  it seems like these get unzipped in terms of counting bytes (possible, since the MDS probably thinks it can get better compression than gzip).  Your magic figure of 40K has also been mentioned in some posts, have a look here:



Anyway, I tsuspect the short answer is that it is unlikely that you will be able to transfer, in  a single block, using ftp, a large file.  I think you are going to have to chunk it up.


Alternatively, you could look at the more complicated ftp protocol that involves blocking.  That will depend on your ftp Server. 

Posts: 42
Registered: ‎06-14-2010
My Device: 8900 Bold, 9300
My Carrier: Vodafone

Re: Understand device log: TXch & TXun



Finally i chunk the data into <40KB files and all work great.


Thank you for answer, very interesting