BT LE vs WiFi - Page 1
Forum section: electronics / general

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: March 31, 2017, 09:05:02 pm
content: What are the pros and cons of BT LE vs Wifi.Basically I want to communicate via wireless to a Android Tablet / Phone from an embedded device. I'm unable to make up my mind whether to go in for a BT Le module or Wifi module?I have the following questions regarding BT LE :1. Would it work with Bluetooth phone even though the phone is not Bluetooth LE?2. Is Bluetooth LE currently available on all modern phones and is the implementation quite stable.3. Would it be preferable to use a BT LE module or a mcu with inbuilt bluetooth LE like the ST BlueNRG1 or Kinetis W Series.4. What BTLE profile will be suitable for this kind of usage.From what I have read the max theoretical OTA speed for BTLE is 1Mbps what would we practically get.Basically I would be sending sensor data over the BTLE connection to the phone / tablet.Your views would be highly appreciated.ThanksZR

author: Howardlong
author_rank: Super Contributor
timestamp: March 31, 2017, 09:23:20 pm
content: If you are hoping tomwrite a cross platform app, Bluetooth isn't often dealt with well in some of the cross platform development environments. WiFi is as it's TCP/IP.However, if you use WiFi you need to consider how your device is going to connect easily to your tablet/phone. I have yet to see a really good implementation. You may well find you need to run your device as an access point to make it work at least to configure it, unless you have an out of band method.Bandwidth is the biggest problem with Bluetooth if you want to stream media, particularly video, for example. Having said that, many WiFi modules have really low effective throughput at the app layer despite advertising 802.11g or n, so beware.Bluetooth is lower power than WiFi. If you can implement a simple serial protocol over Bluetooth that would simplify things for you. I'm much more on the WiFi streaming side so I have little current Bluetooth knowledge other than at a high level I'm afraid, so someone else will need to chime in for more.

author: julianhigginson
author_rank: Frequent Contributor
timestamp: March 31, 2017, 09:55:20 pm
content: 1. no.2. mostly, I guess. lots of qualative terms in the question.3. what is your expected monthly quantity of products in manufacturing? how much dev money do you have to get the product done? how much space for electronics is in the device?4. what kind of usage? profiles generally match the application. if your product is a unique application you probably need to define your own (nothing to be scared of)5. you won't even get 250kbps. maybe expect 20k and you should be alright.Sent from my A0001 using Tapatalk

author: jnz
author_rank: Frequent Contributor
timestamp: March 31, 2017, 10:12:13 pm
content: 1. No. BT IS NOT BLE. They have very little in common with each other. They only share the radio freq, some rf protocol stuff, and some small amount of security and data layer. For all intents and purposes Bluetooth has nothing to do with Bluetooth Low Energy.2. The idea is stable. If you are looking at a SiliconLabs chip that might be worse in holding a connection than a Nordic, but since Nordic gives you a lot of control it could be coded worse. Ti might fail to Cypress in some area. iPhone 6 is definitely not as good as iPhone7. There is no answer here.3. You had better look into FCC certification if you want to use a striaght chip vs a module, I mean, you'll need to look into it even with a module, but it'll be easier with a module.4. You didn't actually say what the usage case is. You're asking about BLE profiles - but you don't see to be aware that BT and BTLE profiles aren't even remotely similar. BLE is GATT and Beacons when it comes to what you can do with it, that's basically all. Your speed question is full unanswerable as it greatly depends on the module/chip and the peripheral device (phone/tablet). All depends on connection interval and packets per connection, MTU, etc. If you're talking 4.0 that's a little different than 4.2, and a lot different from 5.0If you want to send sensor data, you almost certainly want BLE. Depends on the amount of data! But it's a strong possibility that if you're even asking this question, you want BLE.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 01, 2017, 10:20:24 am
content: Quote from: Howardlong on March 31, 2017, 09:23:20 pm1. As of now Android only, but I would like to include other platforms too.2. Although I haven't checked it out practically I've seen tutorials on the web showing how to communicate between the ESP8266 and an android device. I don't know how reliable it is but most people seem to have done it. Hope to hear your views on this.3. No video as of now. only sensor data and maybe the android device would send some config or settings data to the mcu.4. You do have experience on WiFi then would be happy to hear from you about what modules you use how easy are these to code is it simple UART and modem like commands?Like someone else also mentioned are do you use a mcu with embedded wifi like NodeMCU or Particle Photon?

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 01, 2017, 10:35:07 am
content: Quote from: julianhigginson on March 31, 2017, 09:55:20 pmI . So realically we can look at 10KB/s right?2. I have to send data of upto 10 sensors to the phone.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 01, 2017, 10:43:25 am
content: Quote from: jnz on March 31, 2017, 10:12:13 pm1. Ok so BTLE is not backward compatible. Is there any approximate figure of how many phones support BT LE as of today?2. Is BTLE available on mid end phones / tables as of today or only supported by the expensive high end models?3. FCC certification is valid point, basically the options are a BT chip, a module, an SOC or a breakout board.ARe there any licensing issues with BT products ..4. How many times would be BT LE be more power efficient than Wifi.

author: julianhigginson
author_rank: Frequent Contributor
timestamp: April 01, 2017, 12:26:52 pm
content: Quote from: ZeroResistance on April 01, 2017, 10:35:07 am1. yeah that should be OK... assuming you don't have too much other stuff happening nearby in the 2.45G ISM band at the time.... Just keep in mind that with BTLE between phone and device, all data transport is driven from the phone, and the link is basically setup and pulled down each time, so there's a bit of faffing around the transmission of a simple packet.2. do you mean one device with 10 sensors, or 10 BTLE devices connected to your phone all at once? That's a whole different world, if so....

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 01, 2017, 01:20:40 pm
content: Quote from: julianhigginson on April 01, 2017, 12:26:52 pmIts one device with 10 sensors.Would have any idea if Bluetooth LE has currently available on a whole load of phones already and that all new phones would BTLE support out of the box. ?

author: julianhigginson
author_rank: Frequent Contributor
timestamp: April 01, 2017, 10:28:57 pm
content: Quote from: ZeroResistance on April 01, 2017, 01:20:40 pmtime for you to research.

author: tszaboo
author_rank: Super Contributor
timestamp: April 01, 2017, 11:41:03 pm
content: Quote from: ZeroResistance on April 01, 2017, 10:43:25 am1. Almost any new phone will support it.2. Probably besides feature phones, everything4. A lot of times. BLE devices might have years of battery life. The ESP8266 draws half a watt, for BLE it is some 25 mW.There is one thing I hate about BLE. If you want anything than an other peripheral, like a smart appliance, or measurement tool, you need to write an App. For wifi, it can be a webpage which is loaded. But not for Bluetooth. There you need a stinking app for andoid, ios, windows, support it, update it... Since I'm not a programmer, this sounds like most boring stuff ever.

author: guenthert
author_rank: Frequent Contributor
timestamp: April 02, 2017, 04:44:29 pm
content: You explicitly stated that the communication peer would be a phone (or similar mobile computing device). You got plenty of information and advice above. I just wanted to mind you, if you ever need to communicate to PCs (remember those?) WiFi will bemucheasier, than BTLE. The Mooshimeter went the BTLE route and it's PITA to get it to work with a desktop (Windows 7 or Linux).

author: jnz
author_rank: Frequent Contributor
timestamp: April 02, 2017, 05:40:08 pm
content: Quote from: guenthert on April 02, 2017, 04:44:29 pmA bit of an issue you aren't accounting for is that, if you have a Wifi device, you need an input method that probably won't be wifi. That is, if you need to go into the device and give it parameters of which AP to join, password, and WAN settings you'll need a screen/buttons, or a usb interface, or you'll need to make your own device act as it's own AP with some default settings.BLE has none of that, you just make it the "AP" itself and connect. It's overlooked or taken for granted just why BLE exists. It's supposed to be painless to pair and set up. Wifi, not so much.

author: Howardlong
author_rank: Super Contributor
timestamp: April 02, 2017, 08:07:39 pm
content: Interestingly, for that very reason, I have seen new devices that have both BLE and WiFi, and use BLE to provide the AP details just so they can then connect via WiFi. It works, but it's still messy. As I alluded to earlier, getting a seemless WiFi connection to a headless device is a tough nut to crack.

author: janoc
author_rank: Super Contributor
timestamp: April 02, 2017, 09:27:15 pm
content: Quote from: guenthert on April 02, 2017, 04:44:29 pmThat's more an indictment of the uber crappy support for anything Bluetooth in Windows than anything else. BTLE is only somewhat officially supported in Win10 and even there the device must be paired. If the device operates without pairing (e.g. various beacons or sensors), you are screwed - support for that is only planned for the next major Win10 update. Older versions of Windows have to rely on vendor-specific non-standard implementations of the Bluetooth stacks - with corresponding results.BTLE in modern Linux is relative breeze - as long as you have a supported dongle, which can be a crapshoot. CSR-based dongles are usually fine. Few weeks ago I was making a BTLE pulse-oximeter work with Linux on a Raspberry Pi and no problem whatsoever.

author: jnz
author_rank: Frequent Contributor
timestamp: April 03, 2017, 04:22:36 pm
content: Quote from: NANDBlog on April 01, 2017, 11:41:03 pmTrue, although there are some workarounds here. There are "explorer" apps that allow characteristic read/write so long as you have service discovery on, so you can go that route. There is also "physical web" being pushed by Google, where Chrome can talk directly to BLE devices, no app required. We'll see if Apple follows suit with this, they won't until it gains steam or they have a product that is benefited by it somehow. There is a browser for IOS that allows the same, and maybe Google updates Chrome for iOS as well.The app side is a hurdle to BLE, no doubt. Then again, if you have a web guy, there is Cordova/PhoneGap to use webpages as the display and a BLE plugin that wraps to javascript.

author: ddavidebor
author_rank: Super Contributor
timestamp: April 03, 2017, 04:36:16 pm
content: What sort of energy consumption do you need?

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 03, 2017, 06:26:37 pm
content: Many Thanks for the answers and valuable comments.To summarizeBLE Pros1. Low power consumption.2. No need to do any AP settings.3. More Robust than Wifi due to frequency hopping (Marcohttps://www.eevblog.com/forum/microcontrollers/bt-le-vs-wifi/msg1177690/#msg1177690)BLE Cons1. Low throughput2. Only small chunks of data can be sent at a time.3. Need to write an app for mobile device.4. Number of mobile devices that have BLE is lower that those that have WLAN support.Wifi Pros1. Hi Throughput2. Can stream large chunks of data.3. No need for app, can use embedded web page.4. Almost every mobile device / tablet supports WLAN.Wifi Cons1. Power hungry2. Need to provide settings for AP connection etc.---------------------------------------------------------------------Please let me know if I have missed something here.1. Now lets say If I have access to mains power and need to go on battery backup when power fails does it make sense now to use Wifi?2. Does BTLE really restrict you to send small chunks of data at a lower rate or you can bypass all of that and send what you want if you don't really care about power consumption.3. For Wifi many experts on this thread had concerns had concerns regarding connecting a mobile device to a embedded device with wifi module. Is it really such a pain to paiir to another WLAN device, can't I make the android device a AP and have the embedded device connect to it. Or say if I have a router both the mobile device and the embedded device connect to the router.4. How do these rate as Wifi modulesa. Particle Photonb. WiFiMCUc. NodeMCUthese are WiFi + micro combos.

author: Marco
author_rank: Super Contributor
timestamp: April 03, 2017, 06:33:36 pm
content: One more pro for BLE, it's more robust because of the frequency hopping.

author: jnz
author_rank: Frequent Contributor
timestamp: April 03, 2017, 11:42:16 pm
content: Quote from: ZeroResistance on April 03, 2017, 06:26:37 pmUm... In theory maybe BLE is "more robust" than wifi. In practice, no way. Wifi might not have the same frequency hopping, but it does have age, and millions of man hours of developement into stacks. BLE is an up and comer, BLE is awesome, but I'd hardly say it's as "robust" as wifi. It's not even close in practice. Look at massively saturated wifi networks that just chug along, sometimes I'll lose a bluetooth connection from my while in my car.1. IMO while BLE is power sensitive and wifi is a piggy, just because you have infinite power doesn't immediately exclude wifi. Costs, size, availability, mcu platform etc would all be a big factor.2. It's REALLY time for you to go do some independent research. BLE's default MTU is ~23-~27 bytes with some overhead. Depending on device you can extend that for more info per connection interval but again, you should probably do your own research here. You can go to BLE-like protocols like ANT or Gazelle or ShockBurst if you need BLE but "better" (different).3. If you have a great way to do it, many people would like to see it. A lot of devices have a BLE connection and app JUST to get the wifi settings in (Withings Scales are one I know for certain). The easiest way I can think of, is to make your part act as an AP with known values (MYAPNAME, no security, channel 11, 2.4Ghz) connect, then use that to set an AP like your router it should connect to - Two issues, one this is sort of clunky and you'll need the code to become an AP and not just join one, that could be some overhead. Two, if this is going to retail customers - LOL - good luck with those tech support calls!4. N/A, I don't know any of them. But I do know you don't have the most widely supported module out there the ESP32, I don't like them because I'm not going to learn a new processor (Tenscillica) but for the cost and community, unbeatable.

author: Nusa
author_rank: Super Contributor
timestamp: April 04, 2017, 01:33:12 am
content: You haven't mentioned your range requirements at all. Phone implementations of BT or BT LE are generally for short-range use. Also, extending wifi range is well-developed off-the-shelf tech.