Search code examples
xamarin.formsuwpbluetoothserial-communicationrfcomm

Classic Bluetooth communication (RFCOMM) in Xamarin.Forms


I am looking for Classic Bluetooth communication (RFCOMM)/ serial port communication using classic Bluetooth and not Bluetooth Low Energy(BLE) in Xamarin.Forms preferably. I have some emulator which is hosted on a com port and a Bluetooth adaptor. I want to connect to that Bluetooth adaptor and fetch/read data in my mobile app.

This is DPIR emulator which writes the data on a com port.

This is Odorator2 emulator reads the data.

I had explored Bluetooth Low Energy(BLE) using ble.net plugin but I need to connect to a port i.e. Bluetooth SPP and read data in the mobile app.


Solution

  • There's no classic Bluetooth communication APIs in Xamarin.forms. You would have to use the UWP built-in Bluetooth RFCOMM APIs to communicate.

    You could check the Bluetooth RFCOMM chat sample to learn how to use these APIs.