Author Topic: Some problems with wclBluetoothDiscoveryx (VB6)  (Read 69798 times)

viriato

  • Guest
Some problems with wclBluetoothDiscoveryx (VB6)
« on: May 06, 2008, 10:37:08 AM »
Simply example:

Code: [Select]
Private Sub Command1_Click()
    Dim mApi As wclAPIx
    Dim mDiscovery As wclBluetoothDiscoveryx
    Dim mRadios As wclBluetoothRadiosx
    Dim mDevice As wclBluetoothDevicex
    Dim mDevices As wclBluetoothDevicesx
   
    Set mApi = New wclAPIx
    mApi.Load
   
    List1.AddItem ("Api Loaded: " + mApi.Version)
    Set mDiscovery = New wclBluetoothDiscoveryx
    Set mRadios = mDiscovery.EnumRadios
    List1.AddItem ("Radios loaded: " + Str(mRadios.Count))
    Set mDevices = mDiscovery.Discovery (mRadios(0))
    Set mDevice = mDiscovery.SelectDevice(mRadios(0))
End Sub

Code: [Select]
Set mDevices = mDiscovery.Discovery(mRadios(0))
Expected function or variable.

Code: [Select]
Set mDevice = mDiscovery.Discovery(mRadios(0))
Object doesn't support this property or method.


So I can't retrieve a device or device list :S

(my intention is to do a simply object push example in vb and wcl 6, no problem to share  :))

Thanks in advance.

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #1 on: May 06, 2008, 10:52:24 AM »
Little update... i make a mistake...

I must write mRadios.Items(0) but the problems persists

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #2 on: May 06, 2008, 11:49:02 AM »
WCL is asynchroniouse application

Dim WithEvents mDiscovery As wclBluetoothDiscoveryx

it will raises OnDiscoveryComplete event when discovery done

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #3 on: May 06, 2008, 12:01:33 PM »
WCL is asynchroniouse application

Dim WithEvents mDiscovery As wclBluetoothDiscoveryx

it will raises OnDiscoveryComplete event when discovery done
Same problem...
mDiscovery.Discovery <----- Expected function or variable.
mDiscovery.SelectDevice <------- Object doesn't support this property or method.

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #4 on: May 06, 2008, 12:31:29 PM »
I will attach this small example using the 6.0.0 version of ActiveX WCL

[attachment deleted by admin]

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #5 on: May 06, 2008, 01:11:14 PM »
At least SelectDevice function seems to be buggy or not implemented in wclBluetoothDiscoveryx at this version of the ActiveX WCL and is not recognised as a available function by VB.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #6 on: May 06, 2008, 01:38:37 PM »
Correct, there is no SelectDevice function.

The VB demos will be ready in 2 days. Please, wait for it :)

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #7 on: May 06, 2008, 04:20:08 PM »
Correct, there is no SelectDevice function.

The VB demos will be ready in 2 days. Please, wait for it :)
I'll wait :) thanks!

P.D. I ask myself how to retrieve devices without selectdevice.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #8 on: May 06, 2008, 06:10:48 PM »
By using Discovery function

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #9 on: May 07, 2008, 09:10:28 AM »
I don't wanna to be annoying but myDiscovery.Discovery(myRadio) says "Error: Expected function or variable." if i change the parameter or the number of parameters it lauch compiling errors so the function is wellknown by the compiler :S

Thanks in advance.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #10 on: May 07, 2008, 09:45:22 AM »
The discovery function does not return any values but you trying to assign its retuend value to variable.

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #11 on: May 07, 2008, 09:52:12 AM »
Ok you are right as ever  :-[ i was using an old demo that use discovery(radio, boolAsync) and returns the device, i asume that now ever is async.

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #12 on: May 07, 2008, 10:02:05 AM »
I saw that onDiscoveryComplete is changed for DiscoveryComplete :D all works now!

viriato

  • Guest
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #13 on: May 07, 2008, 12:35:25 PM »
Ummm strange... with BtFrameworkX 6 beta i can discover 12 bluetooths... with WCL.net only 3 :(

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Some problems with wclBluetoothDiscoveryx (VB6)
« Reply #14 on: May 07, 2008, 12:47:46 PM »
http://www.btframework.com/download.htm

Quote
The demo version of Wireless Communication Library has the following limitations:

only 3 devices can be discovered;

 

Sitemap 1 2 3 4 5 6 7