• 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
OBEXSession functionality Problems!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OBEXSession functionality Problems!


  • Subject: OBEXSession functionality Problems!
  • From: "Arun Kumar" <email@hidden>
  • Date: Tue, 4 Dec 2007 17:42:24 +0530

Hi All,

I have to send the file from Mac system to device using FTP for that i am trying to connect the session by using OBEXSessionConnect function. 


The problem is now if i try to use OBEXSessionHasOpenOBEXConnection after connect function(which return kOBEXSuccess), it returns false(that means session has no open connection)


And if i try to disconnect the session after connect by using OBEXSessionDisconnect, it return error.


As I continue my RnD on OBEXSession functionality, I came to know if i give some wrong information like header ref. to OBEXSessionConnect function, it still return kOBEXSuccess.


Please help me, i can't undersatnd why it is happening. 


Here is code that I use:  


uint8_t targetUUID[] = { 0xF9, 0xEC, 0x7B , 0xC4, 0x95, 0x3C, 0x11,

0xD2, 0x98, 0x4E, 0x52, 0x54, 0x00, 0xDC, 0x9E, 0x09 };


OBEXAddTargetHeader( targetUUID, sizeof( targetUUID ), dictionary );

getHeadersDataRef = OBEXHeadersToBytes( dictionary );


error = OBEXSessionConnect( obexSessionRef,kOBEXConnectFlagNone, // connect flags

256, // max packet size

(void*) CFDataGetBytePtr( aGetHeadersDataRef ), // headers

CFDataGetLength( aGetHeadersDataRef ), // header size

handleSessionEvent, // callback

NULL ); // refcon


Boolean isConnected = FALSE;

error = OBEXSessionHasOpenOBEXConnection( obexSessionRef,&isConnected );

if(error)

printf("Error in OBEXSessionHasOpenOBEXConnection\n" ); 


if( isConnected)

printf("There is Connection between Computer & device\n" );

else

printf("Computer is not connected with device\n" );



error = OBEXSessionDisconnect( obexSessionRef,

(void*) CFDataGetBytePtr( aGetHeadersDataRef ), // headers

CFDataGetLength( aGetHeadersDataRef ), // header size

ConnectedCallback, // callback

NULL ); // refcon


if(error)

printf("Error in OBEXSessionDisconnect\n" ); 





Thanks in advance,
Arun Kumar.
 _______________________________________________
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: OBEXSession functionality Problems!
      • From: mat davidson <email@hidden>
    • Re: OBEXSession functionality Problems!
      • From: mat davidson <email@hidden>
  • Prev by Date: SCO and HFP
  • Next by Date: Re: OBEXSession functionality Problems!
  • Previous by thread: SCO and HFP
  • Next by thread: Re: OBEXSession functionality Problems!
  • Index(es):
    • Date
    • Thread