Thank you for your feedback, happy it is useful! Let me know if you post your code online. I am now making a video on Xamarin and BLE as per request. I have not looked into Flutter yet.
Perfect clear explanation. What i miss is a video or tutorial where a ESP32 server sends a long string or array to the client ( on pc or tablet). In my case i want to getthe IMU data grouped in measurements of 100+ points of 9 DOF, added with microphone info. These infos have to be sent every minute. I cannot find a good example on this. If you find the time, that would be great and help a lot of people.
Thank you very much for your feedback. The problem you raise is indeed not very straightforward. Unfortunately I am completely swamped with work (hence the late response) and I have no time for creating content. I hope this will change in the mid-term, but for now I unfortunately cannot assist.
Very well done. You break the process down into small enough chunks to understand the communications between server and client. If I have a system which one of the two devices has to run on battery. And I will be putting the remote device into sleep mode. Would it be best to make that device the server or client, as far as power consumption goes ? I only need to be concerned with communications between those two devices.
Great video as usual. Fixed my problem running out of characteristics which was also hidden by a problem with App Inventor where creating a 4th RegisterForBytes caused the phone emulator to crash. Unfortunately now registering a 5th characteristicUuid causes it to crash although strangely not if I set it's global to a previous global Uuid. Very frustrating without log files.
Great to hear that you were able to solve the problem on the server side for scaling characteristics. When you say the phone emulator crashes, do you mean the nRF app? That would be a bit surprising to me as it has been quite stable for me.
Thank you so much for the videos, it helps a lot! One Question pls. How can I work with the Value in server, that the client sent(notify) with the CharacteristicCallback function?
Let me make sure I understand the question correctly: you are asking how you can use the value received in the CharacteristicCallback function in the main loop on the server? Basically you can make a global variable, assign it in the callback and use it in the loop. See as well: arduino.stackexchange.com/questions/77882/how-to-get-variable-from-callback-function Hope this helps
Thanks for your tutorials. I learned a lot from this. One question: do I have to create a separate class for each characteristic that I monitor with a CallbackFunction, or can I write all callbacks in one class?
hi sir I want to connect the esp32 to other esp32 through BLE but i want the server to connect with client manually. and how can i send data from serial monitor by user to the client.
It definitely is possible to take data from the serial monitor and the forward it through BLE. However, I have not looked into this myself yet. As I am swamped with work at the moment I cannot assist here. My apologies.
Sir, thank you! for your tutorials, I watched your previous tutorials about webpage with json but I stuck to move on this, please! can you give advantages BLE at least 5 to understand?
sorry Sir, am new in these learning, but I need just short written importance of using BLE or anyway Sir if I have questions about previous tutorials can I ask? and where? I worry to comment on past several months, please! help me.
It is unclear to me what exactly you need help with. BLE is useful for applications where you need to be energy efficient. Wifi consumes a lot more energy but provides a higher bandwidth. As for your question on where to ask questions: best is to ask these with the video that covers that topic. I do check questions with older videos as well. However, please try to be specific. Thank you
could you please share a code, or atleast a resource, for ESP32-ESP32 two way communication(half duplex) via router? I am looking into UDP and TCP protocols but am not able to code on my own.
Pls check out this series on WiFi with the ESP32: ua-cam.com/video/15X0WvGaVg8/v-deo.html I still have not had time to make the video on ESP32 to ESP32 communication with WiFi, but that should be relatively straightforward if you follow Part 2 and Part 3 of this series. Am now finishing a video on Xamarin, but will upload it after that.
Hi nice video! Thanks, it helped me so much. Is it possible to a ESP32 server connect to 2 clients? If it is do you have an example code or could you make an video about it? I would appreciate so so much... I want to make an ESP32 wifi gateway, I already tried it with espnow, but apparently it blocks one each oder, perhaps I could use ble instead espnow.
Yes, it is possible to connect 2 clients to a single server with BLE. However, I have not tested this yet myself. At the moment I am quite busy with work, but will look into it when I have some free time again.
Hi I try to replace the HM10 by the ESP32 BLE, can you help me? I want to use APP's that work with HM10 also with the ESP32 BLE. Stuck now. Can we mail? Thx
In general I have only tested with nordic whether the BLE server is setup correctly. It is a very powerful tool, but I have not yet looked into the functionality you are asking for. Hope you find a good solution.
Thank you for yet another great video 👍 I have gotten my server (a Wii Nunchuck communicating over BLE) to work with eight characteristics, as per your tutorial. However, I get kind of the same problem on the client side. It only reads the four first (out of my eight) charateristics, and I can't find any way to increase this, analogus to increasing the numHandles parameter in "createService" on the server side. Do you know how this could be fixed?
I just tried to read more characteristics and this worked without a problem. Please refer to my github page for the code I used. It read in all 9 Characteristics without a problem.
@@mothunderz Thank you for your swift reply. I have looked at your code in "BLE_client_many_char.ino" and as far as I can see , in the notifyCallback() function you only look for the first UUID. I have expanded upon your code, looking for seven differnet UUID notifications, and only the first four gets detected. Have you tried to detect all nine UUID notifications in the callback function?
@Johan Thank you for coming back to me with this. I could reproduce the limitation you describe above. I created a server with 8 notifications and could only detect four at the receiver. However, after a bit more investigation I saw that this is a receiver problem -> when I tested with the nRF app as receiver everything was working fine. After (quite) a bit of Googling it seems that the reason is that the ESP32 is limited in HW to receive only 4 notifications. However, I did create a workaround for you. Please navigate to: github.com/mo-thunderz/Esp32BleManyChars and download BLE_many_notify_workaround_server/client. In this example I use one notification to read out 8 characteristics. I hope this works for you.
@@mothunderz You are brilliant. Good detective work! And a smart work around, that should work for me, as I control both the server and the client. Thank you for helping me out and for your good videos.
I am now writing a flutter ble app to connect to the arduino. Pretty impressed by your tutorials, APPRECIATE IT
Thank you for your feedback, happy it is useful! Let me know if you post your code online. I am now making a video on Xamarin and BLE as per request. I have not looked into Flutter yet.
FYI: just uploaded my video on Xamarin and BLE
ua-cam.com/video/SfGuLsKeOeE/v-deo.html
Great video
Once again, clear and well explained, especially the reason for and logic of the callback.
thank you!
My pleasure, glad you liked it!
Perfect clear explanation. What i miss is a video or tutorial where a ESP32 server sends a long string or array to the client ( on pc or tablet). In my case i want to getthe IMU data grouped in measurements of 100+ points of 9 DOF, added with microphone info. These infos have to be sent every minute.
I cannot find a good example on this. If you find the time, that would be great and help a lot of people.
Thank you very much for your feedback. The problem you raise is indeed not very straightforward. Unfortunately I am completely swamped with work (hence the late response) and I have no time for creating content. I hope this will change in the mid-term, but for now I unfortunately cannot assist.
Thanks for sharing your knowledge 👍
My pleasure
Very well done. You break the process down into small enough chunks to understand the communications between server and client.
If I have a system which one of the two devices has to run on battery. And I will be putting the remote device into sleep mode. Would it be best to make that device the server or client, as far as power consumption goes ? I only need to be concerned with communications between those two devices.
Great video as usual. Fixed my problem running out of characteristics which was also hidden by a problem with App Inventor where creating a 4th RegisterForBytes caused the phone emulator to crash. Unfortunately now registering a 5th characteristicUuid causes it to crash although strangely not if I set it's global to a previous global Uuid. Very frustrating without log files.
Great to hear that you were able to solve the problem on the server side for scaling characteristics. When you say the phone emulator crashes, do you mean the nRF app? That would be a bit surprising to me as it has been quite stable for me.
Hello! Have you tried to connect 2 clients to 2 characteristics of one server?
Hello! Do you know if it is possible to connect 2 esp32 to 2 different characteristics of one server?
Do you have any example of communication between a BLE server and a BLE client in INDICATE characteristic mode. Any hint?
Thank you so much for the videos, it helps a lot! One Question pls. How can I work with the Value in server, that the client sent(notify) with the CharacteristicCallback function?
Let me make sure I understand the question correctly: you are asking how you can use the value received in the CharacteristicCallback function in the main loop on the server? Basically you can make a global variable, assign it in the callback and use it in the loop. See as well:
arduino.stackexchange.com/questions/77882/how-to-get-variable-from-callback-function
Hope this helps
Thanks for your tutorials. I learned a lot from this.
One question: do I have to create a separate class for each characteristic that I monitor with a CallbackFunction, or can I write all callbacks in one class?
I have not tried that yet, but it should be possible to use the same callback function for multiple characteristics
I would recommend to write all callbacks in the same class. You can read the UUID from pChar to figure out which Characteristic was received.
hi sir I want to connect the esp32 to other esp32 through BLE but i want the server to connect with client manually. and how can i send data from serial monitor by user to the client.
It definitely is possible to take data from the serial monitor and the forward it through BLE. However, I have not looked into this myself yet. As I am swamped with work at the moment I cannot assist here. My apologies.
Sir, thank you! for your tutorials, I watched your previous tutorials about webpage with json but I stuck to move on this, please! can you give advantages BLE at least 5 to understand?
My apologies, but I do not understand your request. What do you mean with "can you give advantages BLE at least 5"? Do you mean examples?
sorry Sir, am new in these learning, but I need just short written importance of using BLE or anyway Sir if I have questions about previous tutorials can I ask? and where? I worry to comment on past several months, please! help me.
It is unclear to me what exactly you need help with. BLE is useful for applications where you need to be energy efficient. Wifi consumes a lot more energy but provides a higher bandwidth. As for your question on where to ask questions: best is to ask these with the video that covers that topic. I do check questions with older videos as well. However, please try to be specific. Thank you
ok, thank you! Sir, I understand
could you please share a code, or atleast a resource, for ESP32-ESP32 two way communication(half duplex) via router? I am looking into UDP and TCP protocols but am not able to code on my own.
Pls check out this series on WiFi with the ESP32:
ua-cam.com/video/15X0WvGaVg8/v-deo.html
I still have not had time to make the video on ESP32 to ESP32 communication with WiFi, but that should be relatively straightforward if you follow Part 2 and Part 3 of this series. Am now finishing a video on Xamarin, but will upload it after that.
Hi nice video!
Thanks, it helped me so much.
Is it possible to a ESP32 server connect to 2 clients?
If it is do you have an example code or could you make an video about it? I would appreciate so so much...
I want to make an ESP32 wifi gateway, I already tried it with espnow, but apparently it blocks one each oder, perhaps I could use ble instead espnow.
Yes, it is possible to connect 2 clients to a single server with BLE. However, I have not tested this yet myself. At the moment I am quite busy with work, but will look into it when I have some free time again.
Hi I try to replace the HM10 by the ESP32 BLE, can you help me? I want to use APP's that work with HM10 also with the ESP32 BLE. Stuck now. Can we mail? Thx
My apologies, but I unfortunately do not have the time at the moment to re-write code from HM10 to ESP32.
Hi; are we be able to use nordic app upload a video and read that data?
In general I have only tested with nordic whether the BLE server is setup correctly. It is a very powerful tool, but I have not yet looked into the functionality you are asking for. Hope you find a good solution.
The 37th person who liked this vid. Thank you Engr MoThunderz! 💫
Thank you very much for your feedback! Very much appreciated
Thank you for yet another great video 👍 I have gotten my server (a Wii Nunchuck communicating over BLE) to work with eight characteristics, as per your tutorial. However, I get kind of the same problem on the client side. It only reads the four first (out of my eight) charateristics, and I can't find any way to increase this, analogus to increasing the numHandles parameter in "createService" on the server side. Do you know how this could be fixed?
Thank you for your comment. I will look into this, however, I am traveling this week, so it will take me some time
I just tried to read more characteristics and this worked without a problem. Please refer to my github page for the code I used. It read in all 9 Characteristics without a problem.
@@mothunderz Thank you for your swift reply. I have looked at your code in "BLE_client_many_char.ino" and as far as I can see , in the notifyCallback() function you only look for the first UUID. I have expanded upon your code, looking for seven differnet UUID notifications, and only the first four gets detected. Have you tried to detect all nine UUID notifications in the callback function?
@Johan Thank you for coming back to me with this. I could reproduce the limitation you describe above. I created a server with 8 notifications and could only detect four at the receiver. However, after a bit more investigation I saw that this is a receiver problem -> when I tested with the nRF app as receiver everything was working fine. After (quite) a bit of Googling it seems that the reason is that the ESP32 is limited in HW to receive only 4 notifications. However, I did create a workaround for you. Please navigate to:
github.com/mo-thunderz/Esp32BleManyChars
and download BLE_many_notify_workaround_server/client. In this example I use one notification to read out 8 characteristics. I hope this works for you.
@@mothunderz You are brilliant. Good detective work! And a smart work around, that should work for me, as I control both the server and the client. Thank you for helping me out and for your good videos.