Master BLE Basics in Just 10 Minutes: The Ultimate Guide!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'll be covering the most important basics of bluetooth low energy ble in under 10 minutes if you're new to ble or you're just looking for a refresher then this video is for you hey guys mohammed affani here from novel bits and on this channel i help developers and engineers learn more about bluetooth low energy or ble and how to develop for this technology if you're new here and you're a developer interested in bluetooth low energy or ble then consider subscribing to this channel so you can be notified when i publish new videos and tutorials on this topic okay enough with the intro we have no time to waste so let's get started bluetooth started out as a short distance cable replacement technology and it was used mostly in audio streaming applications this bluetooth is currently referred to as classic bluetooth or br edr on the other hand ble or bluetooth low energy was introduced back in 2010 in version 4.0 of the bluetooth specification it was introduced to address the needs of applications in the internet of things or iot field a few important facts about ble first it focuses on low power consumption and battery powered devices second it operates in the ism band which is the industrial scientific and medical band the unlicensed band in the 2.4 gigahertz spectrum and this is the same spectrum that's occupied by wi-fi classic bluetooth and even other technologies third it is split into 40 channels in the rf spectrum three of these are called the primary advertisement channels while the 37 remaining channels are used for both secondary advertising data as well as for data transfer during connections there are few differences between ble and classic bluetooth first they are incompatible with each other so if you have a ble device and another classic bluetooth device then they cannot connect with each other or discover or communicate with each other the second is that ble is meant for data transfers that are more bursty in nature and do not require high bandwidth and third it's important to know that since the release of ble in 2010 the vast majority of updates to the bluetooth specification has been for ble more than verb classic bluetooth now let's talk about the different properties of ble and the first one we want to tackle is range the range of ble communication varies depending on the configuration being used which actually allows the developers to customize it to their needs and to the needs of the specific application in question this can range from a few meters to over one kilometer line of sight the specific mode that allows you to achieve over one kilometer of range utilizes a method for data recovery called forward error correction or fec this increases the range without the need to increase the transmit power the second property is power consumption ble achieves its low power consumption by turning off the radio as much as possible basically turning on the radio to send data and receive data and then going to sleep as fast as possible for as long as possible until the next data transfer happens the peak power consumption of the radio heavily depends on the chipset being used but in general you can achieve battery life of months and even years in some cases the third property we want to talk about is data throughput there are a few configurations for a ble device that affect the maximum data throughput achieved the highest data rate for the radio is the 2 megabit mode and in this mode the application data is a little bit lower than that due to overhead and some other aspects but you can expect to achieve up to 1.4 megabits per second or around that now keep in mind that range and data throughput are not mutually exclusive so if you do go for a higher range then you're affecting and you're reducing the data throughput that can be achieved and vice versa the fourth property is adaptive frequency hopping one of the unique characteristics of ble is its use of adaptive frequency hopping this allows ble devices to dynamically avoid collision and interference with other devices and signals in the 2.4 gigahertz spectrum in real time in my opinion the two major advantages of ple over other similar technologies is its ubiquitous support of in smartphones in the market as well as its open and free access to all the specification documents now we're going to introduce the four most important concepts in ble number one peripherals and centrals number two advertising and scanning number three connections and number four characteristics and services peripherals and centrals the peripheral is the device that sends out advertisement data for other devices to discover it whether that's to connect to it or even just to read its advertisement data now the central on the other hand is the device that discovers these advertisement packets and it could in some cases if the advertisement packet allows it to connect to that device one very popular use case of bluetooth devices that advertise and do not allow a connection is in bluetooth beacons these are used in retail marketing indoor navigation and many other applications a couple of things to keep in mind when it comes to centrals and peripherals the central is the device that takes on the heavy lifting in terms of controlling the timing and the parameters of able connection so it naturally consumes more power a ble device regardless of its role can have connections to multiple other devices this can mean that essential can have connections to multiple peripherals or a peripheral can have connections to multiple centrals and some devices like smartphones for example can have connections to both central and peripherals acting in the two roles advertising and scanning advertising mode is when a peripheral sends out data called advertisement packets for other devices to discover it this can mean that it could lead to a connection or it could be just simply for discovery and reading some of the advertisement data it does this by sending out the advertisement packets on the three primary advertising channels the central will be continuously scanning the three primary advertisement channels looking for advertising packets from other devices this means that the faster the advertisement packets are sent over the air the faster they can be discovered and the faster a connection can be made between a central and a peripheral keep in mind that there are different types of advertisement packets used some of these allow connections others do not allow connections and some even allow discovery and connections from specific centrals in the vicinity so what type of data could you expect in an advertisement packet there are multiple types but the most common ones are the device name tx power level the service is supported by a device and an appearance id which identifies the type of device on the peripheral side the key parameter involved with advertising is the advertising interval this ranges from 20 milliseconds all the way up to 10.24 seconds on the central side there are two key parameters involved with scanning and those are the scan window which defines how long to be scanning for advertising packets and the scan interval which defines how often to scan for advertisement packets connections for a connection to occur a few things need to happen first the peripheral needs to be sending out connectable advertisement packets and second the central needs to be scanning for advertisement packets on the primary advertising channels and third once the central sees a connectable advertisement packet it will send out a connection request and that's a packet that's sent out to the peripheral once the peripheral receives the request it will respond with a packet once the central receives this packet the connection is considered to be established and the two devices are connected the three key parameters involved with connections are connection interval which defines how often a central and a peripheral exchange data with each other second is the peripheral latency which used to be called slave latency and allows the peripheral to skip a certain number of connection intervals without the central dropping the connection and finally the supervision timeout which is used to detect and determine when a connection to a peripheral is lost finally services and characteristics and both of these are called attributes they define how the ble device organizes and structures the data that it exposes to other devices to discover it a characteristic represents a piece of information or data that a ble device wants to expose to another device examples of this include sensor readings or sensor data another example is a characteristic for allowing another device to control the behavior of the ble device that's exposing this data a service is a grouping of one or more characteristics and usually there's a logical grouping behind this so if you have related characteristics then usually there are grouped within one service and other services would have different types of characteristics that are unrelated for example you could have environmental data such as air quality humidity and temperature all represented by each by characteristic but all grouped within one service that maybe you call the environmental service now even if your current iot project does not utilize ble or there's no meaningful way to use ble in it you're still not wasting your time learning about this technology because ble has been improving and innovating and adding new features with each of the new specifications that are released for example bluetooth 5.0 brought us double the speed and four times the range bluetooth mesh was released back in 2017 and we have with bluetooth 5.1 the availability and the introduction of direction finding as well as 5.2 paving the way for the next generation of bluetooth audio now this barely scratched the surface on ble but i hope you guys got a good overview of the technology and helped you understand it a little bit more if you've enjoyed watching this video and you wanted to take your knowledge to the next step then i really encourage you to watch my other video on the skills that are needed to get started with developing bluetooth low energy applications and don't forget to subscribe to the channel to help keep the content coming and i'll see you guys in the next video
Info
Channel: Novel Bits
Views: 87,801
Rating: undefined out of 5
Keywords: bluetooth, bluetooth low energy, ble, iot, development, bluetooth low energy tutorial, bluetooth le, bluetooth low energy protocol, what is bluetooth low energy, bluetooth le technology, bluetooth smart, internet of things
Id: JSQhRyTKnW4
Channel Id: undefined
Length: 9min 14sec (554 seconds)
Published: Tue Jul 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.