• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Serial port enumeration and detection its type

Started by Roman Novgorodov, February 16, 2008, 04:29:16 am

Previous topic - Next topic

Roman Novgorodov

February 16, 2008, 04:29:16 am Last Edit: July 01, 2009, 04:17:18 am by Roman Novgorodov
Hello

The latest version of nrComm Lib 8.xx can help to detect type of serial port. It is useful in work with the various removeable adapters like USB-To-RS232 converter (cable), IrDA or Bluetooth USB doungle and etc.

You can access to more information about detected serial ports in TnrComm.Device[] list. See the following sample:

// Show friendly name ..
ShowMessage( nrComm1.Device[nrComm1.DeviceIndex].NameFriendly );
// Show description ..
ShowMessage( nrComm1.Device[nrComm1.DeviceIndex].Description );
// Show service name  ..
ShowMessage(  nrComm1.Device[nrComm1.DeviceIndex].Service );
// Show manufacturer name  ..
ShowMessage(  nrComm1.Device[nrComm1.DeviceIndex].Manufacturer );

Please note that the some of this strings can contain an empty information. It depends on driver (manufacturer) of device and TnrComm.EnumPorts property value.

TnrComm.EnumPorts: TnrEnumPorts

The EnumPorts property controls the enumeration process. It has three possible values:


  • epQuickAll

  • epFullInfo

  • epFullPresent




epQuickAll Mode (default)

It's fastest way to get possible serial ports in the system. This mode does not return information about possible serial port type.

epFullInfo Mode

Mode returns full possible information about all detected serial ports. This process can take long time depend on quantity of installed devices.

epFullPresent Mode

Mode returns full possible information about serial ports are presented in the system at this time. This process can take long time, too.

You should call Update() method after change this property in run time. This method forces to reload device list.

Roman
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.