Hi Eric!

Eric Siu wrote: 
>         I want to make my Palm to communicate with another device. my
> device support a irda physical layer. I want to make the device have
> action interactively with my Palm. how can I make it to communicate with
> my Palm with higher layer protocol?
I suppose, your device supports only sir.
So you can't use the higher levels of the irda communications.
But of course you can switch the uart to irda and then you are able to
talk sir ;-)

Maybe www.palm.com/devzone/docs/serialma.html can help you for general
serial programming.

This is, how we open the serial port to use sir (dependent on a flag
"UseIrda":

UInt    OpenRS232(UInt refNum)
{
Err             error;
        if (!PortClosed)
                return true; // Port is already open!
                                                        
        error = SerOpen(refNum, 0, Baud);                                              
         
        SetSerialSettings(refNum);
        if (UseIrda == true)
                ComsEnableInfrared(refNum);                                            
         
        PortClosed = false;
        return  true;
}

Err ComsEnableInfrared(UInt refNum)
{
        int     e;
        e = SerControl(refNum, serCtlIrDAEnable, 0, 0);
        return 0;
}

Now you can send your bytes  ...

Hope it helps.
bexxx
-- 
"These people look deep within my soul and assign me a number based 
                        on the order in which I joined."
                                            Homer J. Simpson

Reply via email to