MacOS High Sierra 2 USB Serial Connections second connection hangs


#1

iMac 27inch mid 2011
MacOs High Sierra 10.13.6
Pluggable Driver Version 3.0
Coolterm Version 1.5.0

Two Pluggable USB to Serial cables
Two Coolterm windows each connected to one of the USB to Serial Cables
Both ports communicate fine.
Disconnect one port everything is fine.
Disconnect second port coolterm hangs (process waiting on i/o)

In a simple C program the just reads from the serial ports.
One connection closes fine.
Second connection hangs. Waiting on I/O can’t kill process (aka kill -9 pid //doesn’t work)

Can you tell me how to fix this?

Thanks
YJ


#2

Hi YJ,

Thanks for reaching out to us, I am sorry this is not working as expected.

If you initially only connect one Coolterm connection and one USB-to-Serial cable, run the application then disconnect the USB-to-Serial cable, does the software also hang? Or does this behavior only happen when two connections are established?

Additional, if only one Coolterm connection is made but both USB-to-Serial cables are connected does disconnecting the active cable cause the application to hang? If not, does removing the final USB-to-Serial cable cause the application to hang?

If the system is unloading necessary devices when the USB-to-Serial adapters are being disconnected this may be causing the application to crash instead of exiting correctly, these tests should help to verify if this is indeed the case.

Thank you,

Pat


#3

Hi Pat

If only one connection is open neither cool term nor my simple serial port program crash when the connection is closed. When two cables are connected but only one connection is made it doesn’t crash. Only whe two connections are open one to each cable does the application hang on close of the second connection. I have even tried opening two connections in the same program and the first connection when closed works fine but the second hangs. Once hung there is no way to end the process. Only a full reboot ends the hung process. Once the process is hung on close the port that serial connection can’t be used anymore. Any process trying to use that port will also hang. The reboot isn’t a clean restart of the computer because it hangs as well. The power has to be disconnected or the power button has to be pressed for long enough that the hardware turns off. Thank you for any help you can give on this.

YJ


#4

Hi YJ,

Thank you for the additional details, it sounds like MacOS is not correctly unloading the hardware resources when the second connection is closed. We can attempt to fully reinstall the Prolific Driver to attempt to rule out a faulty driver however we have not seen this issue before and may be the result of the software in use as well as the hardware.

To reinstall the driver, please perform the following:

  1. Download the latest driver from here ( https://s3.amazonaws.com/plugable/bin/PL2303_MacOSX_1.6.1_20160309.zip )
  2. The full removal instructions are included in the zip file in the “Installation Guide” PDF document at the very end
  3. Disconnect the USB serial adapters from the computer
  4. Open a terminal ( Applications > Utilities > Terminal ) and run the following commands:
    sudo rm -rf /Library/Extensions/ProlificUSBSerial.kext
    sudo rm -rf /var/db/receipts/PL2303.*
  5. To remove the ports from the system, go to System Preferences and select Network.
  6. Select the USB-Serial Controller device and use the ‘-’ button to remove the connection
  7. Restart the computer when completed

After restarting the computer, please install the Prolific Serial driver by extracting the zip file and running the PKG file in the driver zip.

Please let me know if this helps.

Pat


#5

Hi Pat,

I deinstall the driver and reinstalled it per your instructions.

  1. Openning two connections and then closing them still hangs coolterm (I view as the gold standard for serial teminal for MacOS).
  2. My simple app uses posix open and close system calls and also hangs on second close.
  3. During all this I did find that if I unplug the cables before trying to close the ports it all works. Kind of a bandaid but it does help and could be a clue to why it hangs for you.

Hope y’all find what is the root cause.

John


#6

Hi Pat,

Also I find two other forum posts that have similar problems but never had any answers. The latest one 2017 just in case you thought this was isolated.

Cheers
John


#7

Hi Pat,

Another observation.

I noted that when the serial cables are unplugged then the programs could close all the connections fine and exit. However when the usb cables are plugged back in only one of them is reconnected to the system.

Thanks Again,
John