Sorry to bother you again, but I still can't get to a successful OBEX connection.
Let's see if I well understood the process.
1: I create an OBEXSession with the record of the remote device (which seems to succeed).
2: then I create a target header with "f9ec7bc4-953c-11d2-984e-525400dc9e09", represented this way: Byte target[15] = { (Byte)0xF9,(Byte)0xEC,(Byte)0x7B,(Byte)0xC4, (Byte)0x95,(Byte)0x3C, (Byte)0x11,(Byte)0xD2, (Byte)0x98,(Byte)0x4E, (Byte)0x52, (Byte)0x54, (Byte)0xDC, (Byte)0x9E, (Byte)0x09}; Is that right?
3: then I add a who header with "PC Suite", represented this way: char who[8] = "PC Suite"; Is that right too?
4: at last I call (mGetHeadersDataRef is the headers list just created) mMaxPacketLength = 16390; IOReturn status = [session OBEXConnect:(OBEXFlags)kOBEXConnectFlagNone maxPacketLength:(OBEXMaxPacketLength)mMaxPacketLength optionalHeaders:(void*)CFDataGetBytePtr(mGetHeadersDataRef) optionalHeadersLength:CFDataGetLength(mGetHeadersDataRef) eventSelector:@selector(commandSentCallback:) selectorTarget:self refCon:NULL]; But the even type of OBEXSessionEvent returned in the callback is always kOBEXSessionEventTypeError.
Am I missing something?
Your help will be appreciated.
Thank you, regards, livio. |