Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started by: viriato on May 06, 2008, 10:37:08 AM
-
Simply example:
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
Set mDevices = mDiscovery.Discovery(mRadios(0))
Expected function or variable.
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.
-
Little update... i make a mistake...
I must write mRadios.Items(0) but the problems persists
-
WCL is asynchroniouse application
Dim WithEvents mDiscovery As wclBluetoothDiscoveryx
it will raises OnDiscoveryComplete event when discovery done
-
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.
-
I will attach this small example using the 6.0.0 version of ActiveX WCL
[attachment deleted by admin]
-
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.
-
Correct, there is no SelectDevice function.
The VB demos will be ready in 2 days. Please, wait for it :)
-
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.
-
By using Discovery function
-
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.
-
The discovery function does not return any values but you trying to assign its retuend value to variable.
-
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.
-
I saw that onDiscoveryComplete is changed for DiscoveryComplete :D all works now!
-
Ummm strange... with BtFrameworkX 6 beta i can discover 12 bluetooths... with WCL.net only 3 :(
-
http://www.btframework.com/download.htm
The demo version of Wireless Communication Library has the following limitations:
only 3 devices can be discovered;
-
http://www.btframework.com/download.htm
The demo version of Wireless Communication Library has the following limitations:
only 3 devices can be discovered;
Thanks i read it before but how using the previous 6.0 beta release i didn't have that limitation i forget it.
Anyway i hope we could buy the Personal Licence tomorrow, here all boughts are made between days 10-15 of the month (stupid company policy)
Anyway i think I will need help in only one more point... how OPP works now? i mean if .push fuction now takes 0 arguments how I specify the file?
THANKS IN ADVANCE, AND GREAT WORK MIKE!
-
Put function takes 1 argument - a file name. and it is asynchroniouse command. I.e. after wille putted it call OnComplete event
-
The first part is not a question is only a help for people that some day could read this topic:
mmm Put function works in a strange way... first of all i must do late initialitations:
Not working:
Dim mObjectPush As wclOPPClientx
Set mObjectPush = New wclOPPClientx
Working
Dim mObjectPush As Object
Set mObjectPush = New wclOPPClientx
Using the second way I manage to avoid this error: "Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic" when i call the put function
Anyway Put seems to need 2 parameters string ObjectName, System.IO.Stream Stream.
Unfortunately i only manage to get "Client not connected" errors... I'll try it. People stay on line :)
-
Maybe this could be the fish that bites his own tail...
if i need to declare it as object i can't declare it withevents (asyncronous)
:-[
-
My app shows "Client not connected" but the mobile ask about recibe the file ???
-
Hi, everyone. Sorry for my English, I speak rather bad.
I've made a simple vb6demo. It does not work with exceptions, so be carefull.
It will be updated in two days
[attachment deleted by admin]
-
My app shows "Client not connected" but the mobile ask about recibe the file ???
Still same problem with the personal licence purchased. :-\
-
How do you use it? Can you show the code?
-
VBdemo
[attachment deleted by admin]
-
How do you use it? Can you show the code?
Sure! I tried it in two ways: here we go!
In this first one the error shown is "client not connected" but the phone ask to recive data (anyway you can't recive it)
Private Sub btEnviar_Click()
num = ListReceptores.SelectedItem.Index
Set mObjectPush = New wclOPPClientx
mObjectPush.ClientTransport = ctBluetooth
mObjectPush.BluetoothParams.Radio = mRadio
mObjectPush.BluetoothParams.Authentication = False
mObjectPush.BluetoothParams.Encryption = False
mObjectPush.BluetoothParams.Address = mDevices.Items(num - 1).Address
mObjectPush.Open
If mObjectPush.Active = True Then
On Error GoTo ErrorHandlerPush
mObjectPush.Put "C:\\a.jpg", "C:\\a.jpg"
Else
listLog.AddItem "No se pudo abrir"
End If
mObjectPush.Close
ErrorHandlerPush:
listLog.AddItem Err.Description
End Sub
The second one was separating it in two steps , the first one is until .open function , so the phone ask for connection :) you can reply yes! but when i launch the seccond part (the .put and .close function) nothing seems to happen, if you lauch this second part again the Active propertie is false so it was well close.
I tried too a third way that was make a clientx connection before but no luck again.
Thank you in advance (I didn't purchase BTframework with my nickname, it was purchased with the company name "Carintia")
-
VBdemo
I ask about OPP wich is not implemented yet, but thank you anyway.
P.D. It only discover 1 Device for me and I allways discover something like 10-15 usually.
-
here is
[attachment deleted by admin]
-
VBDemo :
Works on my machine
Opp works
Proximity sender
vCardParser
BTDiscovery
SerialMonitor
UsbMonitor
Client ???
Not tested:
IrDaDiscovery
DevInfoClient
IrMC Client
Not done yet:
Athenticator
FTP
[attachment deleted by admin]
-
:'( :'( :'(
(http://www.carintia.com/clientesinfo/a.gif)
-
I'm using Win XP 64 bit and Visual Basic 6 SP6 (also tried in win XP pro SP2)
-
You must download latest update:
http://private.btframework.com/index.php?topic=4.msg18#msg18
or
http://private.btframework.com/index.php?topic=2.msg17#msg17
-
You must download latest update:
http://private.btframework.com/index.php?topic=4.msg18#msg18
or
http://private.btframework.com/index.php?topic=2.msg17#msg17
Sorry, I find the error just now... i ask my boss two times that if he has downloaded the LAST version... ej?m ej?m.... XD
-
Last question (i hope) I don't know why the transmited data reserves double the space that in the HD and of course is corrupted :(
-
FIXED AND ALL WORKING: ;D ;D ;D
The fail was in the reading binary part.
SOLUTION:
Dim B() As Byte
srcFile = "a.jpg"
Open srcFile For Binary Access Read As #1
ReDim B(LOF(1) - 1)
Get #1, , B
Close #1
On Error GoTo ErrorHandlerPush
mObjectPush.Put srcFile, B
ErrorHandlerPush:
listLog.AddItem Err.Description
-
ProximitySender for VB 6 with WCL.NET
[attachment deleted by admin]