ESP32 BLE - Bluetooth Low Energy sending data to phone

  Переглядів 78,441

Asali

Asali

День тому

ESP32 Bluetooth Low Energy - BLE tutorial with the sparkfun esp32 thing, sending data to your phone.
All the code will be available on my Patreon page or can be found in the credits below:
/ 20837080
www.patreon.com/asali
Links:
Application used to test BLE connection:
play.google.com/store/apps/de...
Sparkfun ESP32 thing
Affiliate link: amzn.to/2SyQjsm
Normal link: goo.gl/abAiDf
Normal ESP32 (cheaper)
Affiliate link: amzn.to/2GTCHGS
Normal link: goo.gl/aNXDqi
In the end it doesn't really matter which ESP32 you are using as long as you change the "board" choice in the Arduino IDE to the correct board.
Arduino Uno Starter Kit (original version)
Affiliate link: amzn.to/2H4femD
Normal link: goo.gl/v4NFAU
Arduino Uno Starter Kit (cheap version)
Affiliate link: amzn.to/2R2a6Uu
Normal link: goo.gl/Z3Ekup
Arduino Uno
Affiliate link: amzn.to/2R47IwA
Normal link: goo.gl/mdSGRH
Credits:
Music:
Classique - Francis Preve
Video inspiration:
www.hackster.io/botletics/esp...
Thumbnail & video icon's:
ESP32 (created by myself)
Licensed by creativecommons.org/licenses/b...
Phone icon by www.freepik.com
Arrow icon by www.flaticon.com/authors/lyolya
Bluetooth icon by www.flaticon.com/authors/smas...

КОМЕНТАРІ: 82
@nutleysports88
@nutleysports88 3 роки тому
You got a new sub! Great work and thorough explanation!
@bryanethier1910
@bryanethier1910 4 роки тому
I like your style.Fast paced yet very clear.
@asali-channel
@asali-channel 4 роки тому
Thanks Bryan!
@robchojnacki177
@robchojnacki177 2 роки тому
Man, thank you. You saved me a lot of time. I was looking for BT example for M5Stick C Pro and I found it. Thx again.
@asali-channel
@asali-channel 2 роки тому
You're welcome!
@guilhermeartuzo7630
@guilhermeartuzo7630 4 роки тому
Your channel is great, you deserve way more subs !
@asali-channel
@asali-channel 4 роки тому
Thank you for your support! :)
@chipko
@chipko 4 роки тому
that was a great video - you will get many more subscribers with content like this :D Subbed
@asali-channel
@asali-channel 4 роки тому
Thanks for the support! :)
@MarianoPucheta
@MarianoPucheta 4 роки тому
Thank bro!
@jairoalbertoreyes
@jairoalbertoreyes 3 роки тому
Good video, how can I make a simple process a resend some data to the phone? For example, a humidity sensor and a light sensor send data to a device, and then the device sends these data to my phone via Bluetooth. Can a ESP32 be configured as Client and server at the same time? Thanks
@Antobarbunz
@Antobarbunz 2 роки тому
Important Tip: a) declare the server variable globally (above the declaration of the characteristic, for example) -> "BLEServer *pServer;" b) when you have to create the server, replace the line "BLEServer *pServer = BLEDevice::createServer();" -> "pServer = BLEDevice::createServer();" c) in the function "onDisconnect" start the advertising again, otherwise after the first connection the device will not be discoverable again, unless you reset the board. -> "void onDisconnect(BLEServer* pServer){ Serial.print("Disconnected"); deviceConnected = false; pServer->getAdvertising()->start(); };"
@rghrg
@rghrg 3 роки тому
Hi! Do you know any method to limit on the server the number of incomming connections (clients) to one? Thank you.
@kittenmagician7416
@kittenmagician7416 3 роки тому
I understand that this video is a couple of years old, but I am trying to do what it says in the video, but on my phone the received values are strings like 0xFD-FF-FF-FF instead of numerical values. Any idea why that might happen? I am using an ESP-WROOM-32E and my iPhone XR with the suggested nRF Connect app.
@kimoymilo3700
@kimoymilo3700 4 роки тому
Hi great video Asali, could you make a tutorial how to sends sensor data from esp32 to another esp32 via BLE? thank you
@asali-channel
@asali-channel 4 роки тому
Great idea! I will keep this in mind!
@user-wq1ff5yp7l
@user-wq1ff5yp7l Рік тому
Great explanation!!! However im working on a project where i need to transfer the audio (.wav) files from ESP32 to android device using python code??
@jaswanthcs
@jaswanthcs 4 роки тому
Hey, could you make a tutorial on making an app that receives data sent from the Esp32 via BLE?
@asali-channel
@asali-channel 4 роки тому
That's an interesting idea, I will try to make a video like this in the future!
@purplegirl6103
@purplegirl6103 2 роки тому
Hi, I have DEC value from color sensor so how to transfer it using BLE in ESP32
@vinaymama
@vinaymama 2 роки тому
Awesome Video... But Can we specify custom name for SERVICE and Characteristic
@miguelcandido4615
@miguelcandido4615 4 роки тому
Can i send images to a phone or computer with this?
@HoangDongHuynh
@HoangDongHuynh 5 років тому
Hello, Asali, Thank for your video. I have a question, Do esp32 can config passkey for Bluetooth? If yes, can we set our own passkey for it? Thank for your advice.
@asali-channel
@asali-channel 5 років тому
Hi there, thanks for your response, it looks like you can configure this for Bluetooth Low Energy, classic Bluetooth not sure tho. I advice you to read this and try for yourself, goodluck! goo.gl/2vic7r
@aishwaryakorade6382
@aishwaryakorade6382 4 роки тому
Is this possible to transfer file through ble in esp32
@axa.axa.
@axa.axa. 4 роки тому
I think instead of the affiliate links you should point viewers to eBay for hardware and then perhaps they could donate to you from all the money they save. That said I would encourage no one to donate using patreon due to their practices of censorship. Also there are many videos demonstrating the common used function of Neil Kolban's ble libraries. I think a great video would be one explaining the use of all the functions no one else talks about.
@asali-channel
@asali-channel 4 роки тому
You have some great ideas but at the moment Patreon allows me to give back to the people who donate to me such as code, explanation, schematics etc! And thank you I will be taking a closer look into Neil Kolban's ble libraries!
@navieff
@navieff 4 роки тому
Hello Asali, can you please tell me how long the maximum distance we can achieve with esp32?
@asali-channel
@asali-channel 4 роки тому
The max distance for bluetooth on the ESP32 should be around 10 meters
@peterwhalley5236
@peterwhalley5236 3 роки тому
I appreciate the effort and information but you need to re-load with a 'more standard' audio level. Audio is barely audible even with all gains at max. And yes, 'every' other video is blasting at all gains max setting.
@saralsaha7938
@saralsaha7938 5 років тому
Nice Video
@asali-channel
@asali-channel 5 років тому
Thanks buddy!
@saralsaha7938
@saralsaha7938 5 років тому
@@asali-channel i want to send two different sensors value through BLE. could you make another video or guide me for this.
@asali-channel
@asali-channel 5 років тому
@@saralsaha7938 Try to send your value as an array or otherwise put them in a string and divide them with a , or - and once you receive your string you can simply split the string into two parts, hope this helps you out!
@Faheem1988
@Faheem1988 3 роки тому
can we do it send data from phone to device
@MrArdo-branch-main
@MrArdo-branch-main Рік тому
Honto ni Arigato gaozaimasu 💕💕💕
@sudhagarp7237
@sudhagarp7237 2 роки тому
Hey asali used the same code as you used in the video didn't get the correct output
@SA-oj3bo
@SA-oj3bo 11 місяців тому
Hi Asali, I would like to replace HM10 by the ESP32 BLE so that the existing Android and IOS app's can be used without the need of the HM10. Can you or someone here give some advice please? I changed the UUID's already but that seems not enough. How to modify the code to replace the HM10? Thx.
@anupnadagouda8240
@anupnadagouda8240 3 роки тому
I am using ESP32 RTOS and I am using eclipse IDE. I am struggling to send data via Bluetooth can you help me how to do this
@ajayrajan8882
@ajayrajan8882 4 роки тому
how did you generate the service and characteristic UUID?
@asali-channel
@asali-channel 4 роки тому
The UUID is just a random GUID meaning you can adjust it to your liking
@razasohail5020
@razasohail5020 5 років тому
Hi, I followed all your steps but inside the app, the nordic option is not available. What should I do?
@asali-channel
@asali-channel 5 років тому
Sorry for the late response, are you sure you were connected to the device or did you figure it out by yourself? Let me know I'm happy to help you out!
@dhanashrihinge5393
@dhanashrihinge5393 11 місяців тому
adding voice will be more interactive
@Metroid1890
@Metroid1890 5 років тому
What is the name of the library we have to include?
@asali-channel
@asali-channel 5 років тому
#include #include #include #include
@greyMDA
@greyMDA 2 роки тому
can i set the phone (client) to act like a predefined service, knowing his UUID?
@mountrat
@mountrat Місяць тому
Is it possible to live stream Voice Audio using esp32 BLE? If yes, can you please guide me?
@mountrat
@mountrat Місяць тому
And also I need to play that live streamed audio on native Java / kotlin android app. So how to setup the characteristics and services.
@shashih9130
@shashih9130 4 роки тому
Hello Asali, Can i transfer stored data in flash memory via Bluetooth?
@asali-channel
@asali-channel 4 роки тому
I'm pretty sure you can, you'll just have to combine the code on your own! Here's my video on how to save data to you flash memory: ukposts.info/have/v-deo/oXd0iWawpaGdwIE.html
@nanetin9843
@nanetin9843 5 років тому
What is pServer, and what is the difference between pServer and *pServer. Also I don't know what the "->" means. If you could help me out that would be awesome. Thanks!
@asali-channel
@asali-channel 5 років тому
"->" is called an arrow operator as explained here: goo.gl/scoLmk or goo.gl/eNwFuv The * has to do with pointers as seen in this example: goo.gl/E2DYci These are a few "basic" things of the c syntax so if the explanation on either sites don't make sense to you then I suggest you research it and make a few examples yourself trying them out! Or search for a UKposts tutorial ;)
@devinjones3350
@devinjones3350 Рік тому
How to send data to select client only
@vantasy5335
@vantasy5335 5 років тому
It would be handy if you could link the app in the description :)
@asali-channel
@asali-channel 5 років тому
Added in the description, thanks for the heads up!
@vantasy5335
@vantasy5335 5 років тому
@@asali-channel No problem man! Keep up the great work!
@gustavoalbino8422
@gustavoalbino8422 4 роки тому
Nice video! I found many tutorials showing how send data from esp to another device using BLE. But I would like to know if that is possible to send data from the cellphone to the esp32. In my case I want to receive from the cellphone the wifi network name and password which the esp32 must connect. Can someone help me?
@asali-channel
@asali-channel 4 роки тому
I'm not sure, have you tried reading this article on reddit? bit.ly/2AR32j1
@gustavoalbino8422
@gustavoalbino8422 4 роки тому
I forgot to comment here, but later I got it! But thanks for the article, I'll read that later.
@christopherlawes9286
@christopherlawes9286 4 роки тому
Gustavo Albino how do you do it? Would be a great feature. Thanks
@williamsabates4023
@williamsabates4023 3 роки тому
@@gustavoalbino8422 How did you do it ?
@gustavoalbino8422
@gustavoalbino8422 3 роки тому
@@williamsabates4023 Hello Mr. Sabates. It's been a long time since I did this proof-of-concept program for a subject on the university. But, for what I remember, I used a library called BluetoothSerial.h. In my case in the middle of the program the esp32 print via Bluetooth the request for the network name giving all the available connections with an index. Then, it would enter a loop waiting for something on the ESP_BT.available() method from the library, which would pass any character sent I think. To send the data from the cellphone I downloaded an simple bluetooth prompt app. Sorry to not be able to give a propper explanation, but I think you will find some tutorials on the internet searching for the library. If you dont, you can give me your email and I can send you a test script we used that time.
@user-ke2ih7xr5g
@user-ke2ih7xr5g Місяць тому
BLE is not showing name in IOS Bluetooth but showing in android how to solve this issue
@bryndentully9235
@bryndentully9235 Рік тому
3:12 how to know the UUID number?
@bryndentully9235
@bryndentully9235 Рік тому
update: you can give random uuid's
@diegoherrera2358
@diegoherrera2358 4 роки тому
send data to another esp32
@das250250
@das250250 4 роки тому
This is a good video for copy and paste solution but it doesn't explain the format of the code being used and how you found what commands you were using and the syntax like * and -> and what that is. In effect it isn't teaching anyone how to do it but simply how to copy which has no real knowledge.
@asali-channel
@asali-channel 4 роки тому
I credited the source at the credit section of my description, indeed I should have explained some parts more.
@letrainavapeur
@letrainavapeur 3 роки тому
Audio is very quiet
@KJMcLaws
@KJMcLaws Рік тому
I had to get headphones to understand what he was saying
@leef_me8112
@leef_me8112 2 роки тому
1:13 The proper spelling is Schematic
@asali-channel
@asali-channel 2 роки тому
Oh wow thanks, in these 2 years I never noticed this mistake, now I can't unsee it!
@leef_me8112
@leef_me8112 2 роки тому
@@asali-channel My suggestion is that you have a script for what you plan to say and notes on what you plan to "display" . And always run any text that you display through a spell-check. Even teh simplest word could easily be misspelled. Spell-check could be as simple as a word processor, or google.
@asali-channel
@asali-channel 2 роки тому
Thanks for the advice! I'll start writing down my display text aswell!
@leef_me8112
@leef_me8112 2 роки тому
@@asali-channel Write it down and spell-check it as well.
@madlineentertainment3390
@madlineentertainment3390 4 роки тому
sir , how are you ? would you kindly answer my question ? or just tell is my idea possible or just give up so I'm currently working on a project from long time ago that was devastating and depressing for me , i will tell you the idea and what progress I made through the past 6 weeks and see if you can lead or help me ,, so the idea is I'm currently connecting esp32 Arduino board with six senses , 5 of them are flex sensors and one of them is the mpu6050 sensor which reads the angle of x y and z I was able to connect those sensors to esp32 and read all the values on the serial monitor as you can see below the code and the serial monitor ,in Arduino IDE ibb.co/92qBsh0 now my next step that I didn't know how to do is : I want to send those data, the serial monitor data continuously every 6 second to raspberry pi via the Bluetooth of the esp32 to the Bluetooth of the raspberry pi in order to program those data , i want to program those data to an LCD and a speaker , For example if I received the following values from the esp32 I want the Res pi to put a certain word to the LCD screen and and then convert it to speech through the speaker , I already connected the LCD to the raspberry pi. , but now how I can send the serial monitor data continuously to the pi via Bluetooth so I can program it
@gachingoy
@gachingoy 4 роки тому
useless if u cant do shit with the data on yo phone
@asali-channel
@asali-channel 4 роки тому
This tutorial was how to program the esp32 sending data to the phone, not how to write a complete app and do something with the data aswell
BLE Advertising как средство передачи данных
26:55
Level 1 to 100 Mystery Buttons
00:46
A4
Переглядів 7 млн
Їжа Закарпаття. Великий Гід.
1:00:29
Мiша Кацурiн
Переглядів 639 тис.
Led dance floors
39:36
Grace Stage Lighting
Переглядів 132
Master BLE Basics in Just 10 Minutes: The Ultimate Guide!
9:15
Novel Bits
Переглядів 86 тис.
BLE with ESP32 tutorial part 1: the Server
25:23
MoThunderz
Переглядів 69 тис.
#173 ESP32 Bluetooth BLE with  Arduino IDE (Tutorial) and Polar H7
15:55
Andreas Spiess
Переглядів 170 тис.
Introduction to ESP32 - Getting Started
47:57
DroneBot Workshop
Переглядів 1,5 млн
ESP32 Technical Tutorials: BLE and C++
13:22
Kolban Technical Tutorials
Переглядів 34 тис.
Level 1 to 100 Mystery Buttons
00:46
A4
Переглядів 7 млн