Reputation: 81
I am using Lecia Disto e7100i which basically measures distance and area using laser. This device has bluetooth and can be paired with windows. I am trying to develop an wpf app that reads the mesaured data using c#
There is no sdk that comes along with the device. I have tried to use 32feet.Net but since there is no proper documentation I don't know where to start.
Is there any way that I can do to solve my problem?
Upvotes: 2
Views: 9042
Reputation: 569
To get started, you can try:
var client = new BluetoothClient();
// Select the bluetooth device
var dlg = new SelectBluetoothDeviceDialog();
DialogResult result = dlg.ShowDialog(this);
if (result != DialogResult.OK)
{
return;
}
BluetoothDeviceInfo device = dlg.SelectedDevice;
BluetoothAddress addr = device.DeviceAddress;
Console.WriteLine(device.DeviceName);
BluetoothSecurity.PairRequest(addr, "PIN"); // set the pin here or take user input
device.SetServiceState(BluetoothService.HumanInterfaceDevice, true);
Thread.Sleep(100); // Precautionary
if (device.InstalledServices.Length == 0)
{
// handle appropriately
}
client.Connect(addr, BluetoothService.HumanInterfaceDevice);
Also make sure that
Hope it helps. Cheers!
Upvotes: 1
Reputation: 2721
This is not a full response, instead its more of a guideline on how to resolve your issue:
Upvotes: 2
Reputation: 1
Try this demo project, and the following articles after that one.
Try to follow this tutorial
Here you can see a direct answer by the mantainer of 32feet, with which you can get in touch
Check also this answer
Upvotes: 1