Author Topic: Multiple Dongles  (Read 59012 times)

fabio.santini

  • Guest
Multiple Dongles
« 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

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #1 on: August 19, 2009, 10:31:51 AM »
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)

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #2 on: August 19, 2009, 11:27:00 AM »
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

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #3 on: August 19, 2009, 11:35:41 AM »
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

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #4 on: August 19, 2009, 11:45:51 AM »
Ok, thanks!!!!

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #5 on: August 26, 2009, 01:43:05 PM »
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.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #6 on: August 26, 2009, 03:13:40 PM »
Hi,

Can you please explain more? I am sorry but I afraid I didn't clear understand what happened.

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #7 on: August 26, 2009, 03:38:15 PM »
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

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #8 on: August 26, 2009, 03:43:42 PM »
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.

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #9 on: August 26, 2009, 04:07:05 PM »
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?

Quote
Also, please try the latest 6.5.12.0 (or 6.6.0.0)
Updated in the morning, same troubles.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #10 on: August 26, 2009, 04:08:21 PM »
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.

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #11 on: August 26, 2009, 04:22:50 PM »
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.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #12 on: August 26, 2009, 04:28:12 PM »
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.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Multiple Dongles
« Reply #13 on: August 26, 2009, 04:29:26 PM »
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.

fabio.santini

  • Guest
Re: Multiple Dongles
« Reply #14 on: August 26, 2009, 04:36:50 PM »
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.

 

Sitemap 1 2 3 4 5 6 7