Bluetooth reliability & Bitrate for SPP service

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tl;dr: How to improve bluetooth reliability / stability?

Hello,

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Umm the simplest thing you can do is try out a better PC bluetooth dongle and make sure the dongle is not the one causing the issues.

I played with the RN-42 2 years ago, I did not recall having issues with latency or packet loss within 10ft. I ended up going with ethernet/wifi and did not get too involved with BT. Apple not enabling serial BT on IOS was just a hurdle I could not overcome.

I heard that the new BT standard is just a software thing ontop of a wifi connection, so to just have one radio on a typical consumer device.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm that's interesting. I also noticed that the dongle plays a significant role in the quality of the transmission. In fact, the first dongle I bought off sparkfun was terrible and didn't detect most devices. I guess if I find a cheap and reliable dongle, I could make it a part of the product, so that I'll have better control on the quality of the bluetooth connection.

As a side note, how easy is it to set up a wifi connection with the 8-bit AVRs? I guess the easiest to emulate a serial connection would be to use TCP, right? Also, do you have any 3.3V modules to recommend that would be easy to use (i.e uart interface for data) and not too large in size?