I'm trying to make a app to connect with Bluetooth Low Energy to a esp32, but, when he should send a data to esp32 the app close. I'm using the extension BluetoothLE
Posted
led.aia (427.2 KB)
Are you sending data to an Arduino? What kind?(uno, mega, micro)
Try this code:
In your block BluetoothLE2.Connected, delete StartScanning.
Change UUID char with https://www.uuidgenerator.net/
Here more examples:
Hello friends,
I'll write in this topic about BLE on ESP32, send and receive text, with clock and without clock. Notify. I'll use the codes of Neil Kolban .
0.- Board D1 R32 ESP32.
This is a cheap card ($ 5) with the dimensions and shape of the Arduino UNO, but with the ESP32.
[esp322pin_h]
Search images: D1 R32 ESP32
This card has classic Bluetooth, BLE, WiFi, ADC, DAC, and more feature.
This card can be programmed with the Arduino IDE.
[comparativa]
There is another smaller ESP32 mode…
The StartScanning should be a StopScanning. I has change it, the UUIDs and use your exemples but the app yet is closing when I try to send some data to the ESP32
Try this example: 2.- App send text to ESP32. Show on the Serial Monitor.
2.- App send text to ESP32. Show on the Serial Monitor.
p110i_esp32_ble_enviar.aia (220.5 KB)
[appinventoresp32ble9]
Write and Send a text.
Texts are sent in packages of 20 characters.
Send: “El Ñandú corrió por Cádiz”
Receive: “El Ñandú corrió p” = 17 chars + special chars: Ñ,ú,ó need 2 bytes.
[appinventoresp32ble2i]
/*
Based on Neil Kolban example for IDF:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleWrite.cpp
Ported to Arduino ESP32…
It is work. I was using a rxuuid and a tx uuid, but a just need one. But now he just send the first value and dont send nothing more.
He is working. The final code is here.
system
Closed
July 27, 2020, 2:17am
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.