Reading Integers over BLE not working


I am unable to read integer value on my app at all. I am using RegisterforIntegers and then using block whenIntegersReceived and I am printing random text inside a text box to see if I am receiving anything. But it seems like nothing is received as integer.
Whereas in the same app I am also using RegisterforFloats and whenFloatRecieved and this is working perfect I can receive all the float number every time.
I have tried bytes, uint32, uint16, uint8, int, signed, unsigned and bytes but nothing is working for whenIntegersReceived.
Can somebody help me what I am missing or doing wrong in reading an integer?

Thank you

I have checked in nrf connect app and I can see the data coming from my board but in app inventor it shows nothing is received in the whenIntegersReceived.

Note that RegisterForIntegers is expecting 32-bit integers. If you're changing to int16 or int8, you'll need to use RegisterForShorts or RegisterForBytes, respectively. Furthermore, because RegisterForIntegers is expecting 32-bit ints, you need to send 4 bytes at a time. If you only send 1 byte (because your value is 5, for example), then it will be waiting for 3 more bytes before continuing.

If you have example code from the peripheral device showing how you're sending the data that might be helpful to the folks on this forum who can help you debug what's going on.

Hi @ewpatton

Thank you for reply. I get indication on my peripheral side that show the notification for Integer is enabled.
I am using nrf to send the Integer using notification as
bt_gatt_notify_uuid(NULL, &time_char_uuid.uuid, NULL, time_value, sizeof(time_value));
Where time_value = 4111111111 is declared as uint32_t time_value.

App blocks are as follows:

But it seems like the block IntegersRecived never get executed.

Hi @ewpatton

Any suggestions?

Maybe try

This will confirm data size etc. as should receive a byte array.

Alternatively just try a manual read Integer and see if it responds with a value.

One thing would be to double-check that the service UUID and the characteristic UUID are correct. Otherwise, you'll end up registering for integers on a service/characteristic that doesn't exist.

UUIDs are correct because I change the same blocks to float and also on the peripheral side and it worked perfectly. It only stop working at when I use Integer.

I have tried RegisterForBytes and RegisterForShorts but it do not register notifications on peripheral side. It only register notifcations on peripheral side if I use RegisterForIntegers but then the IntegersRecived never get executed.
But if I use nrf connect for mobile app it shows that integers are received from peripheral side.