Hello, is it possible to create more then one characteristics for service? ESP32_server seems to working correctly but if i add additional characteristics, client break connection. Have you got any ideas?
In this case, my SERVICE_UUID values are randomly generated. You want to try to make them unique for the environment they are being used. Usually, randomly generating the value is enough (there's a URL in the comments of the example). The same is sort of true for CHARACTERISTIC_UUID. You can generate your own values, but there are some predefined values that may be useful.
Hello , how to send data from BLE client to specific BLE server when client is connected to multiple servers where all the servers has same service and characteristic UUIDs??
can the esp32 be used as a usb signal transmitter through Bluetooth? I am working on a project where I'm trying to turn my mouse wireless, and I have no idea how to transmit the usb signal data with an esp32. Some advice in this matter would be very appreciated, thank you.
Thank you for sharing. Quick question, I am trying to send data from peripheral ble33 device to central ble33 device. Do you have any suggestions on how to accomplish it?
@@DragPlix Haven't found a solution so I've switch to 'NOW' which does 2 way communication like Bluetooth. Also I use the ESP32 as its own Access Point in other projects if I want any long range WiFi.
@@DragPlix you just need to set the characteristic property as read/ write on the server, then when the client gets the characteristic it changes its value with the pRemoteCharacteristic->writeValue();
Hi can you explain how to replace the HM10 by the ESP32 internal BLE so that the excisting IOS and Android apps can work with ESP32 BLE instead of HM10? Thx in advance.
hi thanks for the video, I am excited to test ist on my esp32 tomorrow. Do you think there is a chance to set up the communication between two esp32 such that sometimes A is the master and B the client and then upon a trigger on B they change their roles?
There might be a way to do that. I couldn't tell you how though unfortunately. How Bluetooth (and BLE) works has always been a little fuzzy to me. At some point, I'd like to dig a little deeper into the technology and figure it out. I'll probably have to come up with a project for that though.
for me "talk to each other" should be sending values back and forth. well i guess i have to play around with this because this doesn't look like a real two way since the value on the one side is never changed.
@@middleaged-downhiller Thanks for your quick reply. I can get two ESP32s to talk to each other through ESP-NOW without WIFI using MAC addresses. But I would like to do the same with BLE. It would great if you could point me in the right direction when you are able to.
@@middleaged-downhiller Could you please jell me with this too? I need to get two ESP32s to communicate with each other but I'm unable to do so for now.
@Martin Jurek @Malcolm Palmer: i think i had problems with the notify callback. SERVER ... // Create the BLE Device BLEDevice::init("LGSensorS001"); // Create the BLE Server pServer = BLEDevice::createServer(); pServer->setCallbacks(new MyServerCallbacks()); // Create the BLE Service BLEService *pService = pServer->createService(SERVICE_UUID); // Create a BLE Characteristic to send data pTxCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID_TX, BLECharacteristic::PROPERTY_NOTIFY ); pTxCharacteristic->addDescriptor(new BLE2902()); // Characteristic zum Daten empfangen (Client schickt mir Daten, hier dann LED an/aus) BLECharacteristic * pRxCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID_RX, BLECharacteristic::PROPERTY_WRITE ); pRxCharacteristic->setCallbacks(new ReceiveDataCallback()); // Start the service pService->start(); // Start advertising //pServer->getAdvertising()->start(); // muss ich nicht advertisen? geht ja auch so prima.... //von BLE_server: BLEAdvertising *pAdvertising = BLEDevice::getAdvertising(); pAdvertising->addServiceUUID(SERVICE_UUID); pAdvertising->setScanResponse(true); pAdvertising->setMinPreferred(0x06); // functions that help with iPhone connections issue pAdvertising->setMinPreferred(0x12); BLEDevice::startAdvertising(); Serial.println("Waiting a client connection to notify...");
This does not work. It will not broadcast the name. Here is the updated git to explain. I would love help on this one. github.com/nkolban/esp32-snippets/issues/599 In Addition: Do you know how to prevent the esp32 serial input from causing a heap overflow? ``` while(1) { if (Serial.available() > 0) { char_input = Serial.read(); if(char_input == ' ') { break; } input.concat(char_input); Serial.print(input); } } ``` This works but if you enter in say 1000 chars it will cause a crash. Is there anyway to prevent this? I know obviously not typing in so many chars but looking for a way to prevent this.
What is the latency between the ESP32 using BLE to send data to each other? My idea is to send an analog signal from one ESP32 to another and output the analog signal on a pin
@@richrizo1515 I didn't solve it sir. I think use wifi and NOT BLE could be faster for transmission but I'm still not sure if I can send analog signal over WiFi to another esp32
Remembering that a captured picture is just a stream of data, it should be possible. However, I couldn't tell you how to do it without some research tough. (Maybe that's not a bad idea)
i am cnfused that how can we share data? its only connection is established between server and client can u plz help?
Hello, is it possible to create more then one characteristics for service? ESP32_server seems to working correctly but if i add additional characteristics, client break connection. Have you got any ideas?
Is there a way to disconnect Client and Server connection? i can't find any function to do it. Its only have "disconnect_callback" function.
I'm unclear where he got the SERVICE_UUID etc strings from?
In this case, my SERVICE_UUID values are randomly generated. You want to try to make them unique for the environment they are being used. Usually, randomly generating the value is enough (there's a URL in the comments of the example).
The same is sort of true for CHARACTERISTIC_UUID. You can generate your own values, but there are some predefined values that may be useful.
@@BasementElectronics Ah, cool, thanks. I've got some ESP32 boards on order 😸
@____________________________.x Fantastic. I wish you luck
Hello , how to send data from BLE client to specific BLE server when client is connected to multiple servers where all the servers has same service and characteristic UUIDs??
can the esp32 be used as a usb signal transmitter through Bluetooth?
I am working on a project where I'm trying to turn my mouse wireless, and I have no idea how to transmit the usb signal data with an esp32.
Some advice in this matter would be very appreciated, thank you.
Thank you for sharing. Quick question, I am trying to send data from peripheral ble33 device to central ble33 device. Do you have any suggestions on how to accomplish it?
Can an esp32 be a server and at the same time be a client by just modifying the code?
What is the maximum range possible between the sender and receiver?
I can get the Server to send different values to the Client but how does the Client send a message back to the Server?
I am facing the same issue for last several weeks, have you found any solution? I would really appreciate if you can throw some light to it :)
@@DragPlix Haven't found a solution so I've switch to 'NOW' which does 2 way communication like Bluetooth. Also I use the ESP32 as its own Access Point in other projects if I want any long range WiFi.
@@DragPlix you just need to set the characteristic property as read/ write on the server, then when the client gets the characteristic it changes its value with the pRemoteCharacteristic->writeValue();
@@malcolmpalmer2437 ⬆️
In case you’re talking about serial communications ( write message on serial ) you can use the UART example
Hi can you explain how to replace the HM10 by the ESP32 internal BLE so that the excisting IOS and Android apps can work with ESP32 BLE instead of HM10? Thx in advance.
60FPS, big plus
Hi! Do you know any method to limit on the server the number of incomming connections (clients) to one? Thank you.
can client send data to server, if yes , can you suggest a code?
How can we work around esp32 ble signal when blocked by a human body? Like an antenna or something.. Please help
What is the serial monitor app that you are using in the video?
It's called MobaXterm. It's free for personal use (if you don't mind the nag screen).
@@BasementElectronics Thanks very much :)
Hi. Viewer's you can watch @speed of 1.75.
hi thanks for the video, I am excited to test ist on my esp32 tomorrow. Do you think there is a chance to set up the communication between two esp32 such that sometimes A is the master and B the client and then upon a trigger on B they change their roles?
There might be a way to do that. I couldn't tell you how though unfortunately.
How Bluetooth (and BLE) works has always been a little fuzzy to me. At some point, I'd like to dig a little deeper into the technology and figure it out. I'll probably have to come up with a project for that though.
Recently I get a TB-02 from ai thinker, BT5.0 Mesh, apart of that there is not any demo r how to use that one? Can you help us please?
for me "talk to each other" should be sending values back and forth. well i guess i have to play around with this because this doesn't look like a real two way since the value on the one side is never changed.
I have the same problem. How do I get the Client to reply to the Server?
Have you solved this problem yet?
@@malcolmpalmer2437 i did get it to run ... can't remember now but i can take a look at it next week - i'm not home this weekend
@@middleaged-downhiller Thanks for your quick reply. I can get two ESP32s to talk to each other through ESP-NOW without WIFI using MAC addresses. But I would like to do the same with BLE. It would great if you could point me in the right direction when you are able to.
@@middleaged-downhiller Could you please jell me with this too? I need to get two ESP32s to communicate with each other but I'm unable to do so for now.
@Martin Jurek @Malcolm Palmer:
i think i had problems with the notify callback.
SERVER
... // Create the BLE Device
BLEDevice::init("LGSensorS001");
// Create the BLE Server
pServer = BLEDevice::createServer();
pServer->setCallbacks(new MyServerCallbacks());
// Create the BLE Service
BLEService *pService = pServer->createService(SERVICE_UUID);
// Create a BLE Characteristic to send data
pTxCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID_TX,
BLECharacteristic::PROPERTY_NOTIFY
);
pTxCharacteristic->addDescriptor(new BLE2902());
// Characteristic zum Daten empfangen (Client schickt mir Daten, hier dann LED an/aus)
BLECharacteristic * pRxCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID_RX,
BLECharacteristic::PROPERTY_WRITE
);
pRxCharacteristic->setCallbacks(new ReceiveDataCallback());
// Start the service
pService->start();
// Start advertising
//pServer->getAdvertising()->start(); // muss ich nicht advertisen? geht ja auch so prima....
//von BLE_server:
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
pAdvertising->addServiceUUID(SERVICE_UUID);
pAdvertising->setScanResponse(true);
pAdvertising->setMinPreferred(0x06); // functions that help with iPhone connections issue
pAdvertising->setMinPreferred(0x12);
BLEDevice::startAdvertising();
Serial.println("Waiting a client connection to notify...");
I want to connect an esp32 as a slave to HM-10 as a master, is that possible?
how to get bel advatisement data using esp32
sir how to find the rssi value of esp32 BLE
This was done a while ago and I can't remember exactly how I did it.
I did use a Bluetooth scanner that showed me the communications as they happened.
how many esp communication same time it means 1 master esp and how many esp as slave connected;
This is what I want to know as well
could you solved your question? i want made something similar
This does not work. It will not broadcast the name. Here is the updated git to explain. I would love help on this one. github.com/nkolban/esp32-snippets/issues/599
In Addition:
Do you know how to prevent the esp32 serial input from causing a heap overflow?
```
while(1)
{
if (Serial.available() > 0)
{
char_input = Serial.read();
if(char_input == '
')
{
break;
}
input.concat(char_input);
Serial.print(input);
}
}
```
This works but if you enter in say 1000 chars it will cause a crash. Is there anyway to prevent this? I know obviously not typing in so many chars but looking for a way to prevent this.
What is the latency between the ESP32 using BLE to send data to each other? My idea is to send an analog signal from one ESP32 to another and output the analog signal on a pin
could you solved your question? i want made something similar
@@richrizo1515 I didn't solve it sir. I think use wifi and NOT BLE could be faster for transmission but I'm still not sure if I can send analog signal over WiFi to another esp32
Ble is for short pulses of data, to save battery power...Realtime Analog needs a constant stream..... Classic Bluetooth or WiFi on these boards
I want to capture picture by ESP32 and send via built-in bluetooth to my Laptop bluetooth.
Is it possible?
Remembering that a captured picture is just a stream of data, it should be possible.
However, I couldn't tell you how to do it without some research tough. (Maybe that's not a bad idea)
@@BasementElectronics
Thank you for hint I am researching and learning how to do it
Please share if you find anything. Is love to know how to do it
@@BasementElectronics I am trying to caputure image by ESP32 CAM and send it to Raspberri Pi using BLE. Could someone help please?