Hello,
I am creating a catalog get for my track bike to send GPS and RC3 strings to RaceChrono. I am wondering if I should enable the flow control SPP profile on my RN42 Bluetooth module?
I hope to connect to the Bluetooth module at 230k bps at minimum though don't know if I just push bytes as fast as possible or if the Android will use RTS/CTS to ensure its not overwhelmed.
My system is build on a 50hz GPS module and without the serial can read sensors at > 200hz. (Tensy 3.6 microcontroller based). With serial to Bluetooth it looks like 100hz is possible for RC3 output.
Jeff
Comments
Any flow control is implemented in Android Bluetooth stack, and is invisible to the app developer. Also the implementation probably differs between Android versions. I think you'll need to test what works.
-Antti
Does the $RC3 data rate need to match the GPS data rate? Or can I use 2 different rates? (ie GPS @ 50 and sensors @ 100)
Thanks, Jeff
Thought I would add an update. It looks like the Android phone API will connect to the SPP profile on the BT module with CTS/RTS if available. I have configured my RN42 with the MDM profile (SPP + RTS/CTS) and added an LED to the CTS line between the BT module and the Teensy 3.6. I can see the LED flashing.
Also I was having problems with data issues with missing data at 230K to the BT module and 50Hz RC3 + GPS messages. I am no longer having those issues once I went to the RTS/CTS but I can't solely claim that as the solution as I also refactored some of the code in the mean time due to my other forum question where my data was not formatted correctly.
Jeff