Receive data from nRF52832

Hi All,

I am using Nordic SDK example.
I am practicing building an app by myself.

Purpose :
After the development board presses the button, the state of the button will be sent.
Will send press (data = 0x01), release (data = 0x00).

Question :
I can't receive any information, here is my aia
Nordic_AddButton_Read.aia (188.9 KB)

Best regards,
Kai

Hello Kai

Using a Smartphone? What is the make/model/Android version/Bluetooth Version.

Upload your Script for the nrf52832

...also, upgrade to the latest BLE extension:
https://www.professorcad.co.uk/appinventortips#TipsBluetooth

That time between the data send of the two values is very likely to be too fast for the App to process - certainly too fast for the human eye to see. You should only need to receive a button press as a toggle.

Also, you are receiving a 0x01 ('1') and/or 0x00 ('0') - they are not signed bytes, they are unsigned bytes. Also, your call is in the Bytes Received Block (!), should be in a Clock Block, or you can use a Register For Bytes Block. Once the Bytes are received, the Bytes Received Block can update the Text Box.

It looks like you are also trying to set the Nordic status from the App?

You do not need to ask for Connect and Scan permissions because your App also has a BT Bluetooth Client and that component will add the permissions to the App's Manifest.

You do need to switch Fine Location on. You can do this manually or get the App to ask permission. If the App permission fails, add a location sensor component to your Project - that should force the permission to succeed.

Ensure that your UUIDs are identical in your Script/Sketch - they are case sensitive.

Like this:

Snap3

I'm using Samsung / SM-G9980 / 12 / 5.0

How to upload my Script for the nrf52832?
Sorry,this one I do not know what you mean.

Is it correct?
image

I have already to upgrade BLE extension but when I press Start Scanning,it show Runtime Error.
This question confuse me a long time.Can you modify the .aia I provided so that I can compare the differences?
Nordic_AddButton_Read.aia (189.3 KB)

See my link in #post3 for the latest version of the BLE Extension.

Your microcontroller nRF52832 is controlled by an embedded/program/script/sketch which you have written....... and we need to see it.

Always screenshot the error and show it to us. Luckily, I have my crystal ball today and it tells me that your App does not have permission to scan. This is easily fixed by adding a BT Classic Client to your App - that component fixes two missing permissions. You still have to ensure that both Bluetooth and Location are switched on.

Post a screenshot of the runtime error.

Try this one:
Nordic_AddButton_Read2.aia (189.7 KB)

Is this Project for school/college? It sounds as though it is. See my #Post4 and be sure to incorporate those comments. Your approach to the App design looks like it has been pieced together from other Forum Topics - nothing wrong with that, so long as you are learning from it. Usually, we automate as much as possible and present less buttons on the GUI.

Android 10 is in the App name......

Nordic_AddButton_Read.aia (189.3 KB)

I think it is the S21 model. No problem with that if you keep your phone updated.

You are using android 12 right?