tl;dr: How to improve bluetooth reliability / stability?
I'm using an RN-42 bluetooth module for transmitting sensor data to the computer.
I am currently transmitting data at around 50kbit/s and I am sometimes experiencing high latency and connection freezes. I assume those are due to packet loss int the BT, since increasing the distance between my transmitter and receiver (i.e. going to another room), has a very similar effect. I know that the BT protocol actually retransmits lost packets, with a method similar to TCP, which can cause the high latency.
For my project, I need a reliable communication that is, which is not going to have high latency spikes (like 200 - 300 ms) and especially not connection freezes. It must also work well in close proximity to wireless routers, like in a regular home environment.
I know rn-42 is a class 2 bluetooth 2.1 device. It advertises 300kbps in SPP mode, but even at 100kbps, freezes are very frequent, and above that it doesn't work at all. The bluetooth is meant to work at close range, like 3 meters, so a class 2 should be sufficient, however I wonder if a class 1 device would improve reliability. Also, are there reliability advantages of using BT 3.0 or 4.0 instead of 2.1?