BLE NANO 33 SENSE Rev2 RegisterForByte crash

You would either:

Display "ErrorInfo" in a Label or Notifier.......

Or save it to a file.

Lets see your Project File

Export Project

Here it is, it's almost identical to the one MoThunderz originally made.
BLE_controller.aia (193.1 KB)

I have also tried making a few copies myself where i build it all from scratch, in part for the pratice, but i was also hoping that maybe i would just need to import the newest BLE extension or something like that...
But after two attempts nothing has helped.

The Sketch is not configured to send the data to App Inventor - AI doesn't recognise type uint8_t, which is an Unsigned Int (8bits).

If you change the Sketch and App Code to Int, that should work (though there have been occasions where we have worked with ints in the Sketch, but had to send a char string to the App).

Alright, I've tried float, ints, chars, uint_8 and uint_32 and nothing worked... but i'll try with integer again just to be sure.

I changed the app to use the RegisterForInteger block like this:
IntReceived
The .IntegersReceived block might not work correctly, but the app crashes when the .RegisterForIntegers block is called, if i disable that block the app does not crash.

And changed the sketch code to this:

BLEIntCharacteristic accelerationCharacteristic("BLE_UUID_ACCELERATION", BLERead | BLENotify);
int accelerationX = 0;

OK - should communicate better with integers - what is the purpose of your code in the BLE Received Block?

Missing from Permissions: Fine Location - drag a Location Sensor component into Screen1

I would like the received integer to be shown in Label_Char1 so that i can see if an integer has been received. I was hoping to get the same result as in LightBlue where i can see the interger increment with 2 seconds delay.

Okay i'll try adding the permissions as you suggest, but it will have to be tomorrow... it's almost midnight now.

Thank you for your input/help i appreciate it.
I will continue debugging when i come home from work tomorrow.

1 Like

Use this simplified version of your App for tests.

BLE_controller_edit.aia (203.7 KB)

Hi Chris.
So... I was super unlucky the last few days.. I've picked up an infection in my blood and was admitted to the hospital Thirsday morning.
I just got released today but i still have a fever and will need more tests performed on Friday.

I will add the debug part of your program to mine and test it once my head stops spinning :slight_smile:

That's not nice - wish you a swift recovery.

Just use my "_edit" version of your App as-is.

Okay i tried that... this is what i get:


Bluetooth is indeed turned on :wink:
But maybe there's something somewhere telling the app that it isnt - i cant rule that out.

Oh hey Chris.
Check out ewpatton answer here:

Im using this BLE extension version: 20230728

I think i better try the 20240822 version

Yes! Try it with the _edit file - you just have to install it, everything will update.

Dang.. I really thought we had it there.
I tried it on your BLE_Controller and my own program and both still crash when they connect.

Can you upload your Arduino Sketch (.ino file)

Here it is
BLE_Uint32.ino (2.2 KB)

Make sure this isn't an issue too:

Hmm everything to work perfectly on my board, the only thing that isnt working is on the app side whenever the RegisterForByte/Integer/float block is called.

That's good.

When was the last time you updated the Arduino Boards Manager? There are often updates for the 33 Sense.

Edit: Mbed OS Nano Boards version should be 4.1.5