Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started by: fabio.santini on August 19, 2009, 08:43:29 AM
-
Hi all,
first of all sorry form my english.
I'm trying to develop an application that send simultaneously 10 files to 10 device using 2 dongles (5 connection per dongle) connected in the same pc.
Reading the forum i see that i can use 2 dongles for send messages configuring in the application 2 wclProximitySender object.
I have tryied this solution without succes.
Here what i have done:
1) Installed in the system 2 dongles, one with ms stack and one with toshiba stack.
2) Changed in the ProximitySenderDemo source the procedure btSetSend_Click in this way
Private Sub btSetSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btSetSend.Click
If lbRadios.SelectedIndex < 0 Then
MessageBox.Show("Selected radio")
Else
Dim Radio As wcl.wclBluetoothRadio = New wcl.wclBluetoothRadio()
If lbRadios.Items(lbRadios.SelectedIndex).ToString() = "baMicrosoft" Then
Radio.API = wcl.wclBluetoothAPI.baMicrosoft
Else
If lbRadios.Items(lbRadios.SelectedIndex).ToString() = "baToshiba" Then
Radio.API = wcl.wclBluetoothAPI.baToshiba
Else
If lbRadios.Items(lbRadios.SelectedIndex).ToString() = "baWidComm" Then
Radio.API = wcl.wclBluetoothAPI.baWidComm
End If
End If
End If
wclProximitySender.SendRadio = Radio
wclAuthenticator.Radio = Radio
Radio.API = wcl.wclBluetoothAPI.baToshiba
WclProximitySender1.SendRadio = Radio -------> assigning second object WclProximitySender1 to use the toshiba send radio
End If
End Sub
3) Added events for the second ProximitySender WclProximitySender1
When executing the application i see that it cast only events for the first ProximitySender object. The new one added is complitly ignored.
I'm sure i'm doing something wrong but what?
In the end i'm using the library in the right way? Can i use it for discover from 1 dongles and then send files to detected devices using the same dongles plus another?
Thanks
-
Hi,
1. It is not so good idea to use toshiba. It's better to use WidComm instead.
2. The code is absolutly correct except you didn't assign DiscoveryRadio for second ProximitySender. And I think, you didn't call ProximitySender1.Start
3. Yes, you can use one dongle for discovery (DIscoveryRadio) and other one for send (SendRadio)
-
Thanks for the qquick reply.
Now all the ProximitySender works well.
Last thingh, where you say
3. Yes, you can use one dongle for discovery (DIscoveryRadio) and other one for send (SendRadio)
i need to know if is possibile to use one dongle for discover and 2 dongles (the one that discover + another one) for send file to devices splitting the send operation between the 2 dongles.
Again Thanks
-
It is possible too if dongle uses MS drivers. Unfortunatly only MS driver allows to discovery and send at the same time.
So you have to use 2 dongles (Radio1 and Radio2) and 2 proximity senders (PS1 and PS2).
Radio1 == MS
Radio2 == WD
PS1.DiscoveryRadio = Radio1
PS1.SendRadio = Radio1
PS2.DiscoveryRadio = Radio2
PS2.SendRadio = Radio1
But in this case you should limit MaxConnections for each PS to 3
-
Ok, thanks!!!!
-
Sorry, other problem I have.
Have I any mode to break a file sending? I have some problems, sometimes, with sending file. Channel remain in use with the MAC, log shows file in sending (not global sending start, but file sending start) and demo remain blocked. Timeout works only for accept or deny message, this problem is after the accept/decline.
-
Hi,
Can you please explain more? I am sorry but I afraid I didn't clear understand what happened.
-
Sometimes, I have some problems while file is sending. Using ProximitySenderDemo I see file in-send, and sometimes it happens file remain in sending and nothing more happens. So steps are blocked due to this file sending block.
Or, at the end of sending (OnSendComplete), OnStartDelay doesn't come in, and in this case too elaboration is blocked.
Thanks for helping
-
Aha.
Does OnFileSendStart fire? Or only OnSendStart? Also, please try the latest 6.5.12.0 (or 6.6.0.0). There was some issue fixed in ProximitySender.
-
Actually, blocks occoured in events OnFileSendStart and OnSendComplete. Just blocked.
Sending timeout doens't work in thoose situations and I have no way to jump the problem.
Is there any way to jump the block? Another timeout or an error to manage?
Also, please try the latest 6.5.12.0 (or 6.6.0.0)
Updated in the morning, same troubles.
-
Can you also tell what is target device(s) and when it exactly happens (or randomply). I want to setup PC for test and fix the issue.
-
I'm trying the Demo on a road, I can give you only MAC addresses.
I developed with developer version (6.6.0.0) and using on a PC with personal version (6.6.0.0)
At the moment, I have some blocks at events I told during this thread (sorry for huge OT this became), OnFileSendStart and OnSendComplete.
-
Ok, Thanks a lot for the information. I will immediately start working on this issue and will try to fix it as soon as possible.
-
By the way, may it appear when device is out of the dongle's range? If yes, then try to wait a bit. For MS driver it may take up to fe seconds before even fires. Any way, I will check al the possible things.
-
It can be, but it happens twice in 10 minutes with same MAC address and it's hard a device come in and exit in that exact moment... Now it's blocked another time at the end of all OnSendComplete with another device's MAC address.
-
Hi, I'm upping this thread cause I think I'm making some mistakes but I can't find where...
I tried to use another driver instead Microsoft one. This because I'm still trying to use two dongles but at the moment I want to make WCL works with another driver.
I tried Toshiba and BlueSoleil (WidComm refuses to install if it doesn't find its own dongle) but I have error at same time, when I start wclAuthenticator.Open(), it shows:
Specified bluetooth API is not available
If I get back at MS driver it works.
Now, am I doing something bad?
I found this: http://forum.btframework.com/index.php?topic=857.0 but I didn't try it yet. Can it solve my problem?
-
What WCL version do you use?
If WCL reports Bluetooth API is not available than driver were not installed.
-
I'm using last one, 6.7.0.0. In driver's list, BlueSoleil appears without problems, working to find a solution.
Anyway, if I want to use due dongles, second one is installed by BlueSoleil, but I need one of them with MS driver, is the article on the FAQ my answer?
-
Appears in drivers does not mean works.
Installing MS drivers (http://forum.btframework.com/index.php?topic=857.0).
-
Ok I think I solved about BlueSoleil, now it's sending with new driver.
The question now is: I need BlueSoleil AND Microsoft, with that guide I can remove an external driver but I can handle two dongle with same driver.
-
There is no one driver supported more than one dongle at the same time. So you need install different driver for each dongle.
-
I did (or better, I'm trying to do), but if I install BlueSoleil suite (I can't install only the clean driver, neither ProximitySenderDemo can see it) each time I plug a bluetooth dongle it wants to use the same driver (failing cause I knew only one dongle can be used from one driver)
-
I gave the link about how to install MS driver (http://forum.btframework.com/index.php?topic=857.0).
-
Ok thanks, now it seems to work with Microsoft and BlueSoleil.
New problem: BlueSoleil driver works only for first loop. At second loop DiscoveryStarted and DiscoveryComplete fire at the same moment and return to StartSleep, StopSleep and later return to DiscoveryStarted and DiscoveryComplete, have you any idea why?
-
What BlueSoleil version do you use?
-
The suite is version 2.6 (070517, so maybe may 2007), but driver version is 6.0.13.61 (just for perform some tests I used an old version attached with a USB dongle)
-
Little update: newer version of BlueSoleil (suite 6.4.240.2, not last but last before last) returns MAC address with reversed couple, example: 01:23:45:67:89:37 return 37:89:67:45:23:01...
-
Hi,
I am testing it now on all BS stacks and found that it has some issues with BS 5.0 and high. All BS between 1.6 and 5.0 (excluding 5.0) works good.
P.S. Thanks for info about MAC.
P.P.S. I will keep testing it and back to you soon.
-
Hi,
Finally we have tested all the BS drivers versions 5.0 and above.
Unfortunatly, for now WCL does not completly support this drivers versions, because 5.x has bugs in connections, 6.x has new API which is completly incompatable with old API and does not allow to:
* enumerate all the services;
* read service's channel;
* create servers;
* some other important functions.
We will work on this problem and contact BlueSoleil team to ask add the functions back. But I do not know when it will be done.
So, BlueSoleil 5.0 and high looks absolutly unusable.