Dec 22nd, 2024, 1:26am
Welcome, Guest. Please Login or Register.
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print
   Author  Topic: Serial Port Control freezes opening Bluetooth port  (Read 9881 times)
Serial Port Control freezes opening Bluetooth port
on: Sep 24th, 2009, 12:14am
Quote Quote  Modify Modify

Hi all,
 
I am evaluating your serial port control right now, and have encountered a problem. In order to make it easier for my customers to find the correct COM-port, I let my application open all existing com-ports (one at a time), send a special string and wait for the answer. On my Gigabyte T1028X with Broadcom Bluetooth (Win XP SP3), the application freezes when trying to open a bluetooth COM port which is not connected to any device. The "OPEN"-method does not throw any exception, I can handle - it just freezes and has to be terminated using the taskmanager.
 
When a device is connected to the bluetooth-COM-port, the connection works as expected.
 
Application is written in VB 6 (SP6).
 
Any ideas or workarounds?
IP Logged
Re: Serial Port Control freezes opening Bluetooth
Reply #1 on: Sep 24th, 2009, 2:06am
Quote Quote  Modify Modify

Could you please let us know what string you send to open the com ports?
 
Do you use only one Serial Port Control or do you have Serial port Control on every com port?
 
What are the flow control parameters?
 
Also please monitor the com port that freezes with the help of this utility
http://download.sysinternals.com/Files/PortMon.zip
and send the log file for analysis to support@fabulatech.com
 
IP Logged
Re: Serial Port Control freezes opening Bluetooth
Reply #2 on: Sep 24th, 2009, 5:38am
Quote Quote  Modify Modify

on Sep 24th, 2009, 2:06am, Alex_Webster wrote:
Could you please let us know what string you send to open the com ports?

 
This is more or less the code, I am using (it is quite straight forward):
 
in Sub Form_Load:
 
Dim cntPorts as integer
Dim i as integer
Dim portsAvail() as integer
 
'enumerating the available ports
'store the ports number in portsAvail
cntPorts=ftspc1.enumSerialPorts-1
for i=0 to cntPorts
 
redim preserve portsAvail(i+1)
 
portsAvail(i) = Replace(ftspc.GetSerialPort(i),"COM","")
next i
 
 
In Connection-Procedure:
 
Dim comPortToUse as Integer
Dim BaudRate as long
Dim Writebuf() as byte
BaudRate=9600
 
'...setting comPortToUse to a vallid value
'then
 
With ftspc1
 
 
.PortName="COM" & portsAvail(comPortToUse)
 
.BaudRate = Baudrate '9600 Baud
 
.DataBits = ftspcDataBits8
 
.FlowControl = ftspcFlowNone
 
.StopBits = ftspcStopBitsOne
 
 
.Open
 
 
sTexttoSend="ATZ" & chr$(13)
 
redim Writebuf(1 to len(stexttosend))
 
 
for i = 1 to len(sTexttoSend)
 
 
WriteBuf(i)=asc(mid$(sTexttoSend,i,1))
 
next i
 
.WriteArray (WriteBuf,len(sTexttosend))  
end with
 
[quote]
Do you use only one Serial Port Control or do you have Serial port Control on every com port?
[/quote]
 
Yes! I am using only one control - but when I have finished the search on the first com-port, I close the port and set the .PortName-Property to the next COM-Port to search - the ports are never open at the same time! The application freezes even if I do not switch the com ports but try to connect only to the bluetooth port which does not have a connection to a device.
 
[quote]
What are the flow control parameters?
[/quote]
 
ftspcFlowNone
 
[quote]
Also please monitor the com port that freezes with the help of this utility
http://download.sysinternals.com/Files/PortMon.zip
and send the log file for analysis to support@fabulatech.com
 
[/quote]
I will do that!
IP Logged
Re: Serial Port Control freezes opening Bluetooth
Reply #3 on: Sep 25th, 2009, 4:39am
Quote Quote  Modify Modify

Thanks for the string Smiley
 
I'll be waiting for the PortMon Log.
 
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.