App Inventor Crashes when connected to BLE device

Hello, I have run into a problem with App Inventor which for some reason results in the application crashing whenever connected to a BLE service.

I had my own MIT App Inventor program fully functional a month or so ago. The code for my app allowed the smartphone to scan and connect to BLE devices (in this case I am connecting to an Arduino Nano 33 IOT) and then send and receive data to the device and it worked flawlessly. However, when returning to my app to continue development, using the exact same code my app now crashes the second a secure connection is established and I have no idea what's going wrong because absolutely nothing has changed from my side.

I have multiple backed up version of my app and they all crash as the phone connects to the Arduino. I have decided that the problem isn't from the Arduino side because I am able to connect to the Arduino using LightBlue on my iPhone and App Inventor cannot even establish a connection to the Arduino example codes.

Any help would be greatly appreciated as this is fast becoming an urgent problem. Thanks!

Screenshot 2021-08-15 113518

Below is the same arduino code that used to work with the above App Inventor program. The following arduino code still functions perfectly with a third part BLE app like LightBlue but causes App Inventor to crash when the connection is established.

Arduino_BLE_Code.ino.txt (5.5 KB)

Please if someone in this community could help me out it would be hugely appreciated

Ai2 tolerates 128-bit uuid, not 16-bit.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.