Shouldn't there be a SrmOpen(serPortIrPort,1200,&PortID) somewhere? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Danielle O'Hallisey Sent: Friday, August 06, 2004 7:12 PM To: Palm Developer Forum Subject: IR and serial ports
I have written some code to test whether or not the IR port is properly opened under serial manager, and the implication is that it is not. CSerialStream ser (serPortIrPort, 1200, 1 * SysTicksPerSecond(),5); //initialize the port as IR port, 1200 baud, timeout is 1 second UInt32 dwFlags = srmSettingsFlagBitsPerChar8 | srmSettingsFlagStopBits1; UInt16 wValueSize = sizeof(dwFlags); ser.Control(srmCtlSetFlags, &dwFlags, wValueSize); /*Later, we close like this:*/ Err error; error= SrmClose (serPortIrPort); {switch (error) {case serErrBadPort : { FrmCustomAlert(SerialErrorAlert, "Ain't No Thing", "!", ""); return true; break; } case serErrNotOpen: { FrmCustomAlert(SerialErrorAlert, "Ain't Open", "!", ""); return true; break; } case serErrNoDevicesAvail: { FrmCustomAlert(SerialErrorAlert, "Couldn't Find Nothing", "!", ""); return true; break; } default: break; } } Whether I define the port as serPortIrPort, 0x8001, or sysFileCVirtIrComm the result is the same; the close switch/case returns “Ain’t No Thing!” which means that apparently there is no IR port available. I am using the latest/greatest CW 9.x and port the app to my Zire 71 (which definitely has an IR port) so, uh… what’s up? Thank you, Danielle O'Hallisey -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/