Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started by: yogeshtyagi on April 05, 2016, 11:47:31 AM
-
Hi,
I am trying to get mac address of BT Adapter
using (var radios = new wclBluetoothRadios())
{
var dis = new wclBluetoothDiscovery();
dis.EnumRadios(radios);
if (radios.Count > 0)
{
var Radio = radios[0];
string bbc = string.Empty;
var abc = Radio.GetAddress(ref bbc);
}
return null;
}
but it return empty string, Please help me
-
What is result code of GetAddress?
-
13
-
That means WCL_E_TRANSPORT_NOT_AVAILABLE - there is no supported Bluetooth API. Probably you did not call wclAPI.Load.
-
could you please post sample code for calling wcl api
-
The demo code is available in APIDemo and BluetoothDiscoveryDemo applications. Both use wclAPI.Load and wclAPI.Unload (which are required).
In few word any application uses WCL must have wclAPI class instance which shouldbe initialized before any WCL usage
private
wclAPI API;
FormLoad
API.Load();
when you finished usiing WCL (usualy in FormClose) call
API.Unload();
-
Thanks for Help :)
-
You are very welcome.