025 - ESP32 MicroPython: Bluetooth Low Energy | BLE

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ส.ค. 2021
  • In this video, I will demonstrate how to use ESP32 BLE capability using MicroPython.
    For more details, visit:
    techtotinker.com/2021/08/15/0...
    Please do Like, Comment, Share, and Subscribe.
    Thank you.
    - George Bantique | tech.to.tinker@gmail.com
    #TechToTinker
    #MicroPython #ESP32
    #MicroPythonTutorials
    ---
    MicroPython Tutorials
    How to use BLE in MicroPython
    How to ESP32 Bluetooth Low Energy in MicroPython
    ESP32 BLE in MicroPython
    ESP8266 BLE in MicroPython
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @tecons5226
    @tecons5226 2 ปีที่แล้ว +7

    Hi George, thank you so much for sharing your knowledge, your channel is great, it's the best place to find content about Micropython.

    • @TechToTinker
      @TechToTinker  2 ปีที่แล้ว +4

      Pleasure to help. Thank you.

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

    Awesome George!

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

      As always Kevin, thank you for the support :)

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

    Your videos are always helpful. :) :)

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

      Glad to hear that! Thanks.

  • @mjw-li9gc
    @mjw-li9gc 2 ปีที่แล้ว

    Thanks so much, great video!

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

      Hey glad you loved it. Thanks.

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

    Thank you for this informative video!! Have a good time!

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

    nice video - good job

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

    Nice presentation! Though you are using BLE in ‘serial mode’ which isn’t very BLE-esq. Consider making a follow up tutorial showing how to implement GATT services on ESP32 via micropython. Thank you!

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

    Thank you for good information.

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

      You are most welcome. Thanks.

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

    Thanks!

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

    Your code snipped runs very nice on my ESP32. Do you have an idea how to read the sensor data on a win10 PC? I would like to collect, plot and save some analog values over time.
    edit: with bleak I always get the error "BleakError: characteristic does not support notifications or indications"

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

    Thanks for the video.👍

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

      Glad you liked it. Cheers.

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

      @@TechToTinker how can we control onboard LED or call a function with serial terminal app?

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

      @@shubhamtelang9068 yes, of course. Show your code, what you have done so far.

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

      @@TechToTinker Got the solution. Just added led.value(not led.value()) in while loop and got the idea to get data from different sensors now. Thanks for the code.

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

      @@shubhamtelang9068 good job and you are most welcome. Cheers.

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

    Can we do serial communication or any communication with ESP32 using python ?

  • @snopz
    @snopz 3 หลายเดือนก่อน

    i need an app that i can create controllers and when pressed it sends the ble message related to this button

  • @xavilucifer400
    @xavilucifer400 3 หลายเดือนก่อน

    Hi, is there any way to cennect an xbox controller to the Esp32 with bluetooth to control a small car?
    if there is any possible ways please make a video about it.

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

    Great explanation! Just curious, I understand the ESP32 chip has options for pull-ups on the GPIO pins.. but when you declared the pin as an input, I don't see how that would get enabled (or not)? Thanks!

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

      Hi Ben, kindly refer to this: docs.micropython.org/en/latest/esp32/quickref.html#pins-and-gpio

  • @penttiitkonen9765
    @penttiitkonen9765 4 หลายเดือนก่อน

    Would you do an example code that runs on desktop computer ( Linux or Windows) with bleak library that uses your esp32 ble micropython application.

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

    Al principio tenía un error, pero solucione el problema de conexión con el bluetooth cambiando el firmware a la version OTA, ya que las versiones normales detectaban el bluetooth pero no conectaban igual sucedía con el wifi y con eso ya puedo usar mi placa sin problemas

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

      Por favor me regalas el link de la versión OTA qué utilizaste, he tenido el mismo problema. Gracias

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

    Thank you for your vid really helpful but how about if I need to add passkey before connect how to codeing ?

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

      Seems like the adding a security key is not yet supported as of this writing (I could be wrong, so please correct me). Cheers.

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

    How do I connect to this using gatttool on a seperate computer? I am unable to connect using
    gatttool -b 30:C6:F7:0B:4E:D6 -I
    connect
    getting errors such as Function not implemented(38) or rarely Transport Endpoint is not connected(107)
    It's been suggested that I use the command gatttool -t random -b 30:C6:F7:0B:4E:D6 -I instead however that just results in connection refused.

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

    unfortunatelly I can't connect it to bluetooth serial, 'gatt status 8'

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

    Hi George. Is it also possible to send data from phone terminal to the esp32? Would you be also able to generate an example?
    Thanks,
    Regards
    Janez

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

      Hi Janez, that is demonstrated exactly in the video. Cheers.

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

      @@TechToTinker Hi George
      I am sorry, I was focused on example 2. It works, thanks, very nice example. Regards, Janez

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

    Great video. Do you have one in python 3 ?

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

    hi , im new using micropython i have a problem i have error status Gatt 133 , i have conected to diferent android devices and always return same message , the bluetooth looks like try to conect, the led stop blink but then some seconds lose or cant be conected ,, some help ?? thank you so much , great videos !!!

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

      Hi, I don't understand what you mean with "connected to different android devices"?

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

      @@TechToTinker i mean i have test whit many diferent Android devices and de result is the same : error Gatt 133 so i can't connect .....
      Do You know if is possible use classical Bluetooth and micropython ?

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

      @@hpsmexico3497 as I said in the video, Bluetooth classic is not yet supported by Micropython as far as I know.
      Try to watch again the video and carefully follow what I did, you might missed an important step that could lead to that error.
      You may also try a different MicroPython firmware preferably v1.14

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

      @@TechToTinker hi the problem was solve i was using version 1.16 y dowgrade to 1.14 and 1.12 al all is working perfect , thank you so much
      I your follower I hope you can make more videos about micropython in special ble and can bus
      Thank you so much !!!

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

      Nice, its to hear that you are able to solved it. Cheers.

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

    Hi George, any chance that you can do a video on getting readings from Xiaomi humidity and tempeture indicator (LYWSD03MMC). I can send you a unit if you plan to do one.

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

      Hi, of course. You may send me an email for further inquiry at tech.to.tinker@gmail.com

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

      I will contact you via email to arrange for the parcel

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

      Hi, have you received the Xiaomi humidity sensor?

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

      @@enquiry8918 no not yet. How do you send it? If you send through the traditional postal, it will take months to arrive.

  • @sahilchabra3006
    @sahilchabra3006 8 หลายเดือนก่อน +1

    my esp32 is not discoverable ??

    • @TheJavaSync
      @TheJavaSync 5 หลายเดือนก่อน

      Do you solved it? I got the same problem, ESP32_BT not detected

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

    Hi ,, if I put ble.send inside while loop gives error. I am trying to send data without pressing the button , but couldn't make it ,

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

      try to add some delays on it.

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

      @@TechToTinker didn't help, I just added while True:
      ble.send("hi")
      sleep(5)
      doesn't work gives error: OSError: -128

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

      @@tomipiriyev what happened if you run the example source code in the blog?

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

      @@TechToTinker it works fine, I just send you email about my issue

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

      Hi Tomi, I just updated the blog post at: techtotinker.blogspot.com/2021/08/025-esp32-micropython-esp32-bluetooth.html with additional example source code to address the issue.
      Hope this helps.
      As always, its George.

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

    I tried your code on ESP-WROOM-32. I cannot see the bluetooth device on my phone. What could be the issue?

    • @TheJavaSync
      @TheJavaSync 5 หลายเดือนก่อน

      Have you solved it? I got the same problem, ESP32_BT not detected

    • @neilfpv
      @neilfpv 5 หลายเดือนก่อน +1

      @@TheJavaSyncI became busy. I have not tried it again.

    • @lukakrasna942
      @lukakrasna942 4 หลายเดือนก่อน

      @@TheJavaSync Try chaning the: "bytearray('x02x01x02')" with "bytearray(b'\x02\x01\x02')", worked for me.

    • @lukakrasna942
      @lukakrasna942 4 หลายเดือนก่อน +1

      @@TheJavaSync Try replacing "bytearray('x02x01x02')" with "bytearray(b'\x02\x01\x02')" worked for me.

    • @TheJavaSync
      @TheJavaSync 4 หลายเดือนก่อน

      @@lukakrasna942 Thank You, I'll try it later.

  • @user-df4iq8dk6l
    @user-df4iq8dk6l 2 ปีที่แล้ว

    ZXNB!

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

      Hi
      Anyone with the micropython code I can run to connect and read data from the ESP32