Author Topic: Radios  (Read 2587 times)

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Radios
« on: April 15, 2007, 09:35:15 PM »
Since 5.2 version (I wrote that in other topic, but want repeat again) BTF supports new MultiAPIs(tm) technology. About this technology you can read by following link: http://forum.btframework.com/index.php?topic=188.msg634;topicseen#msg634

But here I want to explain some stuffs.

Now each component require specifing the working Radio (Radio in this context is a local Bluetooth dongle (radio module) installed on the PC). You probably asked: How to select working radio. Firstly, I recomend to read this topic: http://forum.btframework.com/index.php?topic=161.0

Also, I provide some code here to make it clean for understanding (VB.NET code):

BFAPIInfo, BFBluetoothDiscoveryX and BFObjectPushClient should be placed on the form.

Code: [Select]
Dim Radios As BluetoothFramework.BFBluetoothRadiosX
Dim Radio As BluetoothFramework.BFBluetoothRadioX
Dim Devices as BluetoothFramework.BFBluetoothDevicesX

If BFAPIInfo.Transport.atBluetooth = 1 Then
  Radios = BFBluetoothDiscvoery.EnumRadios()

  If TypeName(Radios) <> "Nothing" Then
    Try
      If Radios.Count > 0 Then
        Radio = Radios.Radio(0)

        If TypeName(Radio) <> "Nothing" Then
         Try
           Devices = BFBluetoothDiscoveryX.Discvoery(Radio, False, False, True)

           If TypeName(Devices) <> "Nothing" Then
             Try
                If Devices.Count > 0 Then
                  BFObjectPushClientX.BluetoothTransport.Device = Devices.Device(0)
                  BFObjectPushClientX.BluetoothTransport.Radio = Radio
                  BFObjectPushClientX.Open()

                  Try
                    BFObjectPushClientX.Put(FileName)
                  Catch
                  Finally
                    BFObjectPushClientX.Close()
                  End Try
                End If
             Catch
             Finally
               Devices = Nothing
             End Try
           End If

         Catch
         Finally
           Radio = Nothing
         End Try
       End If
     End If

    Catch
    Finally
      Radios = Nothing
    End Try
  End If
End If
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline BFUser

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Radios
« Reply #1 on: September 27, 2007, 01:01:11 AM »
Hallo Mike,

i will use this BF-Library under VC++. Can I also set the device and the radio parameter in the CBFBluetoothClientTransport class for bluetooth connection?
I can not found this parameters in the CBFBluetoothClientTransport class.
I use the BFFrameworkActiveX components from the BFFramework demo version 5.2.2d.

Another question is where can i found the property 'BluetoothAPIs' in the CBFAPIInfo class ?
In the bfapiinfox.h file can i read this part:

void CheckTransport(long ATransport);
// Methode 'GetBluetoothAPIs' wird wegen eines ung?ltigen R?ckgabetyps oder Parametertyps nicht verwendet
void AboutBox();
// Methode 'GetTransports' wird wegen eines ung?ltigen R?ckgabetyps oder Parametertyps nicht verwendet

Why can i not use the functions 'GetBluetoothAPIs' and 'GetTransports' ?

Thank you very match...

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Re: Radios
« Reply #2 on: September 27, 2007, 10:38:09 AM »
Good day!

Here is some demos for C++ (also you can find moe C++ demo here on forum).
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager