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 - วิทยาศาสตร์และเทคโนโลยี
Hi George, thank you so much for sharing your knowledge, your channel is great, it's the best place to find content about Micropython.
Pleasure to help. Thank you.
Awesome George!
As always Kevin, thank you for the support :)
Your videos are always helpful. :) :)
Glad to hear that! Thanks.
Thanks so much, great video!
Hey glad you loved it. Thanks.
Thank you for this informative video!! Have a good time!
Thank you! You too!
nice video - good job
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!
Thank you for good information.
You are most welcome. Thanks.
Thanks!
Welcome! Thanks.
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"
Thanks for the video.👍
Glad you liked it. Cheers.
@@TechToTinker how can we control onboard LED or call a function with serial terminal app?
@@shubhamtelang9068 yes, of course. Show your code, what you have done so far.
@@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.
@@shubhamtelang9068 good job and you are most welcome. Cheers.
Can we do serial communication or any communication with ESP32 using python ?
i need an app that i can create controllers and when pressed it sends the ble message related to this button
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.
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!
Hi Ben, kindly refer to this: docs.micropython.org/en/latest/esp32/quickref.html#pins-and-gpio
Would you do an example code that runs on desktop computer ( Linux or Windows) with bleak library that uses your esp32 ble micropython application.
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
Por favor me regalas el link de la versión OTA qué utilizaste, he tenido el mismo problema. Gracias
Thank you for your vid really helpful but how about if I need to add passkey before connect how to codeing ?
Seems like the adding a security key is not yet supported as of this writing (I could be wrong, so please correct me). Cheers.
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.
unfortunatelly I can't connect it to bluetooth serial, 'gatt status 8'
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
Hi Janez, that is demonstrated exactly in the video. Cheers.
@@TechToTinker Hi George
I am sorry, I was focused on example 2. It works, thanks, very nice example. Regards, Janez
Great video. Do you have one in python 3 ?
What do you mean?
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 !!!
Hi, I don't understand what you mean with "connected to different android devices"?
@@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 ?
@@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
@@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 !!!
Nice, its to hear that you are able to solved it. Cheers.
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.
Hi, of course. You may send me an email for further inquiry at tech.to.tinker@gmail.com
I will contact you via email to arrange for the parcel
Hi, have you received the Xiaomi humidity sensor?
@@enquiry8918 no not yet. How do you send it? If you send through the traditional postal, it will take months to arrive.
my esp32 is not discoverable ??
Do you solved it? I got the same problem, ESP32_BT not detected
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 ,
try to add some delays on it.
@@TechToTinker didn't help, I just added while True:
ble.send("hi")
sleep(5)
doesn't work gives error: OSError: -128
@@tomipiriyev what happened if you run the example source code in the blog?
@@TechToTinker it works fine, I just send you email about my issue
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.
I tried your code on ESP-WROOM-32. I cannot see the bluetooth device on my phone. What could be the issue?
Have you solved it? I got the same problem, ESP32_BT not detected
@@TheJavaSyncI became busy. I have not tried it again.
@@TheJavaSync Try chaning the: "bytearray('x02x01x02')" with "bytearray(b'\x02\x01\x02')", worked for me.
@@TheJavaSync Try replacing "bytearray('x02x01x02')" with "bytearray(b'\x02\x01\x02')" worked for me.
@@lukakrasna942 Thank You, I'll try it later.
ZXNB!
Hi
Anyone with the micropython code I can run to connect and read data from the ESP32