Mar 2nd, 2024, 4:12pm
Welcome, Guest. Please Login or Register.
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print
   Author  Topic: Serial Port does not get released properly  (Read 4648 times)
dogooder
FabulaTech Forum Newbie
*



View Profile         
Posts: 4
Serial Port does not get released properly
« on: Feb 27th, 2012, 8:24am »
Quote Quote  Modify Modify

Hi,
 
i have a problem in my application, where sometimes the created serial ports do not get released properly (they are still visible in the Windows Device Manager and therefore i've problems when i want to create a port with the same identifier again).
 
The following is my code i use when i want to release (delete) a Serial Port:
 
port.Detach();    // FTVSPCPort port
portControl.RemovePort(comPortIdentifier);   // FTVSPCControl portControl
 
 
Is there anything else i have to do to cleanup properly?
The problem doesn't show up everytime, but rather often.
 
Thanks in advance!
IP Logged
Harry_Mitkov
FabulaTech Forum Full Member
***



View Profile   WWW         
Gender: male Posts: 136
Re: Serial Port does not get released properly
« Reply #1 on: Feb 27th, 2012, 10:22am »
Quote Quote  Modify Modify

Hi dogooder,
 
This issue happens when the port you are trying to delete is opened by a software.
To delete a port it must be closed first. Some application may cause this issue by not closing the port.
 
Try using a different serial application and check if the issue presists.
IP Logged
dogooder
FabulaTech Forum Newbie
*



View Profile         
Posts: 4
Re: Serial Port does not get released properly
« Reply #2 on: Feb 27th, 2012, 10:37am »
Quote Quote  Modify Modify

Thanks for your quick reply!
 
Unfortunately I don't even connect to the port with any application but the issue occurs anyhow.
 
For testing purposes I just create the port in my 'ConnectToPort()' method and let the port close again later in my 'Disconnect()' method.
 
In my 'ConnectToPort()' method I roughly use following code to connect:
 
...
...
      portControl.CreatePort(comPort);
 
      port.PortName = comPort;
      this.comPort = comPort;
      port.Dsr = true;
      port.OnRxChar += new FTVSPCPort._ONRXCHAR(ComDataReceived);
      port.OnOpen += new FTVSPCPort._ONOPEN(PortOpened);
...
...  
 
I thought that maybe my event handlers may cause this issue, but it doesn't seem like..
IP Logged
Harry_Mitkov
FabulaTech Forum Full Member
***



View Profile   WWW         
Gender: male Posts: 136
Re: Serial Port does not get released properly
« Reply #3 on: Feb 27th, 2012, 10:41am »
Quote Quote  Modify Modify

Thanks for your feedback!
 
Please specify the version of Virtual Serial Port Control you are using and the Windows version that is isntalled on your computer. (and what is the type of the OS? 32 or 64 bit?)
 
We will try to reproduce this issue in our test lab.
IP Logged
dogooder
FabulaTech Forum Newbie
*



View Profile         
Posts: 4
Re: Serial Port does not get released properly
« Reply #4 on: Feb 28th, 2012, 1:16am »
Quote Quote  Modify Modify

The version of Virtual Serial Port Control is v3.1.3.0
 
The OS is WinXP 32 bit (which is running on a VMWare Image).
The problem may also be caused by VMWare Player, I don't have any clue.
IP Logged
Harry_Mitkov
FabulaTech Forum Full Member
***



View Profile   WWW         
Gender: male Posts: 136
Re: Serial Port does not get released properly
« Reply #5 on: Feb 28th, 2012, 9:12am »
Quote Quote  Modify Modify

Thanks!  
 
Our develops are working on this issue. It will be fixed in a new release. Please visit our site regularly to check for the new version of Virtual Serial Port Control.  
 
 
IP Logged
dogooder
FabulaTech Forum Newbie
*



View Profile         
Posts: 4
Re: Serial Port does not get released properly
« Reply #6 on: Feb 28th, 2012, 9:16am »
Quote Quote  Modify Modify

Thanks!
IP Logged
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print

« Previous topic | Next topic »
Online Talk to our
support team or
sales department.