Better Serial Support

Discussion in 'Feature Suggestions' started by Hamletlere, Jul 16, 2006.

  1. Hamletlere

    Hamletlere Bit poster

    Messages:
    3
    Hello,

    I am posting to request better serial support in Parallels Desktop for Mac OS X.

    I generally use a Keyspan USA-19QW USB serial port on my Mac to talk to embedded devices that I develop for at work. I had thought that I would be able to use this device under Windows XP running on a virtual machine, but this does not appear to work. (My guess as to why: the device apparently uses several different USB device IDs to identify its current state [firmware loaded, etc.], and these changes confuse Parallels as to what should be passed to the guest Windows XP operating system... the driver works fine on a native XP installation, but not on a virtual installation).

    Since that didn't work, I went on to investigate the serial support built into Parallels, hoping to be able to attach a virtual serial port to a Mac OS X controlled serial device. That's what I didn't find. Instead, I can have the serial port go to a file (this appears to be output only, i.e. a log file) or to a Unix socket. I have written a program that will open the socket and route data back and forth between the /dev/tty.KeySerial1 device, and while this works it isn't optimal. The program cannot detect baud rate changes made by the guest OS, nor hardware flow control requests.

    My feature request: To be able to connect a virtual serial port to a standard Unix character device, configuring it for baud rates as requested by the guest OS, and possibly handling software and hardware flow control as requested by the guest OS.

    In general, most Windows applications set the baud rate once and use that for the duration, meaning my small connector program will work for most cases, but this really isn't optimal as applications that change baud rates will fail.
     
  2. rcomeau

    rcomeau Member

    Messages:
    42
    I second this request. I have had spotty success with the Keyspan adapter. For my GPS device, I can use it once to transfer/receive data, but it fails on any second attemtp until I unplug/plug the device in again.

    I also need the Keyspan for a pice of lab equipment, but this does not work at all. Presumably the software needs to talk to the device more than once in a session to reset the device, get some initial data (firmware version etc...) then actually try to use the device. Since it fails after a single transfer, the sequence always fails.

    Having a real serial port would solve this problem, however a more robust solution would be to have proper USB support so the USB-Serial adapter would work properly within Windows, and at the same time fix all the other USB problems we are all having. I'd be happy with either one at this point.

    regards,

    rcomeau
     
  3. avramd

    avramd Bit poster

    Messages:
    3
    Could you post your program?

    Hamletlere,

    Could you post the program that you wrote that converts a Unix serial device into a socket for Parallels?

    Thanks!
     
  4. LanTao

    LanTao Bit poster

    Messages:
    1
    http://www.virgaria.org/projects/pipe.c did exactly what I wanted.
     
  5. transco

    transco Member

    Messages:
    27
    Any success yet? A few suggestions

    I have tried several USB-to-Serial adapters with different degrees of success, however none have worked well enough to be used. In my case I am using them with a pulse-oximeter which has the same pseudo-RS232 interface (i.e. TTL levels and not true RS232 levels) found in GPS, PDA's, etc. At first I thought the problem was with the USB-to-Serial adapters themselves. They would work with short data bursts, but fail with sustained transfers (9600 baud). I then tried the same adapters on a real Windows PC and they all worked perfectly. It appears that the VM just can't keep up. So now what am I going to do? I read all that was available in the Parallels manual on using Unix sockets, but I'm afraid at my level of expertise it didin't do any good. I was hoping the 'socket' approach would be fast enough since it would then be the Mac side of the world doing the actual flow control and buffering.

    My problem is, I have no idea how to set this up. Easy enough to assign a serial port # to a socket in the VM world, but what do I do on the Mac side? I sure would appreciate any help anyone could provide. The recording pulse-oximeter is for monitoring a patient suffering from acute sleep apnea and thus it is essential I find a solution. Yes, I guess I could dig in the medicine fund and buy a Windows PC just for this purpose, but it seems like such a waste. Unfortunately the application I must use to process and distribute the sleep study data only comes in a Windows version. Help!
     
  6. transco

    transco Member

    Messages:
    27
    Any idea how this could be done with darwinports, fink or py-serial. I don't have a C compiler and have only very limited knowledge of programming. I really need a cookbook approach using the tools that come with, or are available free for OSX 10.4. I've written at least 6 emails to the Parallels folks telling them that I've had very poor results binding the Mac's USB-to-Serial ports directly to the XP VM and could really use some help in doing this using sockets. In three weeks, not a single reply. Can anyone help me?
     
  7. joem

    joem Forum Maven

    Messages:
    1,247
    I don't know about the serial port problem, but you do have a C compiler if you have a Mac. Just install Xcode from your OSX distribution disk.
     

Share This Page