c# - Async HFP discovery with 32feet -
i in process of writing bluetooth scanner monitor traffic outside house. understand car bt devices have 3 states, visible (always on), limited, , invisible.
i'm using asynchronous device discovery bluesoleil drivers, , class 1 bluetooth dongle.
my problem device name , device class isn't being discovered. discovering device address, , range, not name of device.
i have tried using system.threading.thread.sleep(1000) calling device.refresh() no avail.
it picking name of few things in range, tvs, , fitbit flexes, it's important can find name , cod of car bluetooth devices, not mac address , range.
public void setuplistener() { var client = new bluetoothclient(); var component = new bluetoothcomponent(client); component.discoverdevicesasync(255, false, false, true, false, null); component.discoverdevicesprogress += component_discoverdevicesprogress; component.discoverdevicescomplete += component_discoverdevicescomplete; } void component_discoverdevicescomplete(object sender, discoverdeviceseventargs e) { setuplistener(); } void component_discoverdevicesprogress(object sender, discoverdeviceseventargs e) { bluetoothdeviceinfo[] availabledevices = e.devices bluetoothdeviceinfo[]; foreach (bluetoothdeviceinfo device in availabledevices) { device.refresh(); var name = device.devicename; // returns mac address var cod = device.classofdevice.device; // returns miscellaneous } }
the application i've built simple wpf form dumps found devices datagrid (which i've removed code simplicity's sake). results like.
when sit outside closer road, picking more , more devices cars drive by, can't tell type of device it's detecting.
any appreciated.
Comments
Post a Comment