#173

  Переглядів 169,837

Andreas Spiess

Andreas Spiess

День тому

So far, we had to use Espressif’s tools to use Bluetooth on the ESP32. Today I will try it with the Arduino IDE. I am curious how it will work. Maybe you come with me on this discovery tour? For sure, we will learn a lot about how Bluetooth low energy, or BLE, works.
In this video we will cover:
- The basics of Bluetooth Low energy
- The different roles of devices
- How we debug BLE connections using our Smartphone
- We will build a notifier and a client
- We will try to fake a Polar H7 Heart Rate monitor (at least, the BLE part
- If we have time, we will have a look at An iTag Chain finder and a Xiaomi Flower care system
- And maybe we will discover some “secret sauces” necessary for a delicious meal?
Links:
BLE services: www.bluetooth.com/specificati...
Neil Kolban Github: github.com/nkolban
Neil Kolban books: leanpub.com/u/kolban
ESP32 Development Board: bit.ly/2sOMR3E
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com/sensorsiot
If you want to support the channel and buy from Banggood use this link to start your shopping: bit.ly/2jAQEf4 (no additional charges for you)
Official Wemos Store: s.click.aliexpress.com/e/jUzBiIq
profile.php?...
/ spiessa
www.instructables.com/member/...
Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my main job
If you want to buy me a coffee: www.paypal.me/AndreasSpiess

КОМЕНТАРІ: 357
@ThomasHaberkorn
@ThomasHaberkorn 6 років тому
Please continue your BLE effort! Thank you for your support.
@AndreasSpiess
@AndreasSpiess 6 років тому
I will!
@SinanAkkoyun
@SinanAkkoyun 4 роки тому
@@AndreasSpiess Please make them connect with wireless speakers (wireless headset)
@bobbyjose2265
@bobbyjose2265 3 роки тому
@@SinanAkkoyun BLE cannot be used to da that. BLE is used for sending small periodic data and not connecting to speakers require Bluetooth serial.
@CristiIstrate
@CristiIstrate 6 років тому
Nice introduction in BLE. I hope you make more on this topic as I am very interested.
@AndreasSpiess
@AndreasSpiess 6 років тому
I will!
@knightautomation2020
@knightautomation2020 3 роки тому
Thank you so much for your Efforts! This video was very useful to understand BLE ! Keep making more Video!
@africanwizz1842
@africanwizz1842 6 років тому
Thanks for the video, it's great that you show the fails as well!
@AndreasSpiess
@AndreasSpiess 6 років тому
And they happen more than you can imagine ;-)
@deangreenhough3479
@deangreenhough3479 6 років тому
Congratulations on 50k subscribers. Very well deserved and the quality just keeps getting better. You sir are always my number 1 to go to for information first! Eternally grateful and appreciative of your outstanding work. Merry Xmas to all the intelligent people that follow your work and of course to our very own Electronics Father Xmas whom delivers a present every Sunday on the dot 🙏
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you for your continued support. But for this Christmas (because it is a Sunday), I do not plan a video. This is my one week UKposts holiday this year. And I hope, that most people anyway would not have the time to watch my video...
@Nabilphysics
@Nabilphysics Рік тому
NOW 390K Subscriber
@giaras64
@giaras64 6 років тому
Excellent work as usual Andreas. I had some experience with modules such as HC08, but working with esp32 is a completely different and better world. Thanks a lot
@AndreasSpiess
@AndreasSpiess 6 років тому
You are welcome!
@sorin.n
@sorin.n 6 років тому
Hello Andreas, Congrats for one of the best introductory videos I could find on BLE! There are ble devices allowing discovery and pairing even if they are already paired. Kind of promiscuous, but that's life! :))
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks for your info. I did not know that. As I mentioned, I am still scratching at the surface...
@deangreenhough3479
@deangreenhough3479 6 років тому
Morning Andreas😀 Great work yet again my friend👍👍👍👍 Your amazing 👈
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks, Dean. I finally subscribed to your channel. You officially doubled the number of subscribers!
@seba123321
@seba123321 4 роки тому
Really, really THANK YOU for your work. Whole work. I learn so much from you.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are welcome!
@ryancsumner
@ryancsumner 2 роки тому
Great intro - I really needed it. I always giggle at the dry humor. I wish I had more secret sauce.
@AndreasSpiess
@AndreasSpiess 2 роки тому
Glad you liked it!
@squall513
@squall513 6 років тому
Thank you for the video! A great watch and you've taught so much in so little time.
@AndreasSpiess
@AndreasSpiess 6 років тому
You are welcome!
@PhG1961
@PhG1961 6 років тому
Interesting, looking forward for the next video(s) on this topic.
@AndreasSpiess
@AndreasSpiess 6 років тому
I am sure they will come...
@morpheuz2006
@morpheuz2006 6 років тому
waiting for xiaomi band 2 :D.. continue the nice work i learn so much from you
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you
@Zalo29
@Zalo29 5 років тому
Nice work, my friend. Keep exploring, please!
@AndreasSpiess
@AndreasSpiess 5 років тому
Thank you!
@SeanHodgins
@SeanHodgins 6 років тому
That was very helpful. I have a quite a few projects that could benefit from more knowledge in BLE technology.
@AndreasSpiess
@AndreasSpiess 6 років тому
We all have such ideas. But it is still a way to go till we will master it as we master Wi-Fi now.
@omaryanas435949
@omaryanas435949 6 років тому
I came, I liked, I watched. Thnx Andreas
@AndreasSpiess
@AndreasSpiess 6 років тому
:-)
@dougmanatt4317
@dougmanatt4317 6 років тому
So many fun references to others great youtube channels!
@AndreasSpiess
@AndreasSpiess 6 років тому
:-)
@das250250
@das250250 5 років тому
I think this is a topic worth continuing with and sharing because it is such a strong communication taking any data from esp32 to a mobile which then can do all sorts of things - communicate easily via - txt - sm- email - to -wifi and easy access to screen display and data storage on phone sd card. Phones are so cheap that is really becomes the interface to use.
@AndreasSpiess
@AndreasSpiess 5 років тому
Maybe I will continue the topic. But only if Espressif did a good job on the library...
@das250250
@das250250 5 років тому
@@AndreasSpiess I have found it difficult to get my head around the details of BLE programming.
@stupossibleify
@stupossibleify 6 років тому
Andreas, your videos are superb!
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you!
@MegaTraxxas
@MegaTraxxas Рік тому
This tutorial is super useful, thank you!
@AndreasSpiess
@AndreasSpiess Рік тому
You're welcome!
@RETRODISTORT
@RETRODISTORT 6 років тому
Great video as always! Finally a good bluetooth tutorial. So excited for part 2! :) P.S. I'm a lazy nerd. I use water with salt to make fake sweat (fast and easy way to make a electrolyte solution) xD
@AndreasSpiess
@AndreasSpiess 6 років тому
Concerning water and salt: This is what I also did at the end ;-)
@hansschenker
@hansschenker 6 років тому
Please keep on with BLE! It will have a bright future!
@AndreasSpiess
@AndreasSpiess 6 років тому
You can bet on this one. I am very interested and worked nearly the whole week on it...
@renatotrevizan7157
@renatotrevizan7157 4 роки тому
Your video is great! Thank you so much!
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are welcome!
@nickp6857
@nickp6857 4 роки тому
Thank you so much for this great explanation and showcasing! This really helped me with my project :)
@AndreasSpiess
@AndreasSpiess 4 роки тому
You're very welcome!
@nickp6857
@nickp6857 4 роки тому
@@AndreasSpiess I'm currently building a prototype to show users feedback of their handwashing behavior for my master's thesis. I never thought that this could get as relevant as it got now ^^
@AndreasSpiess
@AndreasSpiess 4 роки тому
I assume you have to hurry-up ;-)
@nickp6857
@nickp6857 4 роки тому
@@AndreasSpiess Well I would hurry up but unfortunately the university is closed down at the moment due to the virus.. I am using the time during quarantine to learn how to use BLE to communicate between the different sensors. I'm using the Bluefruit feather by Adafruit which is pretty great for newbies like me :)
@genesisbradley1361
@genesisbradley1361 2 роки тому
I dont mean to be offtopic but does anyone know of a trick to log back into an Instagram account? I somehow forgot my account password. I appreciate any assistance you can offer me
@Eman6240
@Eman6240 6 років тому
Nice video, love your style :)
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you!
@martinrobotz2137
@martinrobotz2137 6 років тому
Very useful tutorial on BLE, not the usual IoT stuff for internet connected nonsense gadgets. While IoT has no more secrets left, BLE is still a mistery for makers. Because there is no literature on Arduino BLE this video is a valueable knowledge base.
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks! And I hope, I can continue this way...
@avejst
@avejst 6 років тому
Thanks for sharing 😀👍
@AndreasSpiess
@AndreasSpiess 6 років тому
And thanks for you support!
@richardamullens
@richardamullens 6 років тому
I bought a SHT31 Smart Gadget Development Kit (humidity sensor). Bluetooth is ubiquitous so thanks for prompting me to get it working.
@AndreasSpiess
@AndreasSpiess 6 років тому
:-)
@nburton01
@nburton01 6 років тому
Managed to get the UART example working for tx rx. by using the BLE Scanner app on an iPhone. Also got it to pair with a raspberry pi3, didn’t get any farther though. Think there’s a good Python Bluetooth library so might give that a try on the pi3 Always found bluetooth a bit complicated but with the esp-32 it could be very useful for battery powered projects. So probably worth spending a bit more time with it. Thanks again for another great video.
@AndreasSpiess
@AndreasSpiess 6 років тому
Maybe I also will go the RPI route. We will see...
@pionyir
@pionyir 3 роки тому
Great tutorial! thanks
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are welcome
@SA-oj3bo
@SA-oj3bo 6 років тому
Hi Andreas, nice to see the first video about BLuetooth with ESP. Can I suggest an interesting subject for a future video? The Chinese manufacturers of ESP based products all use "SmartConfig", a clever way to connect in seconds a new ESP with a smartphone and cloud on any WiFi network, without the need to go to the ESP by webinterface or serial. They use some UDP broadcasting by the App if I understand it correctly, that includes the WiFi credentials in the packet. Unfortunately I can not find a lot about it and would like to understand it better, I think it is interesting for all your viewers too....thanks in advance!
@AndreasSpiess
@AndreasSpiess 6 років тому
I do not know this. Can you help me with some more info to give me a quicker start?
@SA-oj3bo
@SA-oj3bo 6 років тому
There is not a lot available, it is a bit mysterious, but I see it more and more used in the Chinese products and App's. It seems to be part of the Espressif functions. For Arduino I found : tzapu.com/esp8266-smart-config-esp-touch-arduino-ide/ Hope that helps. Thanks in advance. Wim
@SA-oj3bo
@SA-oj3bo 6 років тому
www.espressif.com/sites/default/files/30b-esp-touch_user_guide_en_v1.1_20160412_0.pdf
@manecourquhart3242
@manecourquhart3242 6 років тому
great video Andreas!!!
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you!
@charlesdorval394
@charlesdorval394 6 років тому
Damn, I need a new phone... :P Very interesting video, as always ! :)
@AndreasSpiess
@AndreasSpiess 6 років тому
:-))
@sladkii_bubalekh
@sladkii_bubalekh 6 років тому
Hi, mr. Spiess. I think I know the main reason why your watch did not recognize the ESP32. The main reason could be simple: The data format sent by the ESP32. I've checked the official description of "org.bluetooth.characteristic.heart_rate_measurement" and find the "Heart Rate Value Format bit", which is setting the "org.bluetooth.unit.period.beats_per_minute" value type to UINT8 or to UINT16. "Note: The format of the Heart Rate Measurement Value field is dependent upon bit 0 of the Flags field."
@chegewaras
@chegewaras 6 років тому
You are close. You have to understand what data are sent by heart rate monitor to fake it. Its not enough to send just some number value which simulates heart rate, there is more to send and then watch will interpret those values and display it.
@sladkii_bubalekh
@sladkii_bubalekh 6 років тому
Yeah, you're right. To emulate such a device like Polar HRM we need the proper data simulation. At 5:42 we can see 3 parameters: actual heart rate, contact detection and R-R interval. But at 10:15 we can see only 1 parameter. At the end of the docs for Heart Rate Measurement there is a remark: "The fields in the above table are in the order of LSO to MSO. Where LSO = Least Significant Octet and MSO = Most Significant Octet.". It means, now we now the basic packet structure of Heart Rate Measurement. For exmaple (UINT8, No Energy Expended): 0x68, 0x4B, 0x03, 0x48 (this is octet-based packet, so R-R interval is splited for 2 octets). If you want, I can explain this strange numbers above.
@sladkii_bubalekh
@sladkii_bubalekh 6 років тому
I think, I could miss the point with LSO and MSO (I could make a mistake in the order of bits when translating into hexadecimal code)
@chegewaras
@chegewaras 6 років тому
Close enough.
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you for your help. I will come back if I go the H7 route further (or go the "issues" way on Neil's GitHub). For the moment, I am still learning the basic basics. But it is good to know that I have viewers with much more knowledge.
@zerog2000
@zerog2000 6 років тому
Another great smartphone util for ble is LightBlue. Bluetooth like usb is incredibly over engineered, and thus have a steep learning curve, but that’s also probably why both of these protocols have persisted for many years!
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks for the lightblue tip. Seems also to be a good product!
@PhDFernandoCoach
@PhDFernandoCoach 6 років тому
Great tutorial!! Is there any video about the HM-10 or any other bluetooth 4.0 module? Thanks!!
@AndreasSpiess
@AndreasSpiess 6 років тому
Not yet
@opless
@opless 6 років тому
I was hoping you'd take apart the keyfinder widget :-) I'm guessing it's an nRF51 part. Great Video as always Andreas!
@AndreasSpiess
@AndreasSpiess 6 років тому
Unfortunately, it is my only one. This channel is not known to take things apart, more to build things. But looking at the numbers of such channels, maybe I will change my opinion ;-)
@kinetic1259
@kinetic1259 3 роки тому
@Andreas, the older polar hr straps connect via a low frequency transmission (5khz) called gymlink that is coded, not sure which watch you have, but it looks like this will likely be the case. Like the h10 strap, you'll find the h7 is Bluetooth AND polar proprietary coded transmission, so the watch isn't picking up BLE, it's looking for the polar gymlink transmission at 5khz, that's why you couldn't connect it, you were a couple of MHz off 😁 Not to worry, the polar app phone functions are much better than the watch anyway!
@kinetic1259
@kinetic1259 3 роки тому
Polar still use 5khz because it makes HR strap useable underwater. ANT+ and BT are 2.4ghz and far too high frequency to penetrate water.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I do not know. For sure the watch communicates with my smartphone using BLE.
@spikeydapikey1483
@spikeydapikey1483 6 років тому
Great AvE reference :oD
@electron-1979
@electron-1979 6 років тому
Skookum
@AndreasSpiess
@AndreasSpiess 6 років тому
:-)
@zerog2000
@zerog2000 6 років тому
Yeah I can’t watch ave with kids around. Thankfully the Swiss guy is more family friendly.
@tedder42
@tedder42 6 років тому
chooch
@andremuensti4730
@andremuensti4730 6 років тому
Hello Andreas , as always very good! Is there a possibility (example) for an SPP profile - to send text? RFCOMM protocol
@AndreasSpiess
@AndreasSpiess 6 років тому
You will see a video about UART BLE soon
@RainAndy
@RainAndy 6 років тому
Best use for BLE-enabled esp32 would be presence sensor that detects phone. If phone is within the range - HomeAlarm is deactivated, or something like that. Do you think you can implement it?
@grindel80
@grindel80 6 років тому
Would be really really nice to have a MQTTconnected presence sensor. Or maybe a WLAN connected, also??
@RainAndy
@RainAndy 6 років тому
Use BLE to detect phone, since it won't make any significant impact on phone's battery, and then use WiFi to deliver data to automation hub via MQTT, at least that's what I have in mind. Same way car requests to pair and automatically pairs with the phone when you start it if you've paired your device beforehand.
@Wowthatsfail
@Wowthatsfail 6 років тому
Andrew Rain that's too easy to break into with just a laptop
@RainAndy
@RainAndy 6 років тому
Well, not really. Yes, PIN is only 6 digits but you can setup timeouts or even better - MAC address check.
@AndreasSpiess
@AndreasSpiess 6 років тому
I already did a Wi-Fi sniffer with MQTT and maybe, one day, I will be able to offer a similar Bluetooth sniffer. Who knows?
@mispeaced
@mispeaced 6 років тому
Polar uses 4 protocols - GymLink (non-coded), GymLink, Wind, Bluetooth. Your FT60 watch is only compatible with GymLink heart rate devices (T31,H1,H2,H7,H10), it doesn't work over BLE. And H7 sensor provides both GymLink+Bluetooth compatibility. So, H7 works over GymLink with your FT60 watch and over Bluetooth with smartphones/esp32/. This info can be found here: support.polar.com/en/support/compatibility_with_my_Polar How do I know that? I also owe H7 + FT4 watch (GymLink only) :) And thanks for another great video!
@AndreasSpiess
@AndreasSpiess 6 років тому
You are absolutely right! Thank you for your hint. Saves me time! Now I remember that I had to buy the H7 in addition to the normal sensor a few years ago because I wanted to use it with the iPhone. I am getting old...
@fiachra06
@fiachra06 6 років тому
So it’s possible that polar have what is like a subdomain of Bluetooth mac addresses and the watch won’t connect to any device outside that domain. That’s how we did it with ours. As you learned, without direct disconnection ble will assume it’s still connected the other device has just gone out of range ( I think timeouts are pretty long). While connected it won’t transmit advertising packets and (I think) will refuse other direct connections. The other think to contend with when trying to spoof commercial devices is pairing is different between BLE and BT Classic but depending on how their security is setup there’s usually a handshake that involves key exchanges and the server adding the clients to a trusted device list. All in all BLE is way easier to work with than classic but it does have some really irritating gotchas that are very confusing.
@AndreasSpiess
@AndreasSpiess 6 років тому
Thank you for your insight. It explains a few things for me. I still have to learn a lot and there is not a lot of info out there, or it is so complicated I do not understand it. So I will try to go step by step...
@thomasbland6428
@thomasbland6428 6 років тому
The high order 24 bits of the UUID is the company code similar to how MAC addresses have an assigned company code in the high order bits. The low order 24 bits are supposed to be unique per device and allows a company to manufacture over 16 billion devices before running out of available UUIDs.
@bernard-charlesbarrois5265
@bernard-charlesbarrois5265 3 роки тому
Hi Andreas, Some news ? Did you try the "ESP-NOW" ?
@anlumo1
@anlumo1 6 років тому
Are you including the service in the announcement? This could be the problem why some devices can't find the BLE server.
@AndreasSpiess
@AndreasSpiess 6 років тому
I think so, but I am still scratching at the surface... There are other suggestions what can go wrong. So, still, a lot to be done.
@manickn6819
@manickn6819 6 років тому
This is interesting but I have a lot of groundwork before I can understand properly. This is definitely on my watch over list.
@AndreasSpiess
@AndreasSpiess 6 років тому
So we are two with lots of learning in front of us ;-)
@xanokothe
@xanokothe 6 років тому
This library is pretty good! Thank's for sharing. BTW: Too much secret sauce in the UUIDs. It reminds me of SNMP OIDs (I hate SNMP).
@AndreasSpiess
@AndreasSpiess 6 років тому
:-)
@ytfp
@ytfp 6 років тому
Good reminder of why I don't muck around with BLE, just not there yet. The only thing that is dissapointing is by the time something is figured out, something new is out.
@AndreasSpiess
@AndreasSpiess 6 років тому
Each technology has its "bleeding edge" where only a few join. Hopefully, BLE on the ESP32 will be mainstream soon...
@asiw
@asiw 6 років тому
Excellent.
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks!
@ankitrana5855
@ankitrana5855 5 років тому
Hello Sir can you explain(with practical example) or provide a source to understand ALL about GATT more specifically GATT Declarations, Descriptors(how and where they are used) and in detail about UUID?
@AndreasSpiess
@AndreasSpiess 5 років тому
I have a few videos about BLE. Or you search with Google.
@Jdragunov
@Jdragunov 6 років тому
Good video, i will try to do something like this with a glucometer to download the data and populate a spreadshieet with it, need it for further analysis
@AndreasSpiess
@AndreasSpiess 6 років тому
Please keep us posted if you are successful!
@emiliorubiogarcia170
@emiliorubiogarcia170 3 роки тому
Hi, Have u ever worked on HM-1x BLE 5.0 modules? I am trying to work with HM-18 module with Arduino Mega and it's quite difficult to find info about it. Thank you very much in advance and thank you for your wonderful videos.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I never used these modules so far.
@MPElectronique
@MPElectronique 6 років тому
Andreas, what version of Arduino IDE you have ? Thank you. Marc.
@AndreasSpiess
@AndreasSpiess 6 років тому
1.8.5
@Anton-cv2ti
@Anton-cv2ti 5 років тому
You can also go to chrome://bluetooth-internals/#devices in your chrome browser to debug BLE. I think it has the same feature-set as the app
@AndreasSpiess
@AndreasSpiess 5 років тому
Interesting link. Thank you. I will try it next time I work with BLE
@XsavioR38
@XsavioR38 4 роки тому
epic , ty sir
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are welcome!
@hward1973
@hward1973 5 років тому
Would you happen to know of a simpler tutorial that would just turn on a led when a known address is seen and then turns it back offf when the known device leaves? Thanks PS love watching your videos
@AndreasSpiess
@AndreasSpiess 5 років тому
BLE seems never to be simple :-( Therefore I do not know a simpler one.
@hward1973
@hward1973 5 років тому
@@AndreasSpiess well i will keep at it :) thank you for your reply. I do love your videos even though they are mostly over my head but i love to watch them and they always give me ideas that take me in fun directions.... thanks again
@chuxxsss
@chuxxsss 6 років тому
Lol, running up stairs. You would kill me doing that.
@AndreasSpiess
@AndreasSpiess 6 років тому
You see, I do a lot for my viewers ;-)
@KulturMediaTechnolog
@KulturMediaTechnolog 4 роки тому
Tolle Videos!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Danke!
@BlueyMcPhluey
@BlueyMcPhluey 2 роки тому
very interesting... and a good laugh at 5:00
@AndreasSpiess
@AndreasSpiess 2 роки тому
Thank you!
@viniciusnoyoutube
@viniciusnoyoutube 5 років тому
Do you have any news about ESP32 and the BLE Remote Button?? That would be extremely useful, a very small, cheap and wireless button.
@AndreasSpiess
@AndreasSpiess 5 років тому
I did not use BLE since then because I was disappointed and I wait till things are fixed.
@callmerk4619
@callmerk4619 2 роки тому
Haha.. We need more like this.. fun learning.. you gotta be nerd to get those jokes, though.. :)
@AndreasSpiess
@AndreasSpiess 2 роки тому
We are all nerds on this channel ;-)
@rghrg
@rghrg 3 роки тому
Hi! Do you know any method to limit on the server the number of incomming connections (clients) to one? Thank you.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I never looked at this topic, so I do not know.
@phantomBlurrrr
@phantomBlurrrr 4 роки тому
You mentioned that you had to use espresiffs tools to get it to work, do you have videos covering that??
@AndreasSpiess
@AndreasSpiess 4 роки тому
No, I only use Arduino
@arunbm123
@arunbm123 6 років тому
Very Wonderfull vedio Sir
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks!
@arunbm123
@arunbm123 6 років тому
can I use ESP32 to develop my own beacons for asset tracking, your Views Please
@AndreasSpiess
@AndreasSpiess 6 років тому
No. It uses too much power
@arunbm123
@arunbm123 6 років тому
ok....which is best chip according to you?
@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
@AndreasSpiess
@AndreasSpiess 3 роки тому
I never did that.
@julian403
@julian403 5 років тому
good tutorial bud! thanks. By the way, someone know an android code example for a ble client?
@AndreasSpiess
@AndreasSpiess 5 років тому
:-)
@marcotulio-analogchannel306
@marcotulio-analogchannel306 5 років тому
Hello Andreas!! Thanks for sharing!!! could you show us any example using two spe32 (one like a server and another like a client)? Regards, Túlio
@AndreasSpiess
@AndreasSpiess 5 років тому
Maybe you watch the ESPnow video?
@marcotulio-analogchannel306
@marcotulio-analogchannel306 5 років тому
@@AndreasSpiess THANK YOU ANDREAS!!! I think you solved my problem!!!
@jlrtrevenga
@jlrtrevenga 6 років тому
Hello Mr. Andreas, First, thank you for your videos. They are really usefull. Second, a question related both with Arduino and this bluetooth implementation (and my very limited knowledge). When I connect, I find this: "ESP32 Dev Module, QIO, 80MHz, 4mb (32Mb), 921600" By using the " BLE_server" code in the examples and after compilation/Upload, this is what I get: "Sketch uses 1085933 bytes (82%) of program storage space. Maximum is 1310720 bytes. Global variables use 69056 bytes (23%) of dynamic memory, leaving 225856 bytes for local variables. Maximum is 294912 bytes" I pretended to use ESP32 bluetooth functionality as part of the project but it seems that it leaves no much space for aditional code (18%). If it is so, it is not practical to me (and thers, I suppose), from a practical point of view. My question: I´m I wrong? Can program storage be expanded somehow? If yes, could you please explain, here in in any other video? If it cannot, I will have to find out other alternatives (I guess other people will also have to address this issue). For pure bluetooth functionality I was checking this product. It´s a different approach,, true, out of the Arduino world. www.lairdtech.com/products/bl600-series Thanks in advance,
@AndreasSpiess
@AndreasSpiess 6 років тому
BLE is new on the ESP32 and the Arduino IDE and we all hope it will improve. You can do things with the few % left. What's left is probably still more than an Arduino has.
@giaras64
@giaras64 6 років тому
It should be interesting some experiment with iBeacon advertising on BLE. There are some examples out there but I did not found anything compiled under the arduino ide.
@AndreasSpiess
@AndreasSpiess 6 років тому
I hope, we will come to this topic later on. For the moment, I try to go step-by-step...
@Dr-Shlomo-Cohen
@Dr-Shlomo-Cohen 4 роки тому
Hi, I need to put a transmitter on the collar of my dog, so when he barks it would trigger a device in the house. I also need to keep track of the barks on an app on my phone that I will later make. What technology do you recommend? How? Thank you so much.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I do not know (I only have a cat and no dog).
@bardenegri21
@bardenegri21 6 років тому
Maybe the watch checks those hardware version and id and stuff and only works if they are correct too.
@AndreasSpiess
@AndreasSpiess 6 років тому
I think you are right. I have to investigate further...
@gerrikoio
@gerrikoio 6 років тому
You need to "construct" your data type for the heart rate measurement characteristic - you cannot send just a value as the watch won't know how to interpret. First you have to set your flags, which are represented in 8 bits. Depending on which bit is set will determine whether the heart rate value (bpm) is uint8 or uint16, similarly, flags are also used to show that an optional "Energy Expended" uint16 value is sents etc.
@webdeveloperninja9220
@webdeveloperninja9220 3 роки тому
Thanks
@AndreasSpiess
@AndreasSpiess 3 роки тому
Welcome!
@yahyakhalid6599
@yahyakhalid6599 3 роки тому
I wanted to ask can i use BLE to transmit realtime data at 200 packets per second? I also have multiple sensors that use multiple serial ports to transmit data. The data on each of ports need to be synchronised i.e. It should transmit data from different serial ports at same time. How would i do that? Thanks a lot!
@AndreasSpiess
@AndreasSpiess 3 роки тому
I do not know.
@solidfuel0
@solidfuel0 6 років тому
try to specify the Bluetooth MAC of the device you want to connect to. this way you can force the client to connect to your esp32 and not to the polar
@AndreasSpiess
@AndreasSpiess 6 років тому
You are right, this is a possibility. But as far as I understand, would be against the idea of working with services. And usually, I will not have two devices with the same service, or I have to find a way for the client to deal with it in its program.
@Kampup
@Kampup Рік тому
Some of the links are broken, do you sell the afterburner type controller?
@AndreasSpiess
@AndreasSpiess Рік тому
This is an old video. So many suppliers have changed their products or are even no more in business. I do not sell anything :-(
@PHCareli
@PHCareli 5 років тому
Does BLE from esp32 suffer interference from something like pcb boards? Does BLE use any pin?
@AndreasSpiess
@AndreasSpiess 5 років тому
BLE works wirelessly with the same antenna as Wi-Fi. It needs no pins
@lamarched21
@lamarched21 6 років тому
Very interesting video. Let us know if you find the answers to your questions.
@AndreasSpiess
@AndreasSpiess 6 років тому
I do not think, that this is the last video about BLE...
@Chriva
@Chriva 6 років тому
AvE! :D
@RubenLensvelt
@RubenLensvelt 6 років тому
Good enough for the girls I go out with!
@AndreasSpiess
@AndreasSpiess 6 років тому
:-)
@zerog2000
@zerog2000 6 років тому
Yeah I can’t watch ave with kids around. Thankfully the Swiss guy is more family friendly.
@gonelamanuprakash4487
@gonelamanuprakash4487 3 роки тому
Sir Can we send the multiple sensors data to nRF connect using ESP32 as BLE sever.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I du not know
@gonelamanuprakash4487
@gonelamanuprakash4487 3 роки тому
@@AndreasSpiess thank you sir..😊😊.. If you know in future please let us know Thank you..👍👍
@michelebrunelli8330
@michelebrunelli8330 6 років тому
Have you tried the Flower Care? I'm able to read sensor data but sometimes an error occour. Can you help me?
@AndreasSpiess
@AndreasSpiess 6 років тому
No, not since then
@ifithegr8
@ifithegr8 4 роки тому
Hi, Have you tried H10 POLAR with your program that you have written (for H7)? for me it does not work. Just says device is there lets connect and then stays there forever.
@AndreasSpiess
@AndreasSpiess 4 роки тому
No, I did not try.
@ara197
@ara197 4 роки тому
Dear Andreas, Greetings. I am working on ESP32 module for one of my BLE projects. I used the BLE server sketch that was available in the example sketch of arduino IDE. I tried connecting the server to a android NRF phone client. It worked fine. BLE device name was available within the client. I was also able to read characteristics too, But the same experiment, if i tried executing in my house, the connection does not get established. I also changed the service and characteristics UUID using uuid generator tool. But still no connection. What might be the problem. Kindly suggest.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I am no BLE specialist. But AFAIK we do not "connect" to a device, we only listen to advertisements. Gadgets stop advertising if they are connected to another device like your smartphone.
@ara197
@ara197 4 роки тому
@@AndreasSpiess Thanks for your suggestions. Will look into it.
@stevegroen8036
@stevegroen8036 6 років тому
Many hobbyists would like to remotely control a flex strip of "smart" RGB LEDs with a smart phone and the ESP32 as the controller. The LED strip would be powered by a 5V, 2A supply and not require BLE. Could this be accomplished by basic Bluetooth? Does the Arduino IDE currently support this project? If you could "UKposts" this project I think you would have a hit because so many hobbyists love to play with LEDs.
@reanimationxp
@reanimationxp 6 років тому
He's given you the pieces necessary to implement this, and there are plenty of examples elsewhere.
@AndreasSpiess
@AndreasSpiess 6 років тому
You can use BLE for such a device. But most people use Wi-Fi because they use Wi-Fi for their other Home-Automation devices. Maybe I will cover something like that in the future, but now my priority is to understand the protocol itself...
@rodstartube
@rodstartube 6 років тому
Hello andreas nice video about Bluetooth. Apart: can you do a video about ESP WiFi security? I mean, connect several smartphones to an ESP8266 (or ESP32) and prevent brute force password attack, MAC address authentication before connecting (whitelist in sd database), to hide SSID, change SSID name, to set a password to “builtin” router, and if it is possible to auto disconnect a client after a given period (example 1 minute), in other words to make connection as secure and un-hackable as possible. I know you are the one.
@rodstartube
@rodstartube 6 років тому
I mean to be a strong connection in a community of authorized users, but what if a user wants to fraud or clone MAC address into other smartphone to allow access? Example: a building's automated door with smartphone over WiFi without using a PC or a raspberry or similar/equivalent linux equipment. (MQTT or just an HTTP request?)
@AndreasSpiess
@AndreasSpiess 6 років тому
Unfortunately, I have no clue about security. So somebody else has to do this.
@AndersJackson
@AndersJackson 6 років тому
To hide SSID do not make a WIFI any securer. That is an old missconception. On the contrary, it will make the clients less secure, and the attacker can anyway get the SSID to use by just listening- Neither are MAC address authentication (whitelist of MAC addresses) increasing the security. MAC addresses are easy to fake. Please don't do that or suggest that as a security matter.
@AndersJackson
@AndersJackson 6 років тому
Just use encryption/signing with asymetrical encryption (that is certificates like when making connections to XMPP, HTTPS and MQTT with certificate) and use WPA2 connections.
@dhruvagole7651
@dhruvagole7651 2 роки тому
Can you help me with setting a password (string) for connecting phone to ESP32 BLE? (I will type password in Phone and esp32 should verify and approve/ decline connection) ESP IDF docs are saying in the api docs that passkey must be a 6 digit number. Is there no way to have a char string as password that is can be set static?
@AndreasSpiess
@AndreasSpiess 2 роки тому
I never worked with BLE passwords nor with the IDF :-(
@botletics
@botletics 6 років тому
Great video! However, I couldn't get the BLE examples to compile in Arduino IDE. I updated the ESP32 library by using Git GUI and get.exe but it didn't include the library so then I went to Neil Kolban's Github page and downloaded the library and put it in my libraries folder, but the example wasn't listed under "ESP32 Examples" and it didn't compile. It gave a few errors, but this was the first one: "ESP32_BLE_Arduino\src/FreeRTOS.h:46:3: error: 'pthread_mutex_t' does not name a type". Any ideas? Thanks!
@AndreasSpiess
@AndreasSpiess 6 років тому
If you just install the ESP32 support bluetooth is already there. No library necessary. Maybe you delete the library. Then it should work. Or you reinstall the ESP32 support.
@botletics
@botletics 6 років тому
Hmmm the strange part is that I updated the library and it's not there. The ESP32 library for Arduino also doesn't show the libraries in Neil's repo and it only has "SimpleBLE": github.com/espressif/arduino-esp32/tree/master/libraries
@botletics
@botletics 6 років тому
I deleted the ESP32 files and reinstalled and it worked, thanks! I guess the update from Git GUI didn't work?
@AndreasSpiess
@AndreasSpiess 6 років тому
I do not know. But I am glad it worked now!
@ara197
@ara197 4 роки тому
Dear Andreas, I am working on an experiment to send BMP180 sensor data connected to ESP32 to a client application in phone. Are there any recommended service and characterstic uuids that can be used here, or should i use nordic semiconductor uart uuids. Am not clear what uuids would be suitable for this setup. Thanks
@AndreasSpiess
@AndreasSpiess 4 роки тому
You find a register of all standard services (including UUIDs) on the internet. Maybe you find one for pressure sensors
@ara197
@ara197 4 роки тому
@@AndreasSpiess Thanks Andreas. Will check it out.
@rosipink1811
@rosipink1811 4 роки тому
If i want that characteristics of BLE in My app that, i only need what instructions to activate? I'm a beginner 🙈
@AndreasSpiess
@AndreasSpiess 4 роки тому
BLE is not simple for beginners. You need to experiment and learn a lot :-(
@disolheid
@disolheid 6 років тому
Hi, Thanks for your great Job! I tried the sample with an ESP32 .. without success : C:\Users\dso\Documents\Arduino\libraries\ESP32_BLE_Arduino-master\src/BLEDevice.h:16:20: fatal error: esp_bt.h: No such file or directory I have a too old ESP32 Library ? Regards
@AndreasSpiess
@AndreasSpiess 6 років тому
I would always download a new version. Things move quite fast in the ESP32 environment
@hasanhack89
@hasanhack89 6 років тому
Have you tried to work on ble with RPI in python? I have a ble rgb bulb, company got out of iot business so no support. I was successful in controlling the basic functions using a python script with RPI3, couldn't figure out the music sync part.. it is a much better interface and with RPI zw it could be in the same cost territory as esp32..
@AndreasSpiess
@AndreasSpiess 6 років тому
Thanks! Maybe I have to investigate the possibilities of the RPI. But at the end, of course, we want to use the ESP32...
@hasanhack89
@hasanhack89 6 років тому
Andreas Spiess yeah that is the end game.. Also micro python in esp32 should support ble soon it's like halfway there.. I am planning to teach a small micropython course and would love to hear your thoughts on the topic.. you have the best analysis for the ESP chips and micropython is probably the best interface (imho) for students so please try to make a video about it..
@hasanhack89
@hasanhack89 6 років тому
Andreas Spiess yeah that is the end game.. Also micro python in esp32 should support ble soon it's like halfway there.. I am planning to teach a small micropython course and would love to hear your thoughts on the topic.. you have the best analysis for the ESP chips and micropython is probably the best interface (imho) for students so please try to make a video about it..
@AndreasSpiess
@AndreasSpiess 6 років тому
Python definitively is on the screen here.
@VegasStreets
@VegasStreets 6 років тому
Any news on BLE Mesh support in ESP32?
@AndreasSpiess
@AndreasSpiess 6 років тому
No. Where would this fit? BLE seems to have a limited reach
@confusedwolf7157
@confusedwolf7157 6 років тому
At this rate you will be up for role in new marvel supernurd film (working out)?
@AndreasSpiess
@AndreasSpiess 6 років тому
Maybe my "Arnold Schwarzenegger" accent even helps there ;-)
@WagonLoads
@WagonLoads 4 роки тому
I would like to know if the esp32 bluetooth has HID capabilities?
@AndreasSpiess
@AndreasSpiess 4 роки тому
Google? github.com/T-vK/ESP32-BLE-Keyboard
@kwang0109
@kwang0109 3 роки тому
Great tutorial! But may I know how to get the two uuid?
@AndreasSpiess
@AndreasSpiess 3 роки тому
First link in the video description
@kwang0109
@kwang0109 3 роки тому
@@AndreasSpiess alright, thank you!
@miru2583
@miru2583 3 роки тому
hi, i know this video is fairly old video but the link to ble service doesnt work anymore as it direct to other page. they remove it probably. i can find the assigned number in their pdf but for the love of me i couldnt find the characteristic of each service. any clue where can i find them?
@AndreasSpiess
@AndreasSpiess 3 роки тому
Just use google. The change the address from time-to time...
@AzaB2C
@AzaB2C 3 роки тому
4:10 nRF connect app mentioned
@AndreasSpiess
@AndreasSpiess 3 роки тому
Yes
@muneebtempacc1412
@muneebtempacc1412 Рік тому
Hi anyone pls help me with the code... Am working on a project, my esp 32 should work as beacon scanner, once it scanned and found Beacon A nearby then turn on its led and keep it on until the Beacon A is lost from its scanning results....as soon as the Beacon A is lost turm of Led immediately.
@Electronieks
@Electronieks 2 роки тому
Hello , are there any updates about ble and esp32? Eg via micropython Kind regards 😉
@AndreasSpiess
@AndreasSpiess 2 роки тому
I do not know (never touched it again) and I never used BLE with micro python.
@Electronieks
@Electronieks 2 роки тому
@@AndreasSpiess i will sit in the 1st row , when you make a vid about an update obout ble :)) kind regards 😀
@NN-ns9kh
@NN-ns9kh 6 років тому
Hi Mr Spiess, I am not able to change my service UUID and characteristic UUID to custom UUID created from UUID generator. Am able to change my other parameters like set value and blue tooth name . Would you be able to tell me why this happening ?
@AndreasSpiess
@AndreasSpiess 6 років тому
I do not know. Did you watch all my BLE videos?
@johnsontea8542
@johnsontea8542 4 роки тому
Does anyone know what to do if I need better resolution than what is specified in GATT? For example height has resolution in 0.01 meters, but I want 0.001 meter
@AndreasSpiess
@AndreasSpiess 4 роки тому
I assume you have to create a custom profile
BLE with ESP32 tutorial part 1: the Server
25:23
MoThunderz
Переглядів 66 тис.
#174 Bluetooth BLE on ESP32 works! Tutorial for Arduino IDE
9:50
Andreas Spiess
Переглядів 94 тис.
Help Herobrine Escape From Spike
00:28
Garri Creative
Переглядів 44 млн
Bonnie and Clyde 😂
00:15
IAMMBLACK
Переглядів 2,5 млн
Rutgers University Confirmed: Meshtastic and LoRa are dangerous
13:27
Andreas Spiess
Переглядів 696 тис.
Getting Started with ESP32 Bluetooth Low Energy (BLE) on Arduino IDE
7:57
Use the very attractive new ATTINY chips for your projects
14:34
Andreas Spiess
Переглядів 186 тис.
How America RUINED the world's screws! (Robertson vs. Phillips)
9:46
Stumpy Nubs
Переглядів 243 тис.
ESP32 CAM - 10 Dollar Camera for IoT Projects
29:39
DroneBot Workshop
Переглядів 744 тис.
Master BLE Basics in Just 10 Minutes: The Ultimate Guide!
9:15
Novel Bits
Переглядів 84 тис.
ESP32 Bluetooth Classic with Arduino IDE - Getting Started
9:21
Rui Santos
Переглядів 161 тис.
У Nokia 3310 появился конкурент
0:36
AndroHack
Переглядів 1,5 млн