Bluetooth communication for Windows (xp/7/8/10)

Hi there. I’m developing the application which will communicate with a third-party devices through the bluetooth. I thought that Unity could be a great solution for me because I want to make the app crossplatform (Android/iOS/Windows). The problem is that I just can’t figure out how to communicate through the Bluetooth on Windows. Any tips and hints? Thanks!

Which platform are you targeting Windows Standalone or Windows Store Apps ? Because you specified XP, I presume it’s Windows Standalone?

Yes, Windows Standalone

You’ll probably need somekind of plugin for this, try googling, in worst case scenario you’ll need to make a native plugin, use these functions BluetoothAuthenticateDevice function (bluetoothapis.h) - Win32 apps | Microsoft Learn and then make DllImport hooks from your C# code.

1 Like

Okay, thanks. Looks like it’s the only way for me. What about windows store apps? Can you advice something?

Try this API - Windows.Devices.Bluetooth.Rfcomm Namespace - Windows UWP applications | Microsoft Learn, but it’s only available on Windows Store Apps, it’s not available in Unity Editor.

1 Like