From: Jonathan P. <jp...@dc...> - 2006-02-23 23:16:39
|
On 23 Feb 2006, at 22:35, Davide Varvello wrote: > I know the channel id for ftp on my device is 9, puts > connectResult > displays 0, but puts sendResult shows -21875 (i.e > busy) and of course, > no picture is sent to the device. > Do you understand this behavior? That error number is kOBEXSessionBusyError (see /System/Library/ Frameworks/IOBluetooth.framework/Headers/OBEX.h). I think the problem is that the the OBEX methods are asynchronous - you have to set them going then wait for the callback method on the delegate. See the documentation for [OBEXFileTransferServices setDelegate:]. The reason progress is not made even though you have 'sleep' in your code is that the Cocoa event loop doesn't get a chance to run. Try setting up a delegate object and initiating the session, then kick off the event loop with NSApplication.sharedApplication.run. |