Hello all, Over the past few weeks, I have been working on syncing a Palm with Palm Desktop and Hotsync with WINE. I have made some progress in this endeavor. I am successfully able to sync serial based Palms on the first try. It works flawlessly, even with third party conduits. On subsequent tries, I have to reboot my computer before it pick up the device again. I have also developed a patch that allows USB-to-serial converters to work with Hotsync, and potentially other programs. I sent them to someone, and currently I'm waiting to see what his results are. I realize that this is probably an ill-conceived hack, but it does work in my testing with pl2303 devices. The visor driver for USB palms doesn't quite work yet. According to Greg Kroah-Hartman, that particular driver is a special case, and I gather that it may need modification to work with WINE. I'd like to get some feedback on my changes so that it can be useful, and possibly submitted for inclusion in CVS. If anyone's interested, I have a screenshot in the AppDB: http://appdb.winehq.org/screenshots.php?appId=688&versionId=1043.
Thanks a lot, James Liggett
Index: dlls/kernel/comm.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/comm.c,v retrieving revision 1.94 diff -u -r1.94 comm.c --- dlls/kernel/comm.c 16 May 2005 17:52:11 -0000 1.94 +++ dlls/kernel/comm.c 30 Jul 2005 02:22:20 -0000 @@ -1087,11 +1087,30 @@ if (fd < 0) return FALSE; if ((tcgetattr(fd,&port)) == -1) { - int save_error = errno; - COMM_SetCommError(handle,CE_IOE); - release_comm_fd( handle, fd ); - ERR("tcgetattr error '%s'\n", strerror(save_error)); - return FALSE; + /* Check for "Invalid Value" */ + if (errno != EINVAL) + { + int save_error = errno; + ERR("tcgetattr or ioctl error '%s'\n", strerror(save_error)); + COMM_SetCommError(handle,CE_IOE); + release_comm_fd( handle, fd ); + return FALSE; + } + else + { + /* Check for TTY. If this is a TTY, it ptobably means this is a + * usbserial device. In that case, don't set anything and return + * TRUE */ + + if (isatty(fd)) + return TRUE; + else /* Don't know what this device is */ + { + ERR("SetCommState: Unknown port type.\n"); + COMM_SetCommError(handle,CE_IOE); + return FALSE; + } + } } port.c_cc[VMIN] = 0; @@ -1494,10 +1513,51 @@ #endif ) { int save_error=errno; - ERR("tcgetattr or ioctl error '%s'\n", strerror(save_error)); + + /* Check for "Invalid Value" */ + if (errno != EINVAL) + { + ERR("tcgetattr or ioctl error '%s'\n", strerror(save_error)); COMM_SetCommError(handle,CE_IOE); release_comm_fd( handle, fd ); - return FALSE; + return FALSE; + } + else /* EINVAL probably means this is a usbserial device */ + { + /* Check to see if this is a tty. + * If this is a tty, fill in some arbitrary values to + * please the calling program since currently USB-serial + * devices don't care about conventional DCBs*/ + + if (isatty(fd)) + { + lpdcb->BaudRate = 115200; + lpdcb->ByteSize = 8; + lpdcb->fParity = FALSE; + lpdcb->Parity = NOPARITY; + lpdcb->StopBits = ONE5STOPBITS; + lpdcb->fNull = 0; + lpdcb->fBinary = 1; + lpdcb->fOutxDsrFlow = 0; + lpdcb->fDtrControl = DTR_CONTROL_ENABLE; + lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE; + lpdcb->fOutxCtsFlow = 1; + lpdcb->fInX = 0; + lpdcb->fOutX = 0; + lpdcb->XonLim = 10; + lpdcb->XoffLim = 10; + /* Xon/Xoff character won't be set for consistency */ + + return TRUE; + } + else /* Don't know what this device is */ + { + ERR("GetCommState: Unknown port type.\n"); + COMM_SetCommError(handle,CE_IOE); + return FALSE; + } + } + } release_comm_fd( handle, fd ); #ifndef __EMX__