1

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.

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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