Author Topic: Why is sometimes, though rare, IsInRange causing System.NullReferenceException?  (Read 42554 times)

rameshwar

  • Guest
Sounds great! We have been developing an app that uses WCL for almost last one year and this was the only reason that forced me to write our own small library of utility functions using Windows API, which is working fine for our requirements. However, we are yet to release our commercial product and if this issue has been fixed then we shall definitely be using WCL as we can do more with it when needed and as of now we have not found any other bug in WCL. Thank you for this great news. How can we obtain the fixed version? Thank you. Rameshwar

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

If you are registered user you can download latest version from registered users area. If you use WCL demo download the latest demo from our site.

rameshwar

  • Guest
Hello

Have you removed the Demo warning dialog from Demo version?

My previous experience was that Demo Version does not work with Windows Service applications due to Demo Warning Dialog, this is because Windows Service is not meant for interactive desktop.

I was fortunate enough to have received the full version from you for evaluation and then this Exception started occurring. I am not a registered user as yet.

Thank you
Rameshwar

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

No, we did not and I do not think we ever do. However, you can check that the bug is fixed (or not) if simple run BluetoothDiscovery demo application from WCL package.

rameshwar

  • Guest
Thank you for your reply.

I have created many testing scenarios and come to the conclusion that I cannot test for exception caused in our product by WCL simply by running BluetoothDiscovery demo.

Accordingly, since no demo is available, I have decided to move on.

Also, if we decide to buy and the exception still exists then shall we get the refund?

Thank you
Rameshwar

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

In fact we can not guaratee that Bluetooth part of WCL will work in service application  as there are some things out of our control. For example, WidComm and Toshiba have limitations for using it from Windows Service. Also as WCL has unlimited trial period usualy we do not do refunds.

rameshwar

  • Guest
Based on your assurance that the exception has been fixed we purchased Lite license in the name Saucepan Productions as "License Comparison Tool" list for Lite includes the features we wanted to use including pairing. The accompanying documents too contained these classes. However, when I use it build the solution I get following errors -

(1) For the following classes the error is -
The type or namespace name ... does not exist in the namespace 'wcl'

'wclAuthenticator'
'wclPairedEventHandler'
'wclAuthenticationRequestEventHandler'
'wclPINRequestEventHandler'
'wclPINRequestEventArgs'
'wclAuthenticationRequestEventArgs'
'wclPairedEventArgs'
'wclClientTransport'

(2) The other error is -
'wcl.wclBluetoothRadio' does not contain a constructor that takes 1 arguments

I have downloaded version 6 12 0 0

Thank you
Rameshwar

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

Thank you for your purchase. Unfortunately wclAuthenticator (as described in License Comparison Table, SilentAuth) is available in Personal License. However, manual pairing (wclBluetoothDevice.Pair) is available in Lite License.

wclClientTransport is depricated since 6.11.4.0 (www.btframework.com/news.htm#a28022013) and in latest WCL you have to use wclTransport.

Events in WCL authenticator have been changed since 6.11.3.0 (www.btframework.com/news.htm#a22022013).

Copy constructors have been removed. You should use Assign method instead (as it was in always in WCL).

rameshwar

  • Guest
From the downloaded licensed version when I run the BluetoothDiscoveryDemo I get the following errors -

The type or namespace name ... does not exist in the namespace 'wcl' - for the following
'wclPINRequestEventArgs'
'wclNumericComparisonEventArgs'

Thank you
Rameshwar

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Looks like something went wrong when building setup it demo from old version appears in this installation. Please find attached correct demo. Also we will upload fixed installtion in few minutes.

[attachment deleted by admin]

rameshwar

  • Guest
In the new library I am not getting NullReferenceException but it now has another problem. At the point where I was getting exception the call now returns "not in range" even though the discovered device is only some inches away. I am surmising that the Null Reference Exception was happening probably because Radio was going away and now "not in range" is occurring because of the the same i.e. because of Radio going away. Is my assumption correct? If my assumption is correct then in this case have you released handle to the hardware in your code in such a situation?

Thank you
Rameshwar

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
IsInRange uses service enumeration to detect that device is in range. If your device reuiqres pairing to enumerate service and not paired, if your device is not in connectable mode, if your device busy and can't reurn its services IsInRange returns False (device is not in range).

 

Sitemap 1 2 3 4 5 6 7