.NET Components for Mobility

How two manage two bluetooth dongle??

Last post 02-10-2010 8:16 AM by alanjmcf. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-01-2010 4:41 AM

    How two manage two bluetooth dongle??

    Hello,

    I have connected two bluetooth dongles to my pc, but I don´t know how to choose in each momment the one I want to use.

    I want the first just discovers devices and the second sends a file up to 7 devices. How could do it? Is it related to the use of BluetoothRadio.PrimaryRadio ??

     Thanks you very much in advance,

     

    Fernando.

  • 02-01-2010 5:31 AM In reply to

    Re: How two manage two bluetooth dongle??

    All stacks for Windows support only one dongle; MSFT and Widcomm certainly support only one dongle. :-(

    However if you can install Widcomm on your machine and have it use one dongle then we can load one dongle through each of the two stacks.  See the documentation in release 2.5.

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 02-01-2010 6:12 AM In reply to

    Re: How two manage two bluetooth dongle??

     Thanks you Alan!

    I´m programming in C# using Inthehand library. I have two dongles conneted to my pc (ezurios ones). The first I think uses Microsoft stack and for the other one I added the CD for installation so I guess it uses Widcomm Stack version 1.4.2.8. I see it is very old so I think I should donwload the lastest version, but shall crack it? Once installed, how would I work with it? I mean, if I want to use, for example, ObexClientSession for creating a session and sending a file, how could I select the dongle to send from?? Shall I work in different programs?

     

    Thankss!

  • 02-01-2010 10:46 AM In reply to

    Re: How two manage two bluetooth dongle??

    Err, see the documentation in 2.5.  :-)  From the user guide:

    From version 2.5 (actually version 2.4.1) we support using the Microsoft and Widcomm stacks at the same time.  This allows one program to support more than seven connections, or similar situations.

    To use the multi-stack support on Windows XP, install both Microsoft and Widcomm stacks and attach their radio dongles.  Then create an app.config file with your application and set the flag “oneStackOnly” to “false” — there is a sample app.config file in the assemblies folder, copy it, rename it to match you app e.g. “thisismyapp.exe.config”, and change the settings as required.  It is likely that we will change the default for “oneStackOnly” to be “false” in the next version.

    If the two stacks both load successfully, then BluetoothRadio.AllRadios should contain two items. Using new BluetoothClient() etc will always create an instance from the first radio/stack.  To specifically create an instance from a particular radio/stack use the StackFactory property on BluetoothRadio.  For instance:

    Dim radioB As BluetoothRadio = BluetoothRadio.AllRadios(1)
    Dim cli As BluetoothClient = radioB.StackFactory.CreateBluetoothClient()
    Dim lsnr As BluetoothListener = _
       radioB.StackFactory.CreateBluetoothListener(BluetoothService.Wap)

    Hope that helps...

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 02-08-2010 5:23 AM In reply to

    Re: How two manage two bluetooth dongle??

     Thanks you verymuch alanjmcf.

    Actually, I´m going to do two programmes. One for doing a bluetooth SPAM and other for sending files I decided. My idea is that each program uses a different bluetooth stack. It is possible, isn´t it? I do not know exactly how to do it and what to download...

    One of the both, is already running, I think using MSFT stack because I have just downloaded inthehand library and brecham.obex.

    What shall I install for make it runs in the other programm??

     

    Thanks you very much!

  • 02-10-2010 8:16 AM In reply to

    Re: How two manage two bluetooth dongle??

    Yup should work.  If you start writing your programs and read the documentation it should all make sense.
    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
Page 1 of 1 (6 items)
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.