#174

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • 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
    Links:
    First tutorial video about BLE: • #173 ESP32 Bluetooth B...
    Sketches: github.com/Sen...
    Neil Kolban's Github: github.com/nko...
    ESP32 board used: bit.ly/2sOMR3E
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com...
    My Patreon Page: / 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)
    www.facebook.c...
    / spiessa
    www.instructab...
    Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my main job

ความคิดเห็น • 250

  • @deangreenhough3479
    @deangreenhough3479 6 ปีที่แล้ว +20

    Andreas you have done it again👍 I believe many peoples Christmas has come early.
    Outstanding work by you and your contributors, thank you all.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      You are welcome. I am happy to have such a wonderful community!

  • @TobiasWitting
    @TobiasWitting 3 ปีที่แล้ว +3

    Thank you for this fantastic video and the code! I was able to fake the heart rate belt on my ESP32 dev board and pair with my Polar vantage M watch without problem. Now I'm trying to make a speed and cadence sensor using this and two 44E402 Hall switch sensors...

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Sounds like a fun project. I wish you success!

  • @richardhedderly
    @richardhedderly 5 ปีที่แล้ว +1

    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

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

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

    • @richardhedderly
      @richardhedderly 5 ปีที่แล้ว

      @@AndreasSpiess 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.

  • @tablatronix
    @tablatronix 6 ปีที่แล้ว +1

    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 ?

  • @mb106429
    @mb106429 2 ปีที่แล้ว +1

    cracking video..... . because you researched stuff for beginners as a beginner, published your mistakes, and then published this video showing how you overcame the problems that took you a week to think about, with help from other experimenters.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for your kind words!

    • @mb106429
      @mb106429 2 ปีที่แล้ว +1

      @@AndreasSpiess yep, when you publish your struggles and problems it makes the video very accessible and easy for learners. It helps us see that the subject is accessible and do-able instead of being really heavy and difficult. Lots of TH-camrs edit out their mistakes, try to be big-headed and try to make themselves look like experts. There's an important difference between someone trying to make themselves look good vs someone who is really trying to encourage learning.

  • @peopledrivemecrazy
    @peopledrivemecrazy 6 ปีที่แล้ว +7

    Amazing work.

  • @victorandrespolo
    @victorandrespolo 3 ปีที่แล้ว +1

    you dont know, how i love you.

  • @kevintan4001
    @kevintan4001 3 ปีที่แล้ว

    Nicely done. Are you able to do up another tutorial for BLE GNSS profile which requires Service Class: "Serial Port" (0x1101) and Protocol: "L2CAP" (0x0100) "RFCOMM" (0x0003). Thanks.

  • @janaruch8565
    @janaruch8565 7 หลายเดือนก่อน

    I would like to read Garmin Sensors (Speed, Cadence and Heartrate) with an ESP32 and display them on a TFT or OLED display. Does anyone know if it's is possible and if it is how do I do it?

    • @AndreasSpiess
      @AndreasSpiess  7 หลายเดือนก่อน

      Search for garmin and esp32

  • @SA-oj3bo
    @SA-oj3bo ปีที่แล้ว

    Hi Andreas, 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.

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว +1

      You have to google what services the HM10 exposes and simulate them with the ESP32. did you have a look at this project: "github.com/joelszy/ESP32-HM10"

  • @rhm84119
    @rhm84119 2 ปีที่แล้ว

    Thanks for the video and the code. It helped me a lot. In order to connect to my Polar H9 as a client I had to change the line
    pClient->connect(pAddress);
    to
    pClient->connect(pAddress, BLE_ADDR_TYPE_RANDOM);
    I did not fine this myself but when I put a link in my comment giving proper credit my comment disappears.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you. TH-cam does not allow links anymore. I changed the code.

  • @ara197
    @ara197 4 ปีที่แล้ว

    Dear Andreas, I ran into one more issue. My home laptop which used to run esp32 ble programs, is now issuing some errors, while I try to compile any BLE program, including the examples, which are already provided with the ESP32 BLE arduino library file. The reported error is panic: runtime error: invalid memory address or nil pointer dereference
    [signal 0xc0000005 code=0x0 addr=0x0 pc=0x7855fb]
    .
    goroutine 1 [running]:
    github.com/arduino/arduino-cli/legacy/builder.ResolveLibrary(0x11ce25a0, 0x11fc2151, 0xb, 0x11fc2151)
    Even I tried reinstalling ESP32 Boards once again from Boards manager. It works fine when I try compiling it in office system, but its not working in my home laptop. Any suggestions in this regard? Thanks

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Unfortunately I cannot do remote debugging. I never saw this error.

  • @evanjones9764
    @evanjones9764 4 ปีที่แล้ว +1

    Hi Andreas, thanks for your contribution. I was having a lot of issues with getting BLE notification going for a project using Heltec esp32 board using arduino platform. I was having core 0 panic error. It seems that it is quite sensitive to how characteristics are defined, and cast. Also found the addition of BLE2902 seemed to help things go better. I had tried basing my code on the Neil Kolban BLE server example which is where I saw these core panic errors. Patching your interpretation of the code has meant that my project is now doing notify without bombing out.
    Thanks once again for your contributions our collective understanding of working with BLE on ESP32.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I more or less stopped BLE on the ESP32 because it was not very stable. Maybe they changed it in the meantime. But it does not seem to have a high priority for Espressif

  • @jankijonka
    @jankijonka ปีที่แล้ว

    Hi Andreas, is it possible to build fake BLE heart rate monitor sensor (server) using AT commands implemntation ?

  • @MrBurakko
    @MrBurakko 2 ปีที่แล้ว

    Great tutorial. I have a problem. I want to connect to a car that is steering BLE. Using uRF i can see 4 servises. But ESP32 only see one that i can connect to. How to connect to another UUID? If you want to help, enter your e-mail and I will send you a more detailed description with photo. THX

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      TH-cam is only my hobby and, unfortunately, I have no time for consulting :-(

    • @MrBurakko
      @MrBurakko 2 ปีที่แล้ว

      @@AndreasSpiess 😢😭

  • @giannimoretto1534
    @giannimoretto1534 3 ปีที่แล้ว

    Hi Andreas, could you please specify where the Notification ON/OFF must be placed?

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      This is and old video and I do no more remember the details :-(

  • @dontaskme1625
    @dontaskme1625 6 ปีที่แล้ว +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?

    • @axelmagnusmansson3265
      @axelmagnusmansson3265 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

    • @johnhmacleod
      @johnhmacleod 6 ปีที่แล้ว

      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!

    • @christosmoutevelis4896
      @christosmoutevelis4896 6 ปีที่แล้ว

      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 !

  • @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.

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว

      If a BLE device is connected to another device (Smartphone, watch) it stops to send advertising signals.

  • @ezanchet
    @ezanchet 6 ปีที่แล้ว +1

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

  • @DaveMody
    @DaveMody 4 ปีที่แล้ว

    I'm wondering if anyone has built a multiplexer? ... Take one heart rate monitor signal and serve it out to multiple simultaneous devices.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      AFAIK you can receife these messages as often as you want. As long as the Oximeter is not connected it sends these messages to everybody

  • @caocaolua9356
    @caocaolua9356 4 ปีที่แล้ว

    Pleas tell me how to autoconnect esp32 ble vs galaxy watch and more driver ble

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I have no idea about connecting smart watches

  • @seb1099
    @seb1099 3 ปีที่แล้ว

    Thanks andreas. Just a question : how is connected the esp32 client to collect the datas? Thx

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      I do not understand your question :-(

  • @jan.8879
    @jan.8879 4 ปีที่แล้ว

    Hi im stuck at "- Connected to server" i waited for 5 min but nothing happens

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Unfortunately I cannot do remote debugging :-(

  • @artem_ur3q
    @artem_ur3q 2 ปีที่แล้ว

    Andreas, Thank you! Your explains really good!

  • @jairoalbertoreyes
    @jairoalbertoreyes 4 ปีที่แล้ว

    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. thanks

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว +1

      I never made a project with a smartphone.

  • @stefanhoellerl381
    @stefanhoellerl381 6 หลายเดือนก่อน

    Servus Andreas, i am struggling a little bit with my ESP32 Bluetooth Fan which is controlled by a BLE Heartrate Sensor as you describe in your video. My main problem is actually that somehow my second heart rate sensor disturb the connection and the ESP32 just read the wrong sensor values. I would like to program something to seperate the heart rate sensors that only the belt i wear will connect to ESP32. The program itself works fine so far, but always interrupted by disconnection and connect to other same sensor UUIDs (0x180D) and (0x2A37). its alredy quite frustrating, that ESP32 ble does not connect to MAC Adress...😒. Maybe you have an idea. many thanks in advance and br stefan

    • @AndreasSpiess
      @AndreasSpiess  6 หลายเดือนก่อน

      It should be possible to find the number of your HR sensor and filter on it. But I do not have the exact code. Maybe you find a similar project?

    • @stefanhoellerl381
      @stefanhoellerl381 6 หลายเดือนก่อน

      thanks for prompt answer, ok, thats a pity, but lets see if otherones have an idea. @@AndreasSpiess

  • @김홍두정보전자신소재
    @김홍두정보전자신소재 6 ปีที่แล้ว

    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.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I have no idea. But maybe you re-install the ESP32 support. Something seems to be wrong with it.

    • @김홍두정보전자신소재
      @김홍두정보전자신소재 6 ปีที่แล้ว

      Thank you for your reply. Yes, it turns out wrong ESP32-BLE library from Git-Hub. Please guide to everybody there is ESP32-BLE-Arduino library. I enjoy your video..

  • @aaliankhan4998
    @aaliankhan4998 5 ปีที่แล้ว

    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

  • @algre977
    @algre977 3 ปีที่แล้ว

    What's the current consumption like ?

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      It is a standard ESP32 which consumes around 80mA.

  • @stefanboicu
    @stefanboicu 4 ปีที่แล้ว

    Have you tried esp32 classic bluetooth connection with iPhone/iOS? I try to figure it out what I am doing wrong but I cannot make it be discoverable and detectable by iPhone, maybe you could help.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I never used classic

    • @stefanboicu
      @stefanboicu 4 ปีที่แล้ว

      Andreas Spiess thank you. I cand detect the esp32 on android and laptop but on ios/iphone i cannot, i am not sure what I am doing wrong

  • @skimonsters
    @skimonsters 3 ปีที่แล้ว

    What a great videos every time again, just wondering why it connects perfect to apple but not to android ?
    All app on apple read the heartbeat but not on the apps in android?
    Thanks again

  • @omaryanas435949
    @omaryanas435949 6 ปีที่แล้ว +3

    Absolutely Brilliant !

  • @zam_ii
    @zam_ii 6 ปีที่แล้ว

    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;
    }

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @t540985
    @t540985 6 ปีที่แล้ว

    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...

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

  • @SiddyYT
    @SiddyYT 6 ปีที่แล้ว

    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! ;-)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @DavideMenegalli
    @DavideMenegalli 6 ปีที่แล้ว

    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

  • @knightautomationservices
    @knightautomationservices 3 ปีที่แล้ว

    so Beautiful! Great Video! and Nice Done!!

  • @vincenthorn3611
    @vincenthorn3611 6 ปีที่แล้ว

    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 ?
    Vincent

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

  • @hansschenker
    @hansschenker 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @avejst
    @avejst 6 ปีที่แล้ว +1

    Thanks for sharing 😀👍 interesting stuff

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I am also glad we can use BLE now for our projects.

  • @MaxGoddur
    @MaxGoddur 6 ปีที่แล้ว

    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.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +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.

  • @19dai93
    @19dai93 6 ปีที่แล้ว

    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!

  • @LanceThumping
    @LanceThumping 6 ปีที่แล้ว

    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.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @andylindsayvlog
    @andylindsayvlog 6 ปีที่แล้ว

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

  • @WagonLoads
    @WagonLoads 2 ปีที่แล้ว

    Can you make an esp32 emulate a Tile tracking tag?

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Maybe. If they use an official profile. I do not know tile.

    • @WagonLoads
      @WagonLoads 2 ปีที่แล้ว

      @@AndreasSpiess Tiles are (I think BT) key fobs used to find lost keys, bikes or other items. The Tile app searches for Tiles and maps their GPS location by any phone running the Tile app in the background.
      I was wondering if the esp32 could emulate a Tile.

  • @TheManudulux
    @TheManudulux 3 ปีที่แล้ว

    Thanks for the video. Can this be done in micropython? What do you think?

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      I never tried BLE with micropython

    • @TheManudulux
      @TheManudulux 3 ปีที่แล้ว

      @@AndreasSpiess Thanks. Bluetooth with micropython on esp32 see s very challenging and not well documented. If you search for a project here is one. Do what is in next video using python.

    • @TheManudulux
      @TheManudulux 3 ปีที่แล้ว

      @Andreas spiess, here is the correct link : th-cam.com/video/Kb0fgH8GiYA/w-d-xo.html Really nice project, isn’t it?

  • @hworangs
    @hworangs 6 ปีที่แล้ว

    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?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @luisbangueses
    @luisbangueses 2 ปีที่แล้ว

    Any code to transmit audio to a BT speaker?

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      I never tried it.

    • @luisbangueses
      @luisbangueses 2 ปีที่แล้ว

      @@AndreasSpiess May be it's not easy....

  • @BIN8675
    @BIN8675 6 ปีที่แล้ว

    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?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

  • @nomadcrossfire
    @nomadcrossfire 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @manecourquhart3242
    @manecourquhart3242 6 ปีที่แล้ว

    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?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @michip.1196
    @michip.1196 4 ปีที่แล้ว

    Ciao Andreas, thanks for your great work!
    I'm searching for an tool to monitor and save BLE readings from an (own made) device under Windows.
    Do you have any hints for me...
    Thanks Michi

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      No, I never used BLE on Windows

  • @aaronchan1498
    @aaronchan1498 5 ปีที่แล้ว

    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.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

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

    • @aaronchan1498
      @aaronchan1498 5 ปีที่แล้ว

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

  • @AgimRamqaj
    @AgimRamqaj 6 ปีที่แล้ว +1

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      No not yet

    • @AgimRamqaj
      @AgimRamqaj 6 ปีที่แล้ว +1

      Andreas Spiess i'm sure you'll update us on that topic :) keep up the good work!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      :-)

  • @rolandstiebel1966
    @rolandstiebel1966 6 ปีที่แล้ว

    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!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

    • @rolandstiebel1966
      @rolandstiebel1966 6 ปีที่แล้ว

      @@AndreasSpiess ok. Thanks anyway!

  • @slientpower_3661
    @slientpower_3661 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      There are a few videos around. just google.

  • @cdawson875
    @cdawson875 6 ปีที่แล้ว

    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?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

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

  • @DougHanchard
    @DougHanchard 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

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

  • @peterwhyte4526
    @peterwhyte4526 6 ปีที่แล้ว

    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!! :)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Great! Thanks for your feedback.

  • @luchoescobar
    @luchoescobar 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @NisseDILLIGAF
    @NisseDILLIGAF 6 ปีที่แล้ว

    Hi... thanx for great videos!
    I'm having a little trouble...
    I want to send longitude and latitude in Location and Speed Characteristic 0x2A67
    www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.location_and_speed.xml
    How should I set up the setValue array?

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

    • @NisseDILLIGAF
      @NisseDILLIGAF 6 ปีที่แล้ว

      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!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

  • @dougmanatt4317
    @dougmanatt4317 6 ปีที่แล้ว

    My first 2 ESP-32s will come about Christmas time. With your help I will be using them soon!

  • @sumaxeme
    @sumaxeme 6 ปีที่แล้ว

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

  • @MrSasha3050
    @MrSasha3050 3 ปีที่แล้ว

    Listen on one breath. Thank you Andreas.

  • @VideoDetection
    @VideoDetection 6 ปีที่แล้ว

    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!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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

  • @neuralianmetazoan
    @neuralianmetazoan 6 ปีที่แล้ว

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

  • @gianlucacembrani9923
    @gianlucacembrani9923 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Please show us your findings! Merry Christmas, too

  • @raohamza4484
    @raohamza4484 ปีที่แล้ว

    Well explained

  • @FrankZosso
    @FrankZosso 6 ปีที่แล้ว

    Thank you so much for that awesome update. Will try immediately on the LoPy board. Adding BLE to my projects is a big PLUS! Vy 73 de HB9FXQ

    • @FrankZosso
      @FrankZosso 6 ปีที่แล้ว

      Can confirm it is working w. LoPy boards: twitter.com/HB9FXQ/status/942343732405391361

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Thanks for your feedback!

  • @radselius
    @radselius 6 ปีที่แล้ว

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

  • @butunercouk
    @butunercouk 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Maybe too complicated for me...

  • @dexterweb
    @dexterweb 6 ปีที่แล้ว

    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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

    • @dexterweb
      @dexterweb 6 ปีที่แล้ว

      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.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @istvanzilizi6194
    @istvanzilizi6194 6 ปีที่แล้ว

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

  • @hollensted
    @hollensted 6 ปีที่แล้ว

    Awesome! My dream goal would be to make a crank force sensor for my unicycle. Thanks for sharing!

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

      That should now be possible together with my cat video (weight measurement)

  • @ThomasHaberkorn
    @ThomasHaberkorn 6 ปีที่แล้ว

    Very useful! Can't wait to try it. Thanks Andreas !

  • @LooLL321
    @LooLL321 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +1

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

  • @0805bryan
    @0805bryan 5 ปีที่แล้ว

    how to disconnect bluetooth from esp32?

  • @jamisusijarvi646
    @jamisusijarvi646 6 ปีที่แล้ว

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

  • @jamisusijarvi646
    @jamisusijarvi646 6 ปีที่แล้ว

    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?

    • @jamisusijarvi646
      @jamisusijarvi646 6 ปีที่แล้ว

      github.com/komoot/BLEConnect

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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?

    • @jamisusijarvi646
      @jamisusijarvi646 6 ปีที่แล้ว +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.

  • @daskasspatzle2396
    @daskasspatzle2396 6 ปีที่แล้ว

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

  • @cosmicbandito6926
    @cosmicbandito6926 6 ปีที่แล้ว

    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.

    • @cosmicbandito6926
      @cosmicbandito6926 6 ปีที่แล้ว

      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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว +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 ;-)

    • @cosmicbandito6926
      @cosmicbandito6926 6 ปีที่แล้ว

      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.

  • @arduinomaker7210
    @arduinomaker7210 6 ปีที่แล้ว

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

  • @deangreenhough3479
    @deangreenhough3479 5 ปีที่แล้ว

    Back again

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      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.

  • @deangreenhough3479
    @deangreenhough3479 5 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      I did not try it since then...

  • @charlesdorval394
    @charlesdorval394 6 ปีที่แล้ว

    Congratulation Andreas! Glad you got it working :)

  • @rBazan
    @rBazan ปีที่แล้ว

    Grande el Che

  • @giaras64
    @giaras64 6 ปีที่แล้ว

    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 :-)

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

    • @giaras64
      @giaras64 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

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

  • @CristiIstrate
    @CristiIstrate 6 ปีที่แล้ว

    Great conclusion for your last video on ble.

  • @rklauco
    @rklauco 5 ปีที่แล้ว

    As always, PERFECT video. Thanks!

  • @inakiinchaurregui4848
    @inakiinchaurregui4848 6 ปีที่แล้ว

    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?

  • @JohnoScott
    @JohnoScott 6 ปีที่แล้ว

    Well done. Good to get some closure on this problem

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Maybe it is the opening for many other questions like energy consumption, deep sleep, range and others...

  • @tenminutetokyo2643
    @tenminutetokyo2643 6 ปีที่แล้ว

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

  • @northshorepx
    @northshorepx 6 ปีที่แล้ว

    WOW WOW WOW WOW perfect!!!!! thank you so much!

  • @shanebekker
    @shanebekker 6 ปีที่แล้ว

    I wonder if this useful information applies to BLE 5.0. Would be cool if it did. Thanks again for your time in explaining these things for us.

    • @luchoescobar
      @luchoescobar 6 ปีที่แล้ว

      Shane Bekker have you see some MCU’S with BLE 5.0? I think they re not Comercial at this time

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      ESP32 is not on 5.0 So we have to wait...

    • @chegewaras
      @chegewaras 6 ปีที่แล้ว

      BLE 5.0 is backward compatible. Yes, all info from this vid will work with BLE 5.0.

    • @naasikhendricks1501
      @naasikhendricks1501 6 ปีที่แล้ว

      BLE is a complete standard. If you able write, the complete standard then you able to access the ble. The RF is only a hardware function. The ble is a standard and protocol. That is not hard just time consuming and involved...

  • @fuxfuzzy
    @fuxfuzzy 5 ปีที่แล้ว

    Great Video! Thanks!

  • @ThomasHaberkorn
    @ThomasHaberkorn 6 ปีที่แล้ว

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

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      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.

    • @naasikhendricks1501
      @naasikhendricks1501 6 ปีที่แล้ว

      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.

  • @fabiocristini8793
    @fabiocristini8793 6 ปีที่แล้ว

    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??
    Ciao
    Hjfabius

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      There seem to be several software revisions. So you have to experiment, change the different values of the sensor and watch which values in the client change. I did not do it so far, but mine worked with the app (after upgrading to the newest firmware)

    • @johnhmacleod
      @johnhmacleod 6 ปีที่แล้ว

      I worked with chegewara on this & we found that there seems to be a problem communicating with this device using the Arduino IDE. You can read packets from it OK but are unable to command it to go into real-time reporting so it continues to report default data (AA BB CC....). It all works fine if you use the esp-idf instead.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      Aha. So it is a problem of Neils implementation?

    • @fabiocristini8793
      @fabiocristini8793 6 ปีที่แล้ว

      Can you upgrade the firmware without using the app? I was not aware of it.

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      I had to do it with the app

  • @joeybushagour2612
    @joeybushagour2612 6 ปีที่แล้ว

    Great as always!

  • @legoscratch
    @legoscratch 6 ปีที่แล้ว

    Esp32 smartwatch?

    • @luchoescobar
      @luchoescobar 6 ปีที่แล้ว

      legoscratch i like to see that too

    • @AndreasSpiess
      @AndreasSpiess  6 ปีที่แล้ว

      With an e-ink display maybe...

  • @chuxxsss
    @chuxxsss 6 ปีที่แล้ว

    Nice one Andreas will watch it in the morning.