At 9:57 AM -0800 12/16/99, Schettino, John wrote:
>I'm attempting to use the IrSetDeviceInfo() call to set the device info for
>an IRDA app... What's the correct format for the XID string?
>
>This isn't it:     IrSetDeviceInfo (ir_ref, (BytePtr) "Palm eSquirt", 12);

By convention, the first one or two bytes are hints with all but the last hint byte 
having the high bit (IR_HINT_EXT) set. The remainder of the XID is up to you.

The exchange manager uses IR_HINT_PDA | IR_HINT_EXT for the first byte, IR_HINT_OBEX 
for the second, and the HotSync username for the remainder. In BeamBooks, we  don't 
set IR_HINT_OBEX and we include the creator ID of our app rather than the HotSync 
username so that the other side can confirm it's talking to a peer (see below). We 
also include the local LSAP selector, which is something you'll probably want to do.

When you get a discover confirmation, you can go through the XIDs of the discovered 
devices to pick who you want to connect with, if anyone. We look for an XID just like 
the one we'd generate, ignoring the LSAP selector. This ensures we're talking to 
another device running our app (possibly on some other kind of hardware). If we find a 
device that has the same XID as we do (ignoring the LSAP selector), we grab the LSAP 
selector and store it in the rLsap field of the IrConnect structure.

AFAIK there is no central registry for XIDs.
-
Danny Epstein, Applied Thought Corporation
Have friends with Palm organizers? Get BeamBooks!
http://www.appliedthought.com/beambooks

Reply via email to