Error 9011 in extension BluetoothLE: Unknown Characteristic

Hello All, can anyone help me, please ? i have the problem with my project in MIT APP inventor , when i show the notification from my arduino. The error is like that :


and my block for show notification is like that :

help me please, gais !

You try to use an unknown characteristic, according to the error message. How did you determine which characteristic to use? It should be somewhere in your .ino code on your BLE device.
Are you able to connect to your BLE device? What is the device?

yes i can connected to my BLE , but my data can't be read. I will display text data from the classification results that I have made, do you think it can be sent to the apk? i use the arduino nano 33 ble sense

is the uuid and characteritic i am using right?
BLE.setLocalName("NotifikasiTantrum");
BLE.setAdvertisedServiceUuid("6E400002-B5A3-F393-E0A9-E50E24DCCA9E");
BLEByteCharacteristic buttonCharacteristic("19B10012-E8F2-537E-4F6C-D104768A1214", BLERead | BLENotify | BLEBroadcast);

cant you help me please :slight_smile:

That depends. I do not have enough information.
What is the BLE device you are using? Some Arduino?
How did you find out what the Characteristic should be?
It would be necessary to lo look at more of your BLE device code. Do you have an .ino file you can upload here?

For the App Inventor side, either post more blocks (Click with your left mouse button in an empty space in the blocks editor and choose download blocks as image from the drop-down. Upload that image here.
Or, go to projects -> download selected project and upload the .aia. It is not allowed to upload an .apk and that is also useless because I cannot look at the code then.

BLE_BASIC_SEND_TEXT (2).aia (194.6 KB)

and it is my block, i get from anyone

Hi Iciin,
For now, I see many problems.
Remember, if you are developing with App Inventor, you should make use of its power: incremental development. That means that you do finishing touches like checking whether Bluetooth is on only when the rest of the app works. On your phone which which you develop, you will surely have it on.
Second, do not build an .apk until you are (almost) finished. Use the companion for development and debugging!
So, I assume you tried one of those to make a connection to your device:
http://iot.appinventor.mit.edu/#/teachers/howtos


Then, obviously there is something wrong with this block: the characteristicUuid cannot be right, because it is much too short. You can figure out which characteristicUuid's are right, by using this block:
image
Then, if you try to read a string then you should use the

block to actually see what you received. No clock timers for BLE!
Finally, if you really want more detailed help, then specify what the name and type of the Arduino device is, so that we can search for more information about the API, or can you give us pointers where you found the code that you have?

thanks ghica , i am using Arduino Nano 33 BLE Sense

I will send the text that appears on the serial monitor to the app inventor, do you think I use a string or which one?

Iciin,
Somehow I think that you need some more study of your Arduino board, before starting with App Inventor.
Did you try any of this?


or this: https://www.arduino.cc/en/Guide/NANO33BLESense
Also BLE itself is worth studying. At the moment App Inventor is good for micro:bits and for people who know exactly the UUID's they need and know how to program Arduino's.
There is also a scanner app that you can download to see if you can communicate with your board.
Maybe @Juan_Antonio can help some more.

oke thanks for help me, Ghica.
I've tried to make a program on the Arduino Nano 33 ble sense, which is to read the temperature sensor data and send it to the apk via BLE and it works, but when I send the data from the dataset classification to the apk, there I have a problem.
i tried the program for send data to BLE :

Serial.print("Terdeteksi Jijik \n");
while (central.connected())
{
if (characteristic.available())
Serial.write(characteristic.read)
{
if (Serial.available())
{
characteristic.write(Serial.read())
}
}
}

but the code is error characteristic not member of read and available

@Iciin
I have not used the Arduino 33 BLE so I cannot test.

This topic shows a simple app for Arduino BLE 33:

As you can see, to receive the message you must "RegisterForStrings".

With nRF app, you can get the UUID from the BLE:

It's also important to note that Android will cache the set of service/characteristics advertised by a device when it first connects. If you then change the set of characteristics by reprogramming the device, Android will still report the old list rather than the new list. In some cases you may need to turn off the Bluetooth interface to flush the cache so that on the next connection you'll get the updated list. Otherwise, the BluetoothLE extension may receive the old data from Android and not know how to handle your new UUIDs.

1 Like

Thank you for help, @Juan_Antonio , I have tried with nRF Connect and have updated my coding, and I get something like this picture in the part I crossed out, but I have another problem in the value section, the value is not read

okey thanks @ewpatton , i will try like that.:slight_smile:

Try changing the UUID

oke thanks @Juan_Antonio