RFCOMM / SPP error tuning suggestions for Android Bluetooth Android

I plan to use a communication protocol that will be used between the Android device and a custom sensor that will use the commercial Bluetooth module. I would use the SPP profile, which is said to "provide a simple reliable data stream for the user, like TCP."

I am not very familiar with Bluetooth technology and have some questions about developing such a protocol.

First of all, it is not clear to me whether I should worry about corrupted data being transferred or not. Will the protocoll base stack guarantee me that the bytes I read from InputStreamAndroid are the same as the UART receives from the sensor side? Should I define my own data packets protected by CRC or others, or would that be redundant?

It is not clear to me from the Android Bluetooth documentation what happens in my application if the signal is weak and lost for a while. Am I getting IOExceptionright away, or is the platform providing me with covert error handling and recovery that will make such short breaks invisible to me?

Thanks for any advice.

+5
source share
1 answer

SPP, Bluetooth 2 CRC, , L2CAP, - , .

- , Socket, , IOExceptions, Bluetooth , Android - . , , /, - . - ( )

+10

All Articles