Author Topic: Error while connectiong to device  (Read 1901 times)

Offline Michael

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Error while connectiong to device
« on: October 15, 2006, 08:36:52 AM »
Hi, Mike!

I have question: when I using BlueTooth transport and ObjectPushClient.Open raises an exception how I can to know what is error code of that exception. Is it authentication problem or device not found?

If I can to know reason of exception then I can make my software more usefull.
« Last Edit: October 15, 2006, 08:02:21 PM by Mike Petrichenko »

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Re: Error while connection to device
« Reply #1 on: October 15, 2006, 12:51:13 PM »
Good time of the day!

Thank you for your question.

Here is code which I really using in my project:
Code: [Select]
try
  ObjectPush.Open;
  // Connected

  try
    ObjectPus.Put(FileName);
  except
    ObjectPush.LastError // LastOBEX Error
  end;
except
  on E: Exception do begin
    if Pos('10013', E.Message) > 0 then // Authentication failed
    else
      if Pos('10060', E.Message) > 0 then // Connection failed
end;
« Last Edit: October 15, 2006, 08:04:48 PM by Mike Petrichenko »
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager