Re: OBEXFileTransferServices delegate method trouble
Re: OBEXFileTransferServices delegate method trouble
- Subject: Re: OBEXFileTransferServices delegate method trouble
- From: Ralf Menssen <email@hidden>
- Date: Thu, 03 Jan 2008 10:27:48 +0100
- Thread-topic: OBEXFileTransferServices delegate method trouble
Title: Re: OBEXFileTransferServices delegate method trouble
Let ask the question the other way round: Why do you think ‘7’ might be a good value?
You have to retrieve the correct channelID from the SDP. Like this:
BluetoothRFCOMMChannelID getObexFTPChannel (IOBluetoothDevice *inDevice)
{
BluetoothRFCOMMChannelID channelID;
IOBluetoothSDPServiceRecord *dialupServiceRecord;
IOBluetoothSDPUUID *ourUUID = [IOBluetoothSDPUUID uuid16:(UInt16)kBluetoothSDPUUID16ServiceClassOBEXFileTransfer];
dialupServiceRecord = [inDevice getServiceRecordForUUID:(IOBluetoothSDPUUID *)ourUUID];
if (dialupServiceRecord)
{
IOReturn status = [dialupServiceRecord getRFCOMMChannelID:&channelID];
if (status == noErr)
return channelID;
}
return -1;
}
Regards,
Ralf
On 03.01.2008 10:04 Uhr, "Daniel Klevebring" <email@hidden> wrote:
Hi again,
I have now changed my code, and now the delegate function gets called.
Here's my code (relevant parts):
main.m:
...
//set up channel and max packet length = 256
channelID = 7;
...
The problem is however that the fileTransferServicesConnectionComplete prints an error:
'Other error when connecting to FTP service on device, error code -21850'
I wonder if my choice of channel (7) is correct for OBEX file transfer. Can this be what's causing the error?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden