#174 Bluetooth BLE on ESP32 works! Tutorial for Arduino IDE

  • Published on Dec 17, 2017
  • Good news! My fake Polar H7 Bluetooth heart Rate sensor works on my ESP32 using the Arduino IDE. I will show you what I had to do. And much more!
    Today I can show you
    - How you can build a sensor which sends data via BLE to a client
    - A client which can receive these values and display them in Serial Monitor
    - The mysterious BLE2902 client characteristic configuration and how it works
    - The details of the protocol used by the heart rate measurement characteristics. This will help you to build other sensors based on different standardized services and characteristics
    First tutorial video about BLE: ru-clip.com/video/2mePPqiocUE/video.html
    Sketches: github.com/SensorsIot/Bluetooth-BLE-on-Arduino-IDE
    Neil Kolban's Github: github.com/nkolban
    ESP32 board used: bit.ly/2sOMR3E

    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    My Patreon Page: www.patreon.com/AndreasSpiess
    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)
    Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my main job
  • Science & TechnologyScience & Technology

Comments • 184

  • Andreas
    Andreas 2 months ago

    Great Video! Thanks!

  • Aalian khan
    Aalian khan 4 months ago

    Is ble secure. Can anyone see packets coming out. Can you control things with ble eg. A client sends a command and The server acts accordingly

  • Jafar Shiddiq Rivai
    Jafar Shiddiq Rivai 4 months ago

    Hello sir, I have some problem while implementing this notification code:

    pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOn, 2, true);
    pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOff, 2, true);

    I can compile my skecth and upload it to my ESP32, but then when I connected the BLE, it has some error on the Serial Monitor like this:

    Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
    Core 1 register dump:
    PC : 0x400d3eba PS : 0x00060130 A0 : 0x800d180e A1 : 0x3ffca2d0
    A2 : 0x00000000 A3 : 0xdbb3a07e A4 : 0x3ffc60dc A5 : 0x00000024
    A6 : 0x3ffe1308 A7 : 0x00010000 A8 : 0x800d3eb6 A9 : 0x3ffca1d0
    A10 : 0x3ffca2f4 A11 : 0xdbb3a07e A12 : 0x3ffc60dc A13 : 0xdbb3a07e
    A14 : 0x3ffca2b0 A15 : 0x00016aca SAR : 0x00000018 EXCCAUSE: 0x0000001c
    EXCVADDR: 0x00000108 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

    Backtrace: 0x400d3eba:0x3ffca2d0 0x400d180b:0x3ffca330 0x400d6aa5:0x3ffca380 0x40090461:0x3ffca3a0


    and it keeps restarting the code.. do you have any idea for this? Btw, great video, thanks sir!

    • Andreas Spiess
      Andreas Spiess  4 months ago

      Unfortunately, I cannot do remote debugging :-(

  • Aaron Chan
    Aaron Chan 5 months ago

    Hi Andreas the characteristic value on the client serial monitor should be displaying the heart sensor reading right? Because it seems to be displaying some non-numerical values.

    • Aaron Chan
      Aaron Chan 4 months ago

      @Andreas Spiess Ok can thanks. BTW have you tried pushing real-time sensor data with timestamp onto the firebase database for the purpose of data analytic.

    • Andreas Spiess
      Andreas Spiess  5 months ago

      It should. But this is an old video and I do not remember the details.

  • Bryan Chen
    Bryan Chen 6 months ago

    how to disconnect bluetooth from esp32?

  • Dean Greenhough
    Dean Greenhough 6 months ago

    Back again for a refresher and yes, I missed things and learned more.

  • Dean Greenhough
    Dean Greenhough 7 months ago

    Back again

    • Andreas Spiess
      Andreas Spiess  7 months ago

      Today I got TPMS sensors with BLE and tought it would be easier to use them than 433 MHz. I was wrong. Messed around with BLE on the RPI. Also a mess in my opinion.

  • Richard Hedderly
    Richard Hedderly 8 months ago

    Hi Andreas,
    Looking to extend the heart code for cadence and speed on a sensor:
    I understand the heart sensor position array, 2 being chest but for the heart characteristic array itself, which sub characteristics do the values relate to?
    byte heart[8] = { 0b00001110, 60, 0, 0, 0 , 0, 0, 0};
    I think I’m missing something...
    Many thanks

    • Richard Hedderly
      Richard Hedderly 8 months ago

      @Andreas Spiess Not to worry, I think I've worked it out. That of the byte array, the first entry array[1] is the binary flags for the BLE characteristic.

    • Andreas Spiess
      Andreas Spiess  8 months ago

      This is a quite old video, so I do no more remember the details. Sorry.

  • Robert Klauco
    Robert Klauco 10 months ago

    As always, PERFECT video. Thanks!

  • Roland Stiebel
    Roland Stiebel Year ago

    Hi Andreas, Thanks again for your great video. I just tried to do the same with a Bluetooth Joystick. But I get an error
    bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x003e
    while searching the web I found you had the same problem and asked for help.
    Can you tell me, what I have to do?
    Hardware: Wroom32 and HZ-2749 joystick
    Thanks a lot!

    • Roland Stiebel
      Roland Stiebel Year ago

      @Andreas Spiess ok. Thanks anyway!

    • Andreas Spiess
      Andreas Spiess  Year ago

      I do not know more than written into the post you mention and my example files. They worked at that time and I did not touch BLE since.

    CHURCHMANIA Year ago

    Great Video. I'm getting results with my ESPs spoofing your heart rate monitor. My only problem is that I need to use another type of data that is a little larger than your example. I have tried to use other service UUIDs to get data larger than a the little 8bits used in the heart rate moniter(180D). I'm trying to transfer gyroscope data over BLE so I need a data type that can hold 0-360. Also, all of the services have very specific uses. What service/characteristic do you recommend?

    • Andreas Spiess
      Andreas Spiess  Year ago

      I did not further work with BLE. So I am not a big help. But I think, together with Goole you will be able to find a solution. BLE is not limited to the ESP32 and maybe somebody else solved it.

  • Iñaki Inchaurregui

    Hi! Do you know if you can change the name of the bluetooth so that it appears as we want, when looking for it with another device?

  • ezanchet
    ezanchet Year ago +1

    Many thanks Andreas, this video was very useful for a project I'm doing !
    I'm watching all your videos and are inspirational :-)

  • Rodrigo Franco
    Rodrigo Franco Year ago

    Thank you Andreas, I have learned a lot with your videos...
    greetings from Mexico.

  • Vasko Tomanov
    Vasko Tomanov Year ago

    Great Video :) I'm trying to get my ESP32 to send data for
    2 x voltmeters
    1 x temperature
    1 x humidity
    1 x GPS coordinates
    using BLE to my phone
    (I'm using nRF Connect on the phone for testing)
    I cannot see a example how to create my own custom service with 3 x float , 1x integer, and 2 x double - values that can be displayed on the phone or may be use some of the already defined GATT Services ?
    Any suggestions will be well appreciated...

    • Andreas Spiess
      Andreas Spiess  Year ago

      I am not a BLE specialist. But I think, if you can transfer one characteristic, you can also transfer the other values. You find a link for all defined GATT services.

  • hworangs
    hworangs Year ago

    But if you have two HR monitors that uses the same UUIDs and measurement, how do you define to which one to connect? Do you use the MAC address to differentiate?

    • Andreas Spiess
      Andreas Spiess  Year ago

      I do not know. Unfortunately, I am not a BLE expert.

  • Matt Gipson
    Matt Gipson Year ago

    Any chance you could do a video showing how to send data back and forth between 2 esp32s using BLE?

    • Andreas Spiess
      Andreas Spiess  Year ago

      I have no plans for BLE for the moment. But this can change if more functionality appears.

  • Jami Susijärvi
    Jami Susijärvi Year ago

    And yes, now i do get navigation info from Android/iPhone to ESP32 from Komoot (distance to next turn, where to turn and road name). But that Komoot is not very good software. Any info of better ones that sends info thru BLE?

    • Jami Susijärvi
      Jami Susijärvi Year ago +1

      To get navigation information from phone to motorcycle display (i have talked about this project with Onno Dirkzwager because plan is to use also iotappstory in this project).
      I think i have to work more with Kamoot. At least roads at my neighborhood are partly missing, but Kamoot is using OpenStreetMap so i can make that better.

    • Andreas Spiess
      Andreas Spiess  Year ago

      I love komoot because it is quite precise with telling me the road quality also in other countries. What would be the goal of such a project?

    • Jami Susijärvi
      Jami Susijärvi Year ago


  • Jami Susijärvi
    Jami Susijärvi Year ago

    This was really useful for my projects. I think i allready have to test today

  • ksrm kadapa
    ksrm kadapa Year ago

    I need vedios on how to install library esp32 on ardunio die plz help me

  • Flavio Dexter
    Flavio Dexter Year ago

    Am I the only one who gets "sketch too big to compile" ? sketch uses 106% of program storage space. I'm using a doit esp32 dev kit V1
    PS: the arduino setup is working because if I compile a esp32 ble sniffer example everything works

    • Andreas Spiess
      Andreas Spiess  Year ago

      I saw the issue too now. BLE is still under heavy development for the Arduino IDE...

    • Flavio Dexter
      Flavio Dexter Year ago

      github.com/SensorsIot/Bluetooth-BLE-on-Arduino-IDE/issues/3 Looks like it is a config issue with the esp32/arduino library at least on windows.
      Modifying the boards.txt file removed the issue, still I'm not able to get any output on the serial monitor after compiling and configuring your sketch.

    • Andreas Spiess
      Andreas Spiess  Year ago

      So far I did not read any other comments like that if I remember right.

  • Maneco Urquhart
    Maneco Urquhart Year ago

    Excellent once again Andreas, would like to know if it's possible to add feedback in the sensor to notify that the client received data?

    • Andreas Spiess
      Andreas Spiess  Year ago

      I think many things are possible, but I am a beginner in this topic.

  • ­김홍두(공과대학 정보전자신소재공학과)

    Please help me the following error during compilation:
    In file included from D:\Download\ESP32_BLE_UART_Demo\ESP32_BLE_UART_Demo.ino:22:0:
    C:\Users\user\Documents\Arduino\libraries\ESP32_BLE_Arduino-master\src/BLEDevice.h:16:20: fatal error: esp_bt.h: No such file or directory
    compilation terminated.
    I am using Sparkfun ESP32 thing.

  • Doug Hanchard
    Doug Hanchard Year ago

    Just an observation, for a retired Electrical Engineer, I bet you are busier now than when you were working full-time! Nice job!

    • Andreas Spiess
      Andreas Spiess  Year ago +1

      I am not retreated. I still work. Here we stop at 65 and I am only 61 :-(

  • Peter Whyte
    Peter Whyte Year ago

    Hi Andreas, so excited! - tonight I got my Garmin 935 to find and connect to my "fake" polar h7 using your sketch - thank you so much - I am now a fan of the ESP32 and will leave the world of the ESP8266 for bigger and better things!! :)

  • Hosszú Dániel
    Hosszú Dániel Year ago

    So if I would buy an ESP32 then I could use it to read the heart rate data from my Polar H7? Unfortunately I haven't found any working solution for Arduino Uno + Bluetooth module + Polar H7. By the way, great videos and very informative commentary!

  • Vincent Horn
    Vincent Horn Year ago

    Grüetzi Andreas
    did you connect a ESP32 BLE client to your Polar H7 ?
    The HR caracteristic returns me different value formats like :
    6 83
    22 83 218 2
    22 84 221 2 206 2
    Why does the H7 not sending always the same format ?
    The first (6 83) and the second (22 83 218 2) seems correct from the flag point of vue (respect. 8byte HR value and 8byte HR + 16b RR).
    But how should I understand this 22 84 221 2 206 2 ?

    I noticed that the Polar H7 delievers a unkown service on the UUID = 6217ff4b-fb31-1140-ad5a-a45545d7ecf3.
    Any idea on this vendor specific UUID ?

    • Andreas Spiess
      Andreas Spiess  Year ago

      Unfortunately, I do not know more than presented in this video. And I do no more remember all details. I think the links to the underlying documentation is in the comment. Maybe you find a solution.

  • ThomasHaberkorn
    ThomasHaberkorn Year ago

    Is there a way to set the BLE transmit power or is it fixed?

    • Naasik Hendricks
      Naasik Hendricks Year ago

      I had a similar question. The RSSI or dBm adjustment file. That will determine the range and application space. One can use more Powerful dBm for Controlled indoor application.

    • Andreas Spiess
      Andreas Spiess  Year ago

      I do not know. But I think, it is variable (maybe not in the Arduino IDE). But on the ESP32, most of the current is used because the device is on for way too long, not for the BT sender.

  • Ilzam Ismail
    Ilzam Ismail Year ago

    Can you advise purpose or meaning of below code?
    // If we are connected to a peer BLE Server, update the characteristic each time we are reached
    // with the current time since boot.
    if (connected) {
    if (onoff) {
    Serial.println("Notifications turned on");
    pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOn, 2, true);
    else {
    Serial.println("Notifications turned off");
    pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOff, 2, true);
    onoff = onoff ? 0 : 1;

    • Andreas Spiess
      Andreas Spiess  Year ago

      Maybe you ask this question on Github (BLE library, nkolban). He is the creator and knows much more about his code than me.

  • tablatronix
    tablatronix Year ago

    This is great, does anyone know if its possible to send btle notifications to IOS without software or a custom app ? Is there like a prowl for bt ?

  • Neuralian Metazoan

    Thank you! Just received my first esp32s, off to try them out now ...

  • Nisse Nilsson
    Nisse Nilsson Year ago

    Hi... thanx for great videos!
    I'm having a little trouble...
    I want to send longitude and latitude in Location and Speed Characteristic 0x2A67
    How should I set up the setValue array?

    • Andreas Spiess
      Andreas Spiess  Year ago

      You have to understand each byte and first distinguish, which you need and which not. Then, you have to fill /decode the important ones. Takes some time but is possible. Happy New Year, too.

    • Nisse Nilsson
      Nisse Nilsson Year ago

      I have tied your sketch with success.. I think I'm stuck with the Characteristics.setValue..
      the HeartRate Flags is 8bit, and the Location is 16bit... should I split it? byte location[xx] = { 0b00100000, 0b00000000,.. and so on.. ?
      All I get in NRF connect is an array of hex(?) values...
      Anyway... I will have a closer look at it next year... :)
      Happy New Year!

    • Andreas Spiess
      Andreas Spiess  Year ago

      Exactly as described in this document. But you might have to read it a few times and try. Use NRF connect to see what is sees. This will help you to correct your code. Maybe you use my fake Polar sensor sketch as a reference. Yours seems to be more complicated, though.

  • C Dawson
    C Dawson Year ago

    Andreas, this is amazing. Have you been able to get the client to automatically reconnect to the server if the connection is lost, or the client is reset? Or is this only achieved through bonding/pairing?

    • Andreas Spiess
      Andreas Spiess  Year ago +1

      I did not do this work so far. I am a real BLE beginner and just started the journey...

  • NerdyPi
    NerdyPi Year ago

    Do you think it would be possible to turn an ESP32 into a Bluetooth HID using this stuff as a base? I want to see about making my own Bluetooth controller with one I have laying around.

    • Andreas Spiess
      Andreas Spiess  Year ago

      It should be possible. I found this link: github.com/asterics/esp32_mouse_keyboard . It is not for the Arduino platform.

  • Andy Phan
    Andy Phan Year ago

    Andreas please waive your magic wand once again and show us how to receive data via bluetooth and retransmit it via MQTT.

  • Davide Menegalli
    Davide Menegalli Year ago

    Hi Andrea, i found your channel today while searching for wifi devices, and i discovered that you're in Swiss too like me, how small is this world :) You have gained a new follower, best regards ! Davide

  • Rud Dog
    Rud Dog Year ago

    Not sure if you entertain this type request on your channel if you prefer requests of this type are not made then please disregard this post.
    In need of a detailed video walking, no crawling, through the steps for several items related to the NodeMCU ESP8266.

    How to see what is loaded in the memory of the device.

    How to erase the contents of the memory.

    How to load different firmware, for example, MicorPython then back again to ESP8266 original firmware.

    List the tools for best carry out the listed items above.

    Discuss NodeMCU memory amounts used and why. Have seen discussion on 1Meg and 4Meg but not sure how they are implemented.

    Lastly, if you can dumb it down I am a hobbyist and started my journey down using IOTs a few months back and need all the hand holding I can get.

    • Andreas Spiess
      Andreas Spiess  Year ago +1

      How to see what is loaded in the memory of the device.
      You cannot see it. You have to know what you loaded into the memory. Maybe there is a possibility to extract the low level code, but this is not very readable for humans

      How to erase the contents of the memory
      For sure there are functions to erase flash memory. But I do not know them. However, this is usually done by the programmer itself before it uploads the new code.

      How to load different firmware, for example, MicorPython then back again to ESP8266 original firmware.
      As soon as you load something on the ESP8266 all flash memory is erased. So you can switch firmware just by loading a new one on the device

      List the tools for best carry out the listed items above.
      I use the Arduino IDE to do that. Micropython has its own infrastructure to work with the ESP8266. And there are more tools available. However, the Arduino IDE is best for beginners.

      Discuss NodeMCU memory amounts used and why. Have seen discussion on 1Meg and 4Meg but not sure how they are implemented.
      Most ESP8266 boards have a 4MByte Flash chip. Old ESP-01 boards have only a 1M chip. You select the chip size before compiling and uploading your code in the IDE.

      Lastly, if you can dumb it down I am a hobbyist and started my journey down using IOTs a few months back and need all the hand holding I can get.
      There are many videos around on how to get started with the ISP8266. Maybe you watch one or two of them. It is not very complicated.

  • PodróżeMałe&Duże

    thank you for all of your work :) 10/10 :))
    cant wait for next episode :)

    • Andreas Spiess
      Andreas Spiess  Year ago +1

      You are welcome. The next episode should be out by now.

  • SiddyYT
    SiddyYT Year ago

    First of all: I'm a big fan of all your videos!! Your recent videos inspired me to play around with ESP32 and the Xiaomi Mi plant sensor and it works like a charm! Check github.com/sidddy/flora if you're interested in an ESP32-based Xiaomi Mi plant sensor BLE client, pushing the measurements to an MQTT server. So, also a big thanks to you from my "guinea-pig-plant" for the much improved supply of water and fertilizer! ;-)

    • Andreas Spiess
      Andreas Spiess  Year ago

      Thank you for the link. I will try it over the Christmas days.

  • 1an Email
    1an Email Year ago

    Well done Andreas! Loved the inclusion of "Dinner For One" its a true classic that can be watched over and over :)
    Have you seen the new LolinESP32 Pro? It uses the new Wrover module and has an SD card reader, step up from the Wroom module equipped Loloin32's.
    Have a great xmas and looking forward to see what projects you present in the new year. Love your work!

    • Andreas Spiess
      Andreas Spiess  Year ago

      I have a pro in the mail. We will see what I will do with it. For the moment I have no special project in mind

  • Hans Schenker bei Google

    Solid swiss work! Not giving up before having found the solution! Thank's a lot for your work in the public!! :-)

    • Andreas Spiess
      Andreas Spiess  Year ago

      You are welcome. Giving up after a few days only usually is no good option...

  • Timothy Woo
    Timothy Woo Year ago +3

    Great video! I was inspired by this video and decided to write my own Instructable on how to make an easy Android app to send and receive data from the ESP32 in Arduino IDE. Check it out! www.instructables.com/id/ESP32-BLE-Android-App-Arduino-IDE-AWESOME/

    • Timothy Woo
      Timothy Woo Year ago

      Thanks, glad you liked it!

    • Vilander Kiminami
      Vilander Kiminami Year ago +1

      Thxxx Timothy Woo, Thxx Andreas!!!!!

    • Andreas Spiess
      Andreas Spiess  Year ago +2

      Thank you for the link. Very good instructable. I also watched a few of these Thunkable videos and plan to do some tests with it.

  • John Spounias
    John Spounias Year ago

    Thanks nkolban and the rest of the community for all the work put in to make it happen.

  • Ten Minute Tokyo 2
    Ten Minute Tokyo 2 2 years ago

    Ah so that is how you stay in such good shape.

  • CosmicBandito69
    CosmicBandito69 2 years ago

    Maybe I'm crazy, but it seems like you are using the ble_2902 to reverse the normal operation. It seems like the sensor wants to be a server, and the app or database or whatever wants to be a client. It seems like it is already set up to be used that way. The server would notify about changing sensor values, since the sensor is the server, and the client would be that which displays or records the sensor values, and maybe doesn't need to send any notifications.

    • CosmicBandito69
      CosmicBandito69 Year ago

      Thank you. Certainly most of the documentation always refers to the (GAP) peripheral sensor as a (BLE) server and the (GAP) central as a (BLE) client.

      After studying more, If I were implementing my own heart monitors and displays (for something like a gym or hospital), I would probably emulate i-beacons, cramming the data into parts of the advertising data and scan response GAP payloads (whatever is allowed by i-beacons). Then I could monitor multiple sensors at once. With something like temperature sensors, you could save a lot of battery by adjusting the frequency (and power) of the advertising data payloads going out, since it also advertises how frequently GAP advertising data payloads will be sent out. It would never actually connect, it would just send out advertising data payloads that match the i-beacon/eddystone format containing the data. Thank you for your helpful videos. Sorry to drag you back here :) I bet you end up exploring beacons at some point either for energy savings, or very accurately triangulating people's location in buildings and such using multiple beacons and their signal strength (in an app running on a person's phone). There I go trying to run before learning to walk again.

    • Andreas Spiess
      Andreas Spiess  Year ago +1

      There is a two-way communication between the two devices. If someone calls a data transmitter a "server" then it changes all the time. AFAIK server and client are not very well defined roles and were the reason for a lot of confusion also in the past.
      For me (and this seems also the way GATT sees it) the server is connected to the sensor and the client to the "display". That is easy enough to be understood by me ;-)

    • CosmicBandito69
      CosmicBandito69 Year ago

      Dang it, the nomenclature of server and client is confusing, since they are kind of acting like both at different times. What I meant to say is that the sensor seems to want to be a (ble) client, listening for a (ble) server to ask for data, and sending the data when the (ble) server asks . The (ble) server could display, record, modify, or utilize the sensor data. The GAP and GATT roles can be switched and mixed as one needs, I guess: community.nxp.com/thread/332319

  • Bike Vids
    Bike Vids 2 years ago


  • Agim Ramqaj
    Agim Ramqaj 2 years ago +1

    Hi Andreas, did you measure how much energy does esp use in client or server mode?

  • Fabio Cristini
    Fabio Cristini 2 years ago

    Incredible work, as usual. Well done.
    I'm trying to use your samples to read my Flower Care (miflora) sensor (not sure if it's genuine as most of the common apps does not work with it).
    Have you have already started to analyze the protocol of your?
    I've a 4 custom services: FE95, FEF5, 1204, 1206. Do you have something similar??

    • chegewaras
      chegewaras Year ago

      This is not true. ESP32 can see all services like any other devices.

    • Andreas Spiess
      Andreas Spiess  2 years ago

      The client sketch searches first for a service and then for a characteristic. If you do not see it in serial monitor during scan it will not connect. So far I did not try to more than one service/ characteristic.
      I would try to start with my examples and then start changing. It took me a long time till everything worked. Even minor changes resulted in failures...

    • Fabio Cristini
      Fabio Cristini 2 years ago

      Meaning that ESP cannot connect to not advertised services? I tried using the BLE_client example changing UUID as per what I've on the app, but connection is not enstablished.

    • Andreas Spiess
      Andreas Spiess  2 years ago

      AFIIU the ESP only sees the advertised services. The other apps see all

    • Fabio Cristini
      Fabio Cristini 2 years ago

      Have you ever encountered cases where IOS Nordic app see 4 services linked to a device while esp32 with arduino ide only see one?

  • Istvan Zilizi
    Istvan Zilizi 2 years ago

    Big Thanks for this Andreas! I really think I can learn from you new things! It is time to experiment!

  • Gianluca Cembrani
    Gianluca Cembrani 2 years ago

    As inspiring as usual, thanks for this present, Andreas! I'll start looking into a miflora-to-mqtt project soon. Marry Christmas, my friend.

    • Andreas Spiess
      Andreas Spiess  2 years ago

      Please show us your findings! Merry Christmas, too

  • Luis Gatica
    Luis Gatica 2 years ago

    This is great thanks Andreas!!! Have you tried the BLE 5.0???

    • Andreas Spiess
      Andreas Spiess  2 years ago

      ESP32 cannot do it and I hardly understand 4.0 ;-)

  • Giampiero Raschetti
    Giampiero Raschetti 2 years ago

    Nice work Andreas. I just got the same Polar H7 device and successfully tried your sketch. Really useful examples. I'm looking in Kolban's snippets for work in progress on ibeacon but not so easy to integrate under arduino IDE .. too much rust on my brain :-)

    • Andreas Spiess
      Andreas Spiess  2 years ago

      Thanks for the link. I will have a look at ir

    • Giampiero Raschetti
      Giampiero Raschetti 2 years ago

      ok. In the case it may be useful my last message on ESP32-snippets (by qrpfun) github.com/nkolban/esp32-snippets/issues/271

    • Andreas Spiess
      Andreas Spiess  2 years ago

      Thanks for the feedback. Maybe I will have a look into beacons later.

  • DontAskMe
    DontAskMe 2 years ago +2

    Another interesting topic would be how high the power consuption is when the ESP32 is solely used as a BLE server. Does it save much energy compared to a ESP8266 on wifi?
    Yet another topic would be to receive data via blutooth and retransmitt it via MQTT. That could be used for the plant monitor (the one you used in the video) to intergrate it in node red.
    btw: do you have an aliexpress affilitate link, to support you by shopping there?

    • Christos Moutevelis
      Christos Moutevelis 2 years ago

      BLE sensors need to work with a CR2032 battery for six months to a year . ESP32 is good for making a cheap BLE to WiFi Gateway ( instead of having a full raspberry 3 for example ) . If you need a simple BLE sensor you should perhaps try the nRF or Dialog BLE chips . They even cut consumption by selecting the right amount of flash memory model needed for each application down to a few nA in sleep mode !

    • John Spounias
      John Spounias 2 years ago

      110-130mA @ 5v is how much my ESP32 with max RSSI setting and linear converter 1117, 2 i2c devices + flash uses, so its not bad for peripherals for ultra low power though not yet.

    • John MacLeod
      John MacLeod 2 years ago

      I'd like to find a very low powered, programmable device with built-in BT (like the ESP32) to build BLE sensors. If you know of one, or how to make the ESP32 run like that - maybe on its super low power processor - that might be interesting. Then you could make a cat food monitor without a USB lead to trip her up as it would run for years on a button battery!

    • Andreas Spiess
      Andreas Spiess  2 years ago

      1. MQTT should be easy.
      2. I am also interested in power consumption ans sleep modes.

    • axel magnus månsson
      axel magnus månsson 2 years ago

      banggood methinks. and yes power consumption is really an interesting race for these gadgets now.

  • Das Kässpätzle
    Das Kässpätzle 2 years ago

    Great, thanks to you and also the helping viewers ;-)

  • Ozgur Butuner
    Ozgur Butuner 2 years ago

    Wow, thats great! Future: diy garmin edge 1000 :)

  • Chuxxsss B
    Chuxxsss B 2 years ago

    Nice one Andreas will watch it in the morning.

  • legoscratch
    legoscratch 2 years ago

    Esp32 smartwatch?

  • Media Will
    Media Will 2 years ago

    Great work. I can now use BLE for my projects. Thank you.

  • Max E. Mergenthaler
    Max E. Mergenthaler 2 years ago

    This is Christmas - such amazing stuff to look into during the coming season.....

  • peopledrivemecrazy
    peopledrivemecrazy 2 years ago +7

    Amazing work.