Bluetooth discovery and signal strength (RSSI)

2019-08-14 23:04发布

I need some kind of code sample to make a bluetooth "radar" in Visual Studio Community 2015 with Visual C#. I just need to detect the nearby Bluetooth devices and the transmission signal.

I only get here: https://msdn.microsoft.com/es-es/library/ff536587(v=vs.85).aspx

Found some old library (32FEET) but outdated.

But not even a single C# example. I need Bluetooth LE but i don't mind just test bluetooth 2.0.

In Java i found bluecode and in Linux bluez libraries.

Edit: for Windows 7

1条回答
狗以群分
2楼-- · 2019-08-14 23:46

You're question is too broad but I'll answer it anyway.

Since your target is Windows 7, you won't get BLE support out of the box (as it is first introduced in Windows 8.1). You could work around this by talking to the dongle directly (like I do in the open source WinBeacon library) or by using a VM/Raspberry PI that runs Linux with bluez-stack that exposes some kind of Web API you can use.

For detecting BT 2.0 devices, I would recommend the 32feet library as I've used it in the past for detecting and pairing and it just works. When using the Microsoft BT stack, the 32feet library uses the Windows Bluetooth Socket API, which is well documented on MSDN. So if you only want to scan for devices, you might as well directly use the Socket API and use the 32feet source code as inspiration.

Good luck.

查看更多
登录 后发表回答