Embedded Systems —Bluetooth vs WiFi for real time communication

Dinuka Salwathura
2 min readSep 25, 2017

Recently I had to develop a wearable device which transmits real time data over wifi. We chose Bluetooth first, but due to the availability of ESP8266 wifi SOC I was able to get the required task(sending real time data over wifi) done with this single chip since it has a programmable microcontroller with an ADC(Analog Digital Converter).

ESP8266–7

This device draws around 215ma[1] current when it is running with peak processing power and highest transmission rate. We can use this device with power saving mode also, with deep sleep while not using the CPU.

What I observed while using this device for real time communication is, there are several issues which deviates the functionality from the ideal scenario of streaming data flawlessly. Since TCP connections have error correction in a packet loss it resends data. Due to that sometimes if we don’t receive data due to network congestion we may receive the missed data few microseconds later, which is a problem if you run an app which is dependent on your real time data. In our case it was a game which operates based on the data sent by the wifi module.

You can use this module(HC06 or HC05) for Bluetooth communications. But it doesn't have a programmable microcontroller in built, which has to be driven by an external microcontroller.

HC 06 Bluetooth Module

HC06 module only has the ability to pair it by scanning through another active bluetooth deivce, so this acts as a passive bluetooth device. But HC05 has the ability to scan the bluetooth devices nearby and connect to them.

Bluetooth have a network stack like in TCP, which is not very complex compared to TCP stack. So Bluetooth doesn't have data misses very often like in wifi. It is a good choice to use bluetooth for your realtime data communication device in terms of power consumption as well as less error rate and packet losses.

[1] https://www.itead.cc/wiki/ESP8266_Serial_WIFI_Module

--

--

Dinuka Salwathura

Computer Science Engineer | Co-Founder of Stack Technologies(Exited in 2022)), Hybriteq & Tripmo | https://dinukasal.github.io