There are actually sort of two 'names'.  The device info which is exchanged
at discovery, and the device name which is stored in the IAS database.

The device info is set with IrSetDeviceInfo(), and the character string
would be something like:

char dev_info[] = { IR_HINT_PDA, 0, 'M', 'y', 'N', 'a', 'm', 'e' };

The two bytes at the beginning are the 'hint' bits and are defined in the
Irda specs.  There can actually be more bytes if the 'extension' bit is set,
so you have to be careful when parsing discovered text.

The name in the IAS database is set with IrIAS_SetDeviceName.  I have only
ever set it with a regular null terminated string:

#define DNAME "MyName"

IrIAS_SetDeviceName(ir_ref, DNAME, StrLen(DNAME))

Then interogated it with an IrIAS_Query for:  "\006Device\012DeviceName"
from the far end.

This did seem to work when I tested it long ago (3.1?), but I haven't looked
at it recently.  What sort of trouble are your having?

-jjf

-----Original Message-----
From: Charles Rezsonya [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2000 1:36 PM
To: Palm Developer Forum
Subject: Ir device name


in the docs,  the devices name is a ptr to an array of bytes.  i set the
name,  function passes but when another unit goes to grab the device name
its not valid =/  ie,  what comes up is random char's.  what would the
proper declaration and set of the device settings look like?

tia


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to