• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OBEXFileTransferServices delegate method trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OBEXFileTransferServices delegate method trouble


  • Subject: Re: OBEXFileTransferServices delegate method trouble
  • From: "Daniel Klevebring" <email@hidden>
  • Date: Thu, 3 Jan 2008 13:24:40 +0100

That's a very good question, and with your code for setting the channel right, my code now works like a charm on my friends SonyEricsson W880i (using channel 255) but still gives an error on my Nokia 6288 (using channel 10).

Any ideas on why? Both phones support obex file transfer, and i can browse my nokia using 'Browse device' in the bluetooth menu.

Best
Daniel

On Jan 3, 2008 10:27 AM, Ralf Menssen < email@hidden> wrote:
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

  • Follow-Ups:
    • Re: OBEXFileTransferServices delegate method trouble
      • From: "Daniel Klevebring" <email@hidden>
References: 
 >Re: OBEXFileTransferServices delegate method trouble (From: "Daniel Klevebring" <email@hidden>)
 >Re: OBEXFileTransferServices delegate method trouble (From: Ralf Menssen <email@hidden>)

  • Prev by Date: Re: OBEXFileTransferServices delegate method trouble
  • Next by Date: Re: OBEXFileTransferServices delegate method trouble
  • Previous by thread: Re: OBEXFileTransferServices delegate method trouble
  • Next by thread: Re: OBEXFileTransferServices delegate method trouble
  • Index(es):
    • Date
    • Thread