Hello,
I've been experiencing a very bad problem with VMware where opening a serial port on /dev/ttyUSB0 fails about 80% of the time.
We're using a Meshnetics Zigbit development board which uses a Cygnal 2103 usb-to-serial chip. We run Ubuntu 10.04 in VMware Player (3.1.4 build-385536) on a Windows 7 Host (HP Envy).
In our Linux console application, soon after startup we open /dev/ttyUSB0 in the usual way:
fd = open(comPort, O_RDWR | O_NOCTTY | O_NDELAY);
This call fails almost 80% of the time for no particular reason. We usually have to restart our application 5-10x to have the port open successfully and proceed.
The odd thing is that is works sometimes - and if the port opens ok we don't seem to have any issue sending/receiving data on our serial port. But since it fails most of the time, it slows down our development a lot and make demos very nerve-racking..
There doesn't seem to be any issue when the device is plugged in. A ttyUSB0 is created immediately and I receive these messages on /var/log/messages:
Further, lsusb reports:
Bus 002 Device 007: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
To assist debugging this problem, I tried our software using VMware Fusion 3.1.3 (416484) running on a Macintosh. It also used Ubuntu 10.04 as the guest image. The same problem exists in the Macintosh/Fusion version as well.
For a sanity check, I also installed Ubuntu directly on a physical machine with no VMware. Running our same application with our same Zigbit board, I did not experience any issues with the serial port. It opens each time without any trouble.
This leads me to conclude there is some issue with the Cygnal chip and VMware.
Has anyone else experienced intermittent trouble opening a serial port on ttyUSB0?
thanks,
-Mark
PS - please let me know what other information I can provide to help debug this issue. I am also located in the Bay Area and can loan the physical device to VMware if that could help.