Bluetooth Classic & BLE with ESP32
Learn to use Bluetooth Low Energy (BLE) and Bluetooth Classic with the ESP32.
Article with code: dronebotworksh...
More articles and tutorials: dronebotworksh...
Join the conversation on the forum: forum.dronebot...
Subscribe to the newsletter and stay in touch: dronebotworksh...
Bluetooth is a short-range, license-free wireless communications system used to connect mobile devices, sensors, computers, and peripherals. It is available in two “flavors”:
Bluetooth Classic - The original Bluetooth, great for audio streaming and data transfer.
Bluetooth Low Energy (BLE) - An ultra-low power system perfect for IoT and mobile applications.
The ESP32 supports both Classic and BLE; however, support differs between ESP32 models. Some ESP32 boards only support Classic, while others only support BLE. There is also a difference between the revisions of Bluetooth supported by different ESP32 chips.
Today, we will work with both Bluetooth Classic and BLE with the ESP32. We’ll start by learning how both systems operate and what libraries Espressif provides for working with Bluetooth in the Arduino IDE. We will then run some simple code examples for both types of Bluetooth.
By the end of the video, you will better understand how to build Bluetooth projects with the ESP32.
Here is the Table of Contents for today's video:
00:00 - Introduction
01:59 - Bluetooth & BLE
07:36 - ESP32 Boards
08:59 - Bluetooth Revisions
10:39 - ESP32 Differences
11:38 - Bluetooth Serial Terminal
12:23 - Classic Bluetooth & ESP32
16:26 - Bluetooth Device Discovery
20:29 - Bluetooth Serial Client
24:18 - BLE (Bluetooth Low Energy) & ESP32
28:41 - BLE Server
31:36 - BLE Client
35:54 - Conclusion
Incidentally, Bluetooth was named after an ancient King, Harald "Bluetooth" Gormsson, and the Bluetooth logo is formed from the Nordic characters for his initials. The king was famous for uniting Denmark and Norway, just as the communications protocol he inspired unites devices from different manufacturers.
Hope you enjoy the video!
Bill
Пікірлер: 76
My apologies for the delay in getting this video out, I started recording it over a month ago but had an accident that delayed finishing it. If you want all the gory details you can read about it in the Community section of the channel. The scenes with my face in this video were recorded the day before my accident, the voiceovers for the animations, and the demos were mostly recorded recently. The accident knocked out my two front teeth and required stitches on my lips, and as a result, my voice has changed, and I am finding it difficult to pronounce many words. I apologize if I sound a bit like Elmer Fudd is certain sections! Hopefully, the next video will be out shortly, and I hope you enjoy this one! Bill
@mvrkmi
2 ай бұрын
You sound fine Bill. Glad you're back in the saddle. Great explanation on ESP32 Bluetooth Classic & BLE. The asynchronous nature of BLE operations get kind of tricky when you start adding multiple services and/or characteristics. I found this out when I created my very first Android mobile app that connects to a XIAO ESP32S3 via BLE. Perhaps handling such a use case could be the topic of a follow-up video.
@supremeleader5516
2 ай бұрын
that's sad man, i hope you're okay now
@guyprovost
2 ай бұрын
Hope your fine, what an ordeal! Glad to see new vidoes!
@kunal7biz
2 ай бұрын
I hope you are doing well! Your videos are great and are most detailed on KZread.. please take care.
Glad to know you are recovering. Please rest and take your time! Get well soon!!
I am glad you're feeling better, you have been missed greatly.
Thank you for producing an article for this - I like to read things and absorb them - and also providing it in PDF format. Outstanding content + helpfulness. Legend! Hope you are continuing to heal up.
Very nice and simple explaining for the BT systems. Thank you very much. I enjoy all your videos and your great and simple but technical explanation. Very good!!! I will keep watching all your videos.
I saw the title and thought "must watch that" ... The video started and immediately thought "oh it's this guy again" and stopped what I was doing to watch properly. Loving your videos, thanks
Another fantastic tutorial breaking down a complex subject! Thank you. Your Audio I2S video and forum article were instrumental in me completing a successful Internet Clock Radio Project including making the stereo mod to the MAX amplifier modules. Thank you!
Glad your back 😊
Finally, BT Classic video. All the good tutorials are for BLE for some reason
Great to see you Bill, welcome back. Hopeful that you will fully recover soon. I hope your mother also recovered. No hurry on the videos, take care of yourself and your mother.
Very sorry to hear about the unexpected family issues via your recent newsletter. These came on top of your accident in April. Family and health come first, Dronebot Workshop content can wait. We will still all be here and, as you are always saying to us, take care and stay safe.
Thanks for the deep dive
Get well soon! Your health is more important. I appreciate a lot your videos. They are the most comprehensive for makers. Thanks a lot and take care!
I really appreciate the video; this talks about many of the issues I am wrestling with around Bluetooth. You do an excellent job providing practical, useful material. If I can add a relatively unimportant note about my (presumable) Scandinavian ancestor, the "Har" - Harald is pronounced like "Car". "Harr-alld", instead of "Hair-old"
Thank you. Excellent as always!
Glad to see you back and looking well. A thought for you - whenever you have an accident its always tempting to think "If only I hadn't done this or that" the other side of that thinking is perhaps you avoided a much worse situation by having this accident. Best not to dwell on it. Cheers
Good video, something to keep in mind is that although the esp32 supports BLE the low power part is not implemented meaning it will work but won't be low energy, at least in arduino with the current libraries
I appreciate how you make complex topics easy to understand!
@Dronebotworkshop
2 ай бұрын
Thank you, I appreciate that!
Oh man what a great timing, i am just starting my Final Year Project which require me to use Bluetooth in ESP32. thanks a lot
Hope you get better as always. Pls take good care of yourself.
You are a good teacher. Thank you. Hope you get better.
just to add to the list, there is also ESP32-C6 with BLE 5.x
Hope you feel better soon!
@Dronebotworkshop
2 ай бұрын
Thank you so much!
Thank you great work. Hope you recovered well. Your video explains things from the basics and I found my solutions from your detailed explanations. I thought any Bluetooth codes would work and I now know I need BLE related codes because of my ESP32-C chip.
Great to see you back! Many regards from the Netherlands
Thank you for the detailed video on BT
Glad you are back Bill, best wishes!
Greetings from Türkiye and we love your videos. Hope you well soon. I pray for you.
Got here by accident, but i'm glad I did! What a wonderful MASTERCLASS you have just presented on this video, I learned A LOT. Thank you soooooo much. I'm subscribing to your channel right now!!
I don’t know whether it’s fate or chance, every time I’m working on a diy project you come out with a very useful information, yes this one is still hard for me but if i elaborate I’m sure you can help me as I’m being a good student. I’ve build a diy speaker and a woofer, I want the two to communicate wirelessly, well I’m not good at coding but I’m happy with my speaker output as I managed to embed a DSP on its output. I want to make it more juice and make it trade blows with other expensive known speakers like JBL and Bose that’s why I want to find a way to program an ESP32 to receive and transmit data from the speaker to the woofer and get rid of the wires connecting the two devices, the woofer is separately amplified and so is the speaker that means both devices are powered but the wireless connection is the only challenge I still have. Best regards and thanks
BLE usually comes on top of a low power application (battery, energy harvesting)... I hear ESPs drain energy, especially when the radio is turned on (low energy or not). Nordic or silicon labs chips are the way to go for low power wireless application... Nice video though!
Wonderful like always❤
Great video. Provides a excellent knowledge base that can be built upon as you dive deeper. Very glad you are mending well and your voice sounded fine.
It's a shame more of the latest devices no longer support BT Classic as I have always found that to be really useful, especially as a simple wireless UART. Such a port makes an excellent debugging tool IMO
Thanks, Bill!
Hi, thanks for sharing
Glad to see you ok. You are the best!
I am speaking from Bangladesh. I watch your video.
Great Work
Very interesting video! I want to learn more about the ESP32-H series and its Bluetooth capabilities. I intend to convert my electric violin into wireless with Bluetooth 5.2 BLE and LC3 codec. Has anyone experience with the software implementation out there?
Danke! Great Videos, please keep making those.
@Dronebotworkshop
2 ай бұрын
Thank you so much, I'll try and keep making them!
Awesome Video. Can you maybe do a follow-up video by connecting some sensors to the esp32 and send it over bluetoorh and BLE. Be blessed.
Thinking of a topic to be, Data Logging from multiple BLE devices using ESP32
You are back! 🎉
Loved the overview & the details. What about some videos on Zigbee and using Amazon Echo (Alexa) for connecting and controlling projects? Voice controlled projects, yeah!
Hello, I'm glad you're doing better. What about the latency between the "classic" vs "Low Energy" BT ? Thank you for your videos.
Nice 👍🏻
Welcome back!
the amount of background research this man does is insane... hmmmmmmmmmmmmmmmm
Thanks!
@Dronebotworkshop
2 ай бұрын
You are very welcome!
Sir, please create video about object detection using gpt4o that runs in esp32cam. 🙏
Thank you for excellent video. I am going to use BLE for data streaming. Not audio, but transfer of heart signals. Basically I need to transfer 100 bytes per second. Is BLE a good replacement over classic BT to reduce power consumption ?
A cool Bluetooth video😎
Any thoughts what would be involved in writing an ESP32 application, that takes data from the uart, and passes it wirelessly either via bluetooth (SPP) or via Wifi? For Wifi, I imagine the ESP32 could act as a web server (TCP) and display the RS232 data, but maybe there's a UDP way it could send data to a PC on the same network? I imagine, if the receiving application (mobile or PC) is written in the flutter framework, it could display the RS232 data with style!
I think the BLE library stopped working after the last esp32 update. There is no problem creating the server, but the client code gives a "Stack smashing protect failure!" error and reboots.
Hello, can you make a video about EDM Machine, and how to make power supply? Thanks
Hi, i am beginner to esp32. I am trying to transfer file to sd card in esp32 development board using react native programming. is there any process to do so without any ftp or TCP or web server. please do guide me in this project. Thanks in advance.
Why Do You Turn the years, into Fractions ?
Grazie.
@Dronebotworkshop
2 ай бұрын
Prego!
Hi, I like this work shop
Hope your recovery is going apace
Hello everyone, does anyone know a channel that doesn't use existing libraries? I'm looking for an advanced coding, writing their own libraries.
👌👌👌👌👍👍
😆
Aha
We r very glad, u r now able to make video, thank God🎉
Hi, i am beginner to esp32. I am trying to transfer file to sd card in esp32 development board using react native programming. is there any process to do so without any ftp or TCP or web server. please do guide me in this project. Thanks in advance.