Hi,
yesterday I purchased the C# Bluetooth Framework library.
My intention is to create a C# class library with Visual Studio.
My test source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using wclCommon;
using wclBluetooth;
namespace ManagedBLE
{
public class ManagedBLE
{
private wclBluetoothManager Manager;
public void Open()
{
Manager = new wclBluetoothManager();
Manager.AfterOpen += new EventHandler(Manager_AfterOpen);
Manager.OnDiscoveringStarted += new wclBluetoothEvent(Manager_OnDiscoveringStarted);
Manager.OnDeviceFound += new wclBluetoothDeviceEvent(Manager_OnDeviceFound);
Manager.Open();
}
void Manager_AfterOpen(object sender, EventArgs e)
{
wclBluetoothRadio Radio = (wclBluetoothRadio)Manager[0];
Int32 Res = Radio.Discover(10, wclBluetoothDiscoverKind.dkBle);
}
void Manager_OnDiscoveringStarted(object Sender, wclBluetoothRadio Radio)
{
}
void Manager_OnDeviceFound(object Sender, wclBluetoothRadio Radio, long Address)
{
}
}
}
An external executable call the Open() function, available by the library, AfterOpen event is triggered, but OnDiscoveringStarted event is never triggered.
Is it possible to create a library or does it work only for windows forms?
Do you have any suggestions on this?
Thanks for your valuable support
Tavella Fabrizio
Micro Systems
Italy