Author Topic: How can I detect a lost connection ?  (Read 1355 times)

Offline olli1242

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
How can I detect a lost connection ?
« on: December 04, 2006, 06:36:23 PM »
Hi,

I'm interested in buying a license of your BT Framework to use with Delphi too, but I've made a quick test with your "BFSerialPortClient" demo application and there I have one problem.

I use the BFSerialPortClient to connect my OEM Bluetooth modules. Everything is fine, but when I power off my connected slave modules, none error response on BT Framework.

How can I write an error handler to detect connection failures, to make my software usefull?

Thanks,
olli1242

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: How can I detect a lost connection ?
« Reply #1 on: December 04, 2006, 07:58:07 PM »
Good time of the day!

Normally it raise OnDisconnect event. But it works fine only under Microsoft Bluetooth tsack, becouse MS stack notify application about that.
WidComm and BlueSoleil can't do it. But you can detect lost connection when you try send or read data from (to) device. Time-out exception will be raise (10053 as i remember).
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager