diff --git a/cpp/platform/impl/windows/bluetooth_classic_socket.cc b/cpp/platform/impl/windows/bluetooth_classic_socket.cc index cda204e1..e60a4e85 100644 --- a/cpp/platform/impl/windows/bluetooth_classic_socket.cc +++ b/cpp/platform/impl/windows/bluetooth_classic_socket.cc @@ -23,6 +23,11 @@ namespace windows { BluetoothSocket::BluetoothSocket(StreamSocket streamSocket) : windows_socket_(streamSocket) { + bluetooth_device_ = std::make_unique( + winrt::Windows::Devices::Bluetooth::BluetoothDevice::FromHostNameAsync( + windows_socket_.Information().RemoteHostName()) + .get()); + input_stream_ = std::make_unique(windows_socket_.InputStream()); output_stream_ =