cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Port over Bluetooth

LMorr.3
Senior II

Hello,

I have successfully setup a virtual port and communicate from WebUSB/WebSerial and plain serial ports with my STM32F373.  

I'm now looking to implement Bluetooth to eliminate the need for a USB cable.  What is the simplest way to add a bluetooth Virtual Serial Port similar to how it is done via USB?  I can also use a bluetooth hardware driver instead of a Virtual Serial Port type link as well if that is what is required.

Thank you

1 ACCEPTED SOLUTION
4 REPLIES 4

@LMorr.3 wrote:

What is the simplest way to add a bluetooth Virtual Serial Port similar to how it is done via USB? 


Depends how you define "simple", but I'd say the simplest way is to just add an external module that does it all for you.

 

PS:

When you say "bluetooth", do you mean Classic or LE?

Note that, unlike SPP on Classic,  there is no standard (ie, defined by BT SIG) serial port profile on LE.

Yes, there are many proprietary implementations - but nothing standard.

Note that, unlike SPP on Classic,  there is no standard (ie, defined by BT SIG) serial port profile on LE.

This is a strong argument for classic. Windows supports it natively and it works with Microchip modules. OSX should too. Not sure about BLE "serial stream" profile. It will work with custom Android apps on phones. But data rate and latency are worse. So you just set up the BT module, connect UART pins (don't forget flow control!), and it streams, while the other side is ready to receive (like with USB).

 

 

LMorr.3
Senior II

Great info. thank you.

I should have mentioned I'm connecting an iPad to my device.  From what I can see, iPad/iOS does not support bluetooth classic.  I see what you mean about LE not supporting SPP, but I guess I did not need a virtual serial port on the iPad anyhow.   I'm writing a SwiftUI app so will need to investigate how I can create some type of serial connection over bluetooth to my device.  It does seem like the Microchip module is perfect but a bit expensive.  It will do nicely unless there is a cheaper option.