View Single Post
Old 10-06-2005, 04:02 PM   #2 (permalink)
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
Post Thanks: 0
Thanked 0 Times in 0 Posts

Hi Tim

I have successfully implemented most all of the FTP functions for an app I am working on for a BB 7290. It is possible and there is no show stoppers with the BB api's that affect me.

I see that your are looping your read looking for EOL characters. You should loop until -1. That's probably why your app is stopping; likely it got to the end (-1) but you keep reading looking for a EOL. It would probably timout if you let it wait.

Don't use the .ready(). That one I believe is buggy. You cannot depend on it.

Also, you want to specify your connection to be "deviceside=true". IE...
String url = "socket://" + remoteHost + ":" + controlPort + ";deviceside=true" ;
This will allow the device to work without BES/MDS. Furthermore, you may need to set the APN. This is in the Options, in the TCP section. There is section on this forum (General area) with FAQ. It lists various APN settings.