An ESP32 technical tutorial that builds on previous C++ BLE tutorials. This one is similar to a previous one also on BLE notifications but adds more depth.
КОМЕНТАРІ: 72
@axa.axa.4 роки тому
12:50 Neil doesn't monitor this project anymore, but others should know he got the notification and indication definitions backwards. Its a Indication that requires a response, while a Notification doesn't
@koz6 років тому
Excellent clear explanation. Thank you!
@olaniyioluseun82505 років тому
Thank you so much for this comprehensive tutorial. Almost 2 years made available and still very relevant. Have carefully used your steps but I will like to know how to read temperature data via a simple python code on raspberry-pi. Pardon my ignorance, I am entirely new to python, and I've been using it for a project which the ESP32 has become useful and with your explanatory tutorial, much more resourceful. Thanks.
@Set1ish5 років тому
Great video and speak! Very crystal exposition.
@fabioricardodeoliveira94513 роки тому
Hello Mr Kolban, this is a wonderful class...
@MURATSPLAT5 років тому
Hello from Turkey @kolban it is great stuff for understanding a BLA device and ESP32 communication..
@Olfox26 років тому
Great tutorial Kolban... as usual :) . I want to test now !
@juergenwickenhaeuser33296 років тому
Thanks for your very good explanation!
@SkyRiderJavelin2 роки тому
Excellent video well presented clear and understandable , thanks very much
@siowlimchow77556 років тому
Very well explained.
@RaadYacu6 років тому
Very Informative Kolban - need to put this info to use. I have to say, this is the most detailed about BT I have seen so far
@kolbantechnicaltutorials47156 років тому
Thanks Raad. I'm still walking the learning path for BLE myself so my posts and videos should always have the disclaimer "... To the best of my knowledge" and I welcome questions as those cause me to query my own models as well as guide on where I should study and try and assist others. I recommend the ESP32 forum for posting questions on BLE in general. That way as many folks as possible might benefit and chime in with thinking. See esp32.com/index.php.
@RaadYacu6 років тому
Got your book also. You will mentoring me without knowing it. Again - great job
@RaadYacu6 років тому
Neil I was reading your book and it referred to the iTAG as a BLE to test against with ESP acting as the master and the iTAG as a peripheral However, for the life of me I cannot get the service to notify me when a button is pressed. Am I missing something? I am able to connect to the device from esp32 but thats about it. Is that not the 0xffe0 service ?
@vishnunaikdhanavath6 років тому
Hi, Kolban thanks for your clear explanation. I am having a doubt If the client(Sensor) has to send data to the server(ESP32) over Bluetooth what are the changes I need to do in the above code?
@marcotulio-analogchannel3065 років тому
Hello Kolban!!! Thanks for sharing!!! is it possible to connect two esp32 with BLE (one as a server an another as a client) ? how to do it?
@larsfagerbakke21405 років тому
Very useful, thanks!
@michaellin66962 роки тому
nice tutorial, thanks heaps.
@MoodersInit6 років тому
brilliant :D
@InfoRoboteaK5 років тому
Hi! Thanks for the video! I have an issue. I'm using Arduino IDE and I don't know how to get the device UUID of the ESP32. Do you have an idea? I need it for show it on a QR code and connect it from an iOS app. Thanks!
@frankji24102 роки тому
very nice
@ljay07782 роки тому
Wonderfull!
@tinkerk60195 років тому
Hello Kolban Thanks for this great tutorial. I am doing one project in which I need to transfer an audio file from our mobile phone to esp32 via bluetooth, please provide some sort of guidance for it.
@justdoingodsworkРік тому
Great tutorial helped me clear lots of thing regarding BLE. But Still I need help with to know how to disconnect client from server after certain counter value. Then starts new service with different UUID & Characteristics. For connection of new client.
@xyber26 років тому
Hi, great videos, I learned a lot, thanks! I'm thinking on using ESP32 in my engineering thesis on WSN bluetooth network. Would You consider covering also programming ESP32 as client, and communicating 2 ESP32's with each other using BLE? That would be great!
@kolbantechnicaltutorials47156 років тому
Howdy and thanks for the kind words. My immediate thinking is that since we have got videos for using an ESP32 as a server and a second video for using ESP32 as a client, the idea of using two ESP32s to talk to each other should just "fall out" from using them in that fashion. Let me suggest you might have a go and then if you have issues, you can post the questions/comments to this forum thread ... esp32.com/viewtopic.php?f=13&t=2330
@iiilllii140Рік тому
Could you link the video to the c++ classes that encapsulate those BLE functions, you mentioned, I can't find it.
@diegosantosinsua3 роки тому
ehhhh, it is great !!! thk a loat !! please conitune put more videos men !!
@swapniilkanwar85982 роки тому
Sir can you please clarify the 'notification' and 'indication' definition. On various websites it is said that indicate needs acknowledgement and notify doesn't. This is creating a problem in an experiment I am conducting.
@LuisVazquez-kj1ym3 роки тому
Hello thanks, can you helpme im try to do with HM-10 BLE module
@piotrolczyk26792 місяці тому
Do you have any example of communication between a BLE server and a BLE client in INDICATE characteristic mode. Any hint?
@Fantonrko3 роки тому
I dont know why, but BLE taking 70-110 mA in works, how i can decrease value ?
@omarcampos65203 роки тому
hi :) can u help me? how can i disconnect bluetooth after 5 second?
@gudimetlakowshik36174 роки тому
Hey kolban.....That's really very nice work...Thanks....I have a small issue....I established a connection between server and client successfully and I am able to send the data successfully. But, I want a small change here. I will be manually writing the data to the server using a mobile application and I want to transmitt the same data to the client over BLE. Is this possible?? Please help me out..
@sdplusm35 років тому
Dear Kolban, thank you for the nice video tutorial. At 13:02 you indicate that when the server performs a notification it will receive an ACKnowledge when the server performs an Indication, it is fire and forget. Shouldn't it be reversed? I mean notification is fire and forget, Indication requires an ACKnowledge. Thank you.
@axa.axa.4 роки тому
youre right
@Menarafineart4 роки тому
Hi thanks for the tutorials please can you refer me to a book. I am trying to adapt this technologie to my b2b saas any help will be very welcome
@FLBRGZ4 роки тому
Hello, you are a very smart person, one who likes a challenge?. I have a problem. I want to connect to Zwift cycling program as ble ftms and receive gradient or resistance data, I want to build my own smart indoor trainer. I can connect as heart rate, speed and cadence with my esp32 but not as fitness machine. Any ideas? Anyway I will check out your other videos. Regards Paul.
@MubinIcyer6 років тому
Thanks for great tutorial. What is this phone emulator?
@sanshotur6 років тому
vysor
@kolbantechnicaltutorials47156 років тому
As Alexander says, the software I am using is Vysor but it isn't an emulator. Its the ability to visually expose my Android phone onto my Windows 10 PC desktop. Gives me keyboard and mouse without me having to peer over my phone.
@Turbo_Tastic5 років тому
The Android app he is using is called nRF Connect for Mobile
@leonvilfand21922 роки тому
Excellent tutorial! Thanks. Question: BLE 5.0 support on newer ESP32 SoC means that in theory our BLE signal range should increase 4 times (compared to ESP SoC with BLE4.2, which should only be around 10m or so). But what is it in practice? Is there a real difference in BLE range between ESP32 SoC running BLE4.2 vs the newer ESP32 SoC running BLE5.0. ?
@matthewhenderson4690Рік тому
I get a ton of red error messages from this code and it doesn't compile :(
@siowlimchow77556 років тому
Hi Kolban, Would you please share the Git link of the source? I tried to google it. However, i found github.com/nkolban?page=2&tab=repositories, but I could not find the BLE notifications source. Help please?
@kolbantechnicaltutorials47156 років тому
The samples can be found here ... github.com/nkolban/esp32-snippets/tree/master/cpp_utils/tests/BLETests I think this is where the source is likely to be found.
@AgilityJumps6 років тому
Hi Kolban, very interesting thank you, can you post a link to the sample code?
@AgilityJumps6 років тому
Sorry i found it .... thank you :-) github.com/nkolban/esp32-snippets/tree/master/cpp_utils/tests/BLE%20Tests
@AgilityJumps6 років тому
Hi Kolban i try to load into my ESP32 your sample code, but i bekome errors: C:/esp/BLE_Test/components/cpp_utils/BLEDescriptor.cpp: In member function 'void BLEDescriptor::executeCreate(BLECharacteristic*)': C:/esp/BLE_Test/components/cpp_utils/BLEDescriptor.cpp:67:12: error: invalid conversion from 'int' to 'esp_gatt_perm_t' [-fpermissive] &control); ^ In file included from C:/esp/BLE_Test/components/cpp_utils/BLEService.h:13:0, from C:/esp/BLE_Test/components/cpp_utils/BLEDescriptor.cpp:16: C:/msys32/home/user/esp/esp-idf/components/bt/bluedroid/api/include/esp_gatts_api.h:393:11: note: initializing argument 3 of 'esp_err_t esp_ble_gatts_add_char_descr(uint16_t, esp_bt_uuid_t*, esp_gatt_perm_t, esp_attr_value_t*, esp_attr_control_t*)' esp_err_t esp_ble_gatts_add_char_descr (uint16_t service_handle, ^ make[1]: *** [/home/user/esp/esp-idf/make/component_wrapper.mk:177: BLEDescriptor.o] Error 1 make: *** [C:/msys32/home/user/esp/esp-idf/make/project.mk:386: cpp_utils-build] Error 2 I make flash.... Can you check ? Thankyou....
@kolbantechnicaltutorials47156 років тому
howdy ... post to this thread ... esp32.com/viewtopic.php?f=13&t=2330 the puzzle or ping me on IRC in ESP32 channel. ... We'll get you going.
@kolbantechnicaltutorials47156 років тому
I just did a clean build with no issues ... however, that doesn't mean that what was on Github didn't contain some error so I just synched the best so far with Github right now as of this time.
@AgilityJumps6 років тому
Thankyou i try now :-)
@browaruspierogus21826 років тому
What IDE and environment is it? How to set it up?
@naasikhendricks15016 років тому
Browarus Pierogus Eclipse, and IDF.
@seigel6 років тому
Looks like CLion
@akshaypohankar37846 років тому
hi, thank you for all these interesting videos. I want to ask for a small help "I want to use BLE to communicate with a smartphone app i am using Sparkfun esp 32 things and Arduino for programming " can you point me to a suitable code or tutorials. thank you all in advance
@kolbantechnicaltutorials47156 років тому
It might be that Blynk is what you need ... www.blynk.cc/ For the ESP32, have a look at this thread. esp32.com/viewtopic.php?f=13&t=2330
@akshaypohankar37846 років тому
no we can not use blynk one of my team members is making Android app he just want me a way communicate with SparkFun esp 32 things using Bluetooth a lot of other parts of this project are programmed in Arduino hence Arduino is preferred
@akshaypohankar37846 років тому
hi thanks for all the help you are doing today i found your esp 32 ble Arduino library in library manager so i dawnloaded to my arduino 1.6 and tryed to run it in my esp32(wroom 32 dev kit ) but it gave me fallowing error C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp: In static member function 'static std::__cxx11::string BLEUtils::gattClientEventTypeToString(esp_gattc_cb_event_t)': C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:344:8: error: 'ESP_GATTC_CONNECT_EVT' was not declared in this scope case ESP_GATTC_CONNECT_EVT: ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:346:8: error: 'ESP_GATTC_DISCONNECT_EVT' was not declared in this scope case ESP_GATTC_DISCONNECT_EVT: ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp: In static member function 'static void BLEUtils::dumpGattClientEvent(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)': C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:684:8: error: 'ESP_GATTC_CONNECT_EVT' was not declared in this scope case ESP_GATTC_CONNECT_EVT: { ^ In file included from C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:22:0: C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:686:44: error: 'union esp_ble_gattc_cb_param_t' has no member named 'connect' BLEUtils::gattStatusToString(evtParam->connect.status).c_str(), ^ C:\Users\Akshay\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log/esp_log.h:144:168: note: in definition of macro 'ESP_LOGD' #define ESP_LOGD( tag, format, ... ) if (LOG_LOCAL_LEVEL >= ESP_LOG_DEBUG) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:687:15: error: 'union esp_ble_gattc_cb_param_t' has no member named 'connect' evtParam->connect.conn_id, ^ C:\Users\Akshay\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log/esp_log.h:144:168: note: in definition of macro 'ESP_LOGD' #define ESP_LOGD( tag, format, ... ) if (LOG_LOCAL_LEVEL >= ESP_LOG_DEBUG) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:688:26: error: 'union esp_ble_gattc_cb_param_t' has no member named 'connect' BLEAddress(evtParam->connect.remote_bda).toString().c_str() ^ C:\Users\Akshay\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log/esp_log.h:144:168: note: in definition of macro 'ESP_LOGD' #define ESP_LOGD( tag, format, ... ) if (LOG_LOCAL_LEVEL >= ESP_LOG_DEBUG) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:700:8: error: 'ESP_GATTC_DISCONNECT_EVT' was not declared in this scope case ESP_GATTC_DISCONNECT_EVT: { ^ In file included from C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:22:0: C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:702:44: error: 'union esp_ble_gattc_cb_param_t' has no member named 'disconnect' BLEUtils::gattStatusToString(evtParam->disconnect.status).c_str(), ^ C:\Users\Akshay\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log/esp_log.h:144:168: note: in definition of macro 'ESP_LOGD' #define ESP_LOGD( tag, format, ... ) if (LOG_LOCAL_LEVEL >= ESP_LOG_DEBUG) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:703:15: error: 'union esp_ble_gattc_cb_param_t' has no member named 'disconnect' evtParam->disconnect.conn_id, ^ C:\Users\Akshay\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log/esp_log.h:144:168: note: in definition of macro 'ESP_LOGD' #define ESP_LOGD( tag, format, ... ) if (LOG_LOCAL_LEVEL >= ESP_LOG_DEBUG) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } ^ C:\Users\Akshay\Documents\Arduino\libraries\ESP32_BLE_Arduino\src\BLEUtils.cpp:704:26: error: 'union esp_ble_gattc_cb_param_t' has no member named 'disconnect' BLEAddress(evtParam->disconnect.remote_bda).toString().c_str() ^ C:\Users\Akshay\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log/esp_log.h:144:168: note: in definition of macro 'ESP_LOGD' #define ESP_LOGD( tag, format, ... ) if (LOG_LOCAL_LEVEL >= ESP_LOG_DEBUG) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } ^ exit status 1 Error compiling for board ESP32 Dev Module. what have i done wrong any suggestions. i tried several options but all my other codes are complining and uploading except exampal codes from this library .
@kolbantechnicaltutorials47156 років тому
Howdy, Have a look at the following Github issue which I hope will explain the story.... github.com/nkolban/esp32-snippets/issues/59 If not, please feel free to create issues on this repository for resolution.
@akshaypohankar37846 років тому
a very nice and detailed explanation I did what you said removed my old esp 32 Arduino files and added new using git GUI and then tried your BLE_uart example it worked very well thank you i wish i could show you images
@kolbantechnicaltutorials47156 років тому
Ashkay ... the knowledge that it worked for you is thanks enough.
@akshaypohankar37846 років тому
sorry for disturbing you again but when I tried to use this library for Sparkfun things board it gave me following error i tried no of different things but the problem is not solved. the error message Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0010,len:4 load:0x3fff0014,len:588 load:0x40078000,len:0 load:0x40078000,len:9880 entry 0x400789d8 abort() was called at PC 0x400d8cd3 on core 0 Backtrace: 0x4008832c:0x3ffdc360 0x4008842b:0x3ffdc380 0x400d8cd3:0x3ffdc3a0 0x400da342:0x3ffdc3c0 0x400da4ce:0x3ffdc3e0 0x400da819:0x3ffdc420 0x400da859:0x3ffdc450 0x400da869:0x3ffdc470 0x400d667e:0x3ffdc490 0x400d52f9:0x3ffdc4b0 0x400d410d:0x3ffdc4f0 0x400f340d:0x3ffdc510 0x400ef4b2:0x3ffdc550 Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0010,len:4 load:0x3fff0014,len:588 load:0x40078000,len:0 load:0x40078000,len:9880 entry 0x400789d8 abort() was called at PC 0x400d8cd3 on core 0 Backtrace: 0x4008832c:0x3ffdc360 0x4008842b:0x3ffdc380 0x400d8cd3:0x3ffdc3a0 0x400da342:0x3ffdc3c0 0x400da4ce:0x3ffdc3e0 0x400da819:0x3ffdc420 0x400da859:0x3ffdc450 0x400da869:0x3ffdc470 0x400d667e:0x3ffdc490 0x400d52f9:0x3ffdc4b0 0x400d410d:0x3ffdc4f0 0x400f340d:0x3ffdc510 0x400ef4b2:0x3ffdc550 Rebooting...
@kolban16 років тому
Howdy, let me suggest you create an issue on the Github repository to try and debug problems. The repository can be found here: github.com/nkolban/esp32-snippets
@joepalazzolo74754 роки тому
So much good stuff. For anyone looking for the SampleNotify.cpp file, as of this comment it is found here: github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/
@hikolanikola87752 роки тому
how the fck do we send data by notifications bidirectional...
@unlokia6 років тому
Careful now, you're gonna have the girls falling *all over you* talking like this...