Re: Newbie OBEX Questions
Re: Newbie OBEX Questions
- Subject: Re: Newbie OBEX Questions
- From: Bubba Giles <email@hidden>
- Date: Mon, 27 Sep 2004 09:56:00 -0700
Title: Re: Newbie OBEX Questions
Hi Phil,
> I'm working on writing a simple SyncML client to operate over OBEX
> (via. Bluetooth) based on some of the work on Sync4j. What's really
> confusing me is the way that I connect and signify that I want to sync
> - the documentation is quite sparse about this.
>
> I can select a Bluetooth Device (specifically, a Nokia 7610) and make
> an OBEX connection to it fine, but not in the way that's needed by the
> SyncML specifications.
>
> According to the specs, I need the following header in my CONNECT request -
> Target - The UUID to use for this is SYNCML-SYNC
> And the following fields (here's were it really loses me) -
> OpCode - 0x80
> Packet Length
> OBEX Version Number
> Flags
> Max OBEX Packet Length
All of those fields are automatically supplied for you in the OBEX API, except the target header.
> I can see how to specify the Target header, although I'm not sure I'm
> doing it correctly (don't critique my code too closely, this is just a
> testing app ATM) -
> const char *ustr = [@"SYNCML-SYNC" UTF8String];
> OBEXAddTargetHeader(ustr, strlen(ustr), dictionary);
>
> The whole UUID thing has be quite confused.
In Bluetooth Profiles v1.1 spec (pg 328), the text says:
The example value for the Target header can be ‘IRMC-SYNC’ to indicate the IrMC synchronization service.
I just looked at Jonas Salling’s Mobile Sync application, it looks like that is what he sends as well, to connect to the sync service on the Z600 phone. So try “IRMC-SYNC” and see what you get back. In your connection response packet, you should get back the same target ID you sent, as confirmation of connecting to the service.
> And that the maxPacketLength is specified in the OBEXConnect: parameters.
You do not need to worry about this – it is handled for you.
> But when I send that off, it connects fine, but the
> OBEXConnectCommandResponseData I get back has no header dictionary
> (headerDataLength = 0), and the specs say that I should.
>
> Can anyone point me in the right direction about this, no amount of
> Google searching seems to turn up anything but more specifications.
The spec can be a maze, indeed.
Bubba
email@hidden
_______________________________________________
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