Hi,

I've been trying to figure out how to use the SrmOpen function:

SrmOpen(UInt32 port, UInt32 baud, UInt16* newPortIdP)

In the "Palm OS Programmer's Companion" it says:
----------------------------------------------------------------------
With the new serial manager, ports must be specified using one of the
following two methods:

Logical port ID's (for physical ports only):
        $8000 = Cradle Port, RS-232 serial
        $8001 = IR Port
        $800n = reserved for future types of ports

A four-character string specifying the port name:
        'u328' specifies the cradle port using the 68328 UART
        'u650' specifies the IR port on an upgraded Palm III device
        'ircm' specifies the IRComm virtual port

Generally, it is best to use logical port ID's rather than specifying the
port hardware directly. When you specify a logical port ID, the device
selects the appropriate hardware.
----------------------------------------------------------------------
In SerialMgr.h it says:

#define serPortIrPort                   0x8001          // Use available IR port.

So I tried:

error = SrmOpen(serPortIrPort, 9600UL, &portid);

But no SrmReceive calls ever yielded any data. Out of desperation, after
trying several other things, I finally tried:

error = SrmOpen('ircm', 9600UL, &portid);

and everything suddenly started working. Anybody know why the recommended
method of using the logical port ID serPortIrPort wouldn't work but the port
name 'ircm' would? Is this anything to worry about?

Thanks!

Tom



-- 
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