BLE vs. Wi-Fi for IoT Product Development
This breakdown of BLE and Wi-Fi compares power usage, data transmission capabilities, security, and other factors to help you choose the right one for your IoT solution.
Join the DZone community and get the full member experience.Join For Free
The IoT technology industry has grown so huge that it has established itself as the king of technology in every business and industry. The players who use this technology to come up with their best products will benefit themselves a great deal, and move miles ahead of the competition.
The leading IoT areas are transportation/automotive, healthcare, smart home appliances, retail, and wearables. Big players have already staked their claim in the most lucrative of all consumer markets, but there is still tremendous potential for new players.
Each year, innovations in the field of IoT have made it more exciting than ever. Many of them are revealed through events like CES, the show that reveals to the world what the tech world has been up to. In CES 2018, we were introduced to the newest versions of the groundbreaking technology. The best in the show winner was The Wall by Samsung, while the People’s Choice was HTC's Vive Pro. Other interesting things at the show were the rollable LG OLED TV, ultra-thin laptops, Google Assistant, Amazon Alexa, smart thermostats and light bulbs, Internet-connected garage door openers, GoPro cameras, and new Sony smartphones. It means smart devices just got smarter.
This brings us to the topic of wireless communication. There are so many communication technologies around, so which one should you use? The idea is to create user-friendly devices that can make lives easier, so the choice of technology is very, very important.
What Are the Options We Have?
Wireless communication technology has evolved to be an integral part of communication devices, no matter what they are used for. Understandably, they don’t need wires to send signals and hence can communicate from even remote areas. Perfect examples of wireless devices can be cordless telephones, GPS units, wireless computer parts, satellite television, ZigBee technology, and many more. Major forms of wireless communication are satellites, near field communications (NFC), infrared (IR), cellular connectivity, wireless networking, WiMax, Li-Fi, Wi-Fi, and Bluetooth Low Energy (BLE).
With the surge of IoT apps, NFC and IR virtually became non-existent. Infrared communication showed its potential when flip phones were used, but these days, you hardly see them because people mostly use smartphones. Infrared also requires devices to be in close range with each other, and there is very low bandwidth. NFC, as the name suggests, allows a short range of fewer than 20 centimeters. Only very few cell phones support it, as it has low transmission capacity. Cellular connectivity is a viable option for IoT devices with a 5G network connection, but it will require a SIM card, and the user has to pay a subscription fee.
So that leaves us with the best of the others — Bluetooth LE (BLE) and Wi-Fi.
Which One Should You Choose? BLE or Wi-Fi?
BLE tech, such as beacons, are used to send data over short distances. This wireless technology has become a recent alternative for Wi-Fi, especially in IoT devices and apps. Let’s look at some important factors that must be considered when making the choice between BLE and Wi-Fi for wireless communication.
Once a person turns on their Wi-Fi connection, the device will be on the constant lookout for a Wi-Fi network. Retailers find this very useful because they track their customers and send them offers and discounts. It can even track their physical movements, down to the exact location. Wi-Fi technology does not necessarily ask the permission of the consumer to do this because there is no user intervention involved. If you want to be free of Wi-Fi, you will have to disable it on your device.
For BLE technology, the consumer has to switch on the Bluetooth facility in their phones and allow location detection. You can opt to receive in-store or indoor notifications.
Users might want to choose a technology that gives them more privacy and more freedom over the data they share in public. BLE offers more privacy.
BLE is more suitable for transmitting small amounts of data at 1 Mbps, like sensor readings of temperature, acceleration details, GPS coordinates, etc. However, BLE is not suited for sending data in real-time to a server. If real-time data is required, a special gateway must be used to send the data.
The Wi-Fi standard 802.11ac can transmit at a speed of up to 1.3 Gbps, so it is ideal for bigger files and data. Yes, the speed depends on different factors, and it also depends greatly on the provider your user decides to subscribe to. Wi-Fi Direct provides maximum data transfer speed, about 10 times more than what you get with Bluetooth Classic. But BLE is about 2-3 times slower than Bluetooth Classic and 20-30 times slower than Wi-Fi Direct.
Location Detection Accuracy
When positioned indoors, BLE uses advertisement packets to provide additional information that adheres to the iBeacon, Eddystone, standard. Beacons use BLE to sense the proximity of the user and broadcast information to a device (smartphone, tab, laptop, mobile app, etc) one-way. There is a unique UID number that can be read by other Bluetooth receivers. Once the device receives the signal, it will activate location-specific information. The signals are passed through radio waves that can penetrate physical barriers. Location accuracy can be ensured this way, and Beacons can work even in poor radio frequency conditions. The only requirement is that the user’s device must have the Bluetooth switched on in his device.
Wi-Fi is a wireless Local Area Network (LAN) technology where two or more electronic devices use the ISM radio band to communicate. Bluetooth also uses the ISM band, but Wi-Fi technology doesn’t rely solely on the proximity of the user. Wi-Fi can triangulate the customer’s location when the device sends the access point's BSSID (MAC address).
When it comes to micro-locating, Beacons are the best option because Wi-Fi signals are really not very capable of penetrating through solid objects, including walls.
Wi-Fi is designed to correctly point to the exact location by measuring access points in a device. Parameters like SSID and MAC addresses are used for this.
Meanwhile, once Bluetooth is detected, the mobile device must be within a specified range because Bluetooth is all about proximity — and not the exact location. Both the devices should be paired with the facility to function.
The proximity data provided by BLE is much more accurate than Wi-Fi, but not very accurate either. The maximum range for BLE wireless connections is 30 meters, while Wi-Fi goes further beyond. It depends on the version, but you can get well over 100 feet if you can extend the connectivity through external antennas.
Transmission range varies depending on the Bluetooth product that you use. If you use Class 2 transmitters, the transmission range is around 50 feet, but if you use a Class 1 transmitter, the range would be closer to 300 feet. But the battery life could be affected. You can use a range extend circuit with sensitive receivers to get a really long range.
A long-range BLE module (BLE121LR) provides a range of up to around 1,500 feet. On the other hand, a Bluetooth Classic long-range module (WT41) gives off a range up to 3,000 feet! BLE uses a wonderful technique known as mesh networking — you can transmit over a large range by using very little power. It is so amazing that you can connect more than 65,000 devices.
It is said that IoT and Big Data are two sides of the same coin, however, BLE will not be an adequate choice for every IoT device/scenario. You may have devices that exchange a lot of data, for example. BLE will not be able to accomplish this. If you want to transmit large data sets, Wi-Fi is the answer.
BLE signals can be picked up any Bluetooth 4.0 enabled devices. For Android devices, Version 4.3 or later would be perfect, while for Apple devices, the technology runs on Version 4S or later. Wi-Fi works on WLAN 802.11 a/b/g/n/ac devices. For Android devices, Version 4.0 or later is the preferred choice for Wi-Fi connectivity, while for Apple devices, you might need Version 5S or later.
The main functionality of BLE beacons is their capability to discover compatible devices so the distance measurements turn out to be more accurate. This will give you more accuracy regarding a user’s behavior within a particular scenario.
Both the wireless networks offer good levels of user security. But yes, initially, passive eavesdropping was an issue in BLE, wherein a third-party device listens to the exchange between two devices. But this issue was cleared through AES-CCM cryptography where the data is encrypted. The key exchange protocols that were used by BLE initially had severe security vulnerabilities that allowed hackers to decrypt the data that was being passed. The key exchange that we were talking about here refers to the “pairing method” or the association model and affects the security of the connection greatly.
The passkey method offers a certain level of protection, wherein a 6-digit number is passed between devices. If the hacker is not listening when the user is typing this passkey, then it offers fairly good protection. Even if a hacker is able to listen in on the values, then the TK process or the Temporary Key process offers sufficient safety.
Wi-Fi uses 256-bit encryption, whereas Bluetooth (Classic and LE) uses only 128-bit encryption. This is the usual level of security users need, but if you need high levels of security, you might have to choose Wi-Fi. Wi-Fi has two most popularly security accesses, Wireless Equivalent Privacy (WEP) and Wi-Fi Protected Access (WPA2-AES) that make it much more secure. You can secure the Wi-Fi networks through passwords that render them safe. WPA2 is always recommended over its predecessor, WPA.
Bluetooth devices have lower power consumption. This is probably because the broadcast range of both the technologies is varied. Both technologies emit a signal with a frequency of 2.4 gigahertz. The signals emitted by iBeacon travel for about 30 feet, while Wi-Fi signals can travel over 10 times more. And that’s why Wi-Fi requires 10 times more power than BLE, even if they are performing the same tasks. Wi-Fi devices need considerable power, about 500µW for ten messages per day, while BLE consumes only 50µW.
Some applications call for more Wi-Fi electrical power, as much as 40 times the power that BLE takes up. This may be insignificant in places where electrical power comes cheap. But for computer users who need to generate their own electrical power through wind turbine technology and solar cells (as they are off the power grid), this could be expensive.
iBeacon is very easy to set up and use. It can seamlessly connect to devices and can easily contain 7 devices within a single network. However, Wi-Fi doesn’t do that so easily. Users need to have a little bit of technical knowledge to set up a system, and might even need the services of a technician.
Both BLE and Wi-Fi deployments entail that companies should be prepared for where they are going to place their devices. It also depends on the software that will be functioning in these devices.
BLE devices are less costly, self-sufficient, and can run on a single battery for over 2 years, depending on usage. No configuration is required. Wi-Fi needs router configurations, and they have to be connected to a power source. The expense also depends on the router used and, of course, the manufacturer.
So, as you can see, wireless communication between smart devices can happen when a number of good technologies remain in concert with each other. BLE is probably the most commonly used one, and more capabilities are added to it to enhance its performance. It is more suitable when you want to exchange simple data, not any large files or videos.
If you want to send a live video or a bandwidth-intensive data, then turn away from BLE. However, iBeacons would be good if you want to connect to your home Wi-Fi network, as it can command your device’s Wi-Fi chipset, where scanning and connecting to a network happens through the user’s own mobile app. This would undoubtedly give you a very seamless experience and save you the trouble of manually connecting and transferring.
You have to consider the above-mentioned factors as well as speed and battery usage to make a choice between the two. Of course, it also depends on the device you use, the purpose it is about to serve, and the information handled.
Published at DZone with permission of Pratiksha R Prasad. See the original article here.
Opinions expressed by DZone contributors are their own.