Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BT for serial apps (port close timeout)

0 views
Skip to first unread message

Beverly Howard

unread,
Nov 12, 2009, 6:00:27 PM11/12/09
to
While BT has replaced the serial port, a plus is that it is _sometimes_
possible to use BT in place of a serial cable for needs written with a
cable connection in mind.

However, I have encountered two critical serial apps (offered by
companies who are not available to modify them) where the serial code is
written to "close" the serial port after every use... i.e.;

open the port
send serial data
close port
open port
collect received data
close port
etc...

My experience with this is that BT cannot handle the above as it
triggers BT to renegotiate and reconnect on each open event... in the
case of the two apps mentioned, they timeout and fail before that
negotiation is finished.

So, the question... is there any way to setup a BT connection to remain
alive between these events?

tia,
Beverly Howard

DickGrier

unread,
Nov 16, 2009, 2:34:03 AM11/16/09
to
Hi Bev,

This is a nightmare (IMO). Obviously, closing the port should only (again,
IMO) be done when the application has completed ALL data transfer. I've
looked back in the text for the 1st Edition of my book, and I made that
recommendation there -- long before the advent of BT!

I believe that application developers have to recognize that BT is in common
use, and that BT has limitations that require "special" treatment

I'm sorry that I don't have any really great answer.

Now, I suppose that you might be able to write a helper application that
creates a Virtual Serial Port that your application opens, then opens the BT
port(s) and keep the BT active. This helper application would simply not
close the BT port until some (substantial) time had passed after the user
application had closed the Virtual Serial Port, or you, the user, that is,
actually closed the helper app. This could be done using Franson Serial
Tools, and not very much code. However, depending on how you wanted to
distribute it Franson Serial Tools license can cost from $40 to $400.

I done somewhat similar things on the desktop, and I do have a license for
Franson Serial Tools for the Compact Framework. So, if you want to contact
me offline, we can discuss it.

Dick

--
Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue
Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004, Revised July
2006.

Beverly Howard

unread,
Nov 15, 2009, 4:54:15 PM11/15/09
to
>> Virtual Serial Port <<

Great thought... time to dig that BT serial adapter out and give it a
shot... perhaps in the next year or so ;-)

thanks,
Beverly Howard

0 new messages