Micropython uBluetooth ESP32 MIT App Inventor will not connect to ESP32

Hi all
Im am using micropython ubluetooth and I can connect to the ESP32 using "Serial bluetooth terminal"
But when I try to us MIT App Inventor the only time I can see it in List Picker if I use "call BluetoothE1.StartScanning " and then set ListPickerBLE.ElementsFromString to BluetoothLE.DeviceList"
and I see the device as "24:62:AB:F2:86:2E DS18B20 Teperature -55"

I guess the -55 is the RISS strength.

But when I use "call BluetoothLE1.connect / index ListpickerBLE.Selection" I get an error
The operation Connect cannot accept the arguments: , ["24:62:AB:F2:86:2E DS18B20 Tmperature -55"]

How do I get this to work or can someone post a link to a tutorial or working example on setting up MIT App Inventor with ESP32 using micropython - uBluetooth
Please refer to the BLE, Interrupts & Timers in Micropython | Controlling Appliances via BLE | Micropython Series E3 - YouTube
video on how I setup the ESP32 ubluetooth.

uBluetooth.aia (190.5 KB)

Please download and post each of those event block(s)/procedures here ...
(sample video)

in addition to

Export your .aia file and upload it here.
export_and_upload_aia

Yo tengo un problema parecido.
bluetooth.aia (210.0 KB)

Mi código de esp32 funciona correctamente en la apk bluetooth serial, pero en mi app de appinventor, aunque conseguí conectar y recibir el mensaje de bienvenida de conexión, ya no consigo recibir ni enviar más mensajes.

Hola @Manuel_Barrera,
this is not the solution, but you have three errors in your code:
image
Maybe it's trivial, but give it a look.
Buona suerte.

Si, bueno, esos tres bloques los puse para asegurar que no entraran lis datos por ahí.
Cuando entran al momento de conectar, los recibo por bytes receibed.

La cuestión es que en el momento de conectar, recibo a través de ese bloque el primer mensaje que envía el esp32, pero ya cualquier envío desde el chip ya no es recibido por appinventor, y tampoco puede enviar hacia el chip

Hola @Manuel_Barrera,
a similar project, i.e. an app communicating via BLE to a NANO33 has been treated in another topic a few days ago.
You can find here below the link. The project aim was at switching on and off some LED's driven by the NANO upon commands received via BLE by the app.
In the thread you'll find the app written by @ChrisWard, and a file .ino written by me specifically for the ESP32 (BLE_Uart.ino) working in pair with Chris' app. I've tested them end they were working fine.
Hoping it could help you.

https://community.appinventor.mit.edu/t/controlling-leds-from-my-phone-via-bluetoothle/69575/153

1 Like

Gracias, esta noche lo probaré, la cuestión es que mi esp32 está programado en micropython. Probaré primero si funciona con mi sistema en esp32.
Sino, probaré entonces el Ino y veré cómo actuar sobre mi software en micropython para solucionar el problema.
A ver si doy con la solución.
Muchas gracias.

That shouldn't be an issue at all. Just ensure that whatever data is read or sent is in a format and type the App/ESP32 expects.

Dear @Manuel_Barrera,
take it easy, my ESP32 code is just an example (working :slight_smile: ), from which you can take some hint.
"One picture (in this case the working code) is better than 1000 words".
Ciao!