I run a mqtt server on raspberry pi 3B together with a mqtt client on android handset. A data sequence will be transferred from the server to the client by TCP.

I enabled ip over bluetooth on raspberry pi 3B following the answer of How can I set up a bluetooth PAN connection with a Raspberry Pi and an iPod?

However, the transfer speed is much slower than wifi connection. It took about 5 seconds to transfer a length 8192 integer sequence, while wifi costs about 0.5 seconds.

This is how I implemented mqtt TCP https://stackoverflow.com/questions/56165209/mqtt-transfer-speed-much-slower-when-data-size-increases-on-tcp.

I cut off the wifi power with rfkill block wifi, and move the handset right next to raspberry pi, which improve the transfer speed a little. But it still takes about 3 seconds to transfer a length 8192 integer sequence.

I am wondering whether the setup of ip over bluetooth is not right, or something else I have missed.

Please advise, thanks in advance.


1 Answer 1


I'd be inclined to wonder why my WiFi was slow instead of Bluetooth. Just as a rough figure of merit, WiFi could be 300x faster than Bluetooth (ref).

And with respect to, 3 seconds to transfer a length 8192 integer sequence:

  • The ref indicates Bluetooth data rates can be as much as 2.1 Mbps, but also says there's a 200 msec latency. Could you be incurring multiple latencies due to the way in which you're transferring things?

  • What exactly is a is a length 8192 integer sequence... how many bits is that?

I'm afraid this is not really an answer, but more of a reminder that measurement of transfer rates, and comparison to published specifications is an endeavor that requires a fair amount of specificity. 3 seconds seems a bit long to me also, but your question may be lacking enough detail to allow anyone to offer a reasoned opinion opinion, much less a specific answer.

  • thank you for the suggestion. I gave up this ip over bluetooth idea, and instead setting up a wifi Access Point following the below weblink learn.sparkfun.com/tutorials/…
    – exds75
    Commented May 19, 2019 at 2:00
  • @exds75: Apologies! Did not mean to discourage you, but the question couldn't be answered (well) as it's written, and so I was only trying to prod you into thinking through it a bit more. Before you get too far along with the sparkfun video, you should check out Ingo's Q&A here on this site. He's a good man - and thorough :)
    – Seamus
    Commented May 19, 2019 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.