device registration - error

Hi all,
I have a problem while registering the device UUID on my HC-05.
I have the correct UUID, but it is short. The error message is also attached. Thank you very much for your advice.
ERROR_description.txt (975 Bytes)


UUID_HC-05

Isn't the hc-05 a pre -BLE Bluetooth module?

Use the Bluetooth Client component instead of the BLE extension.

It is BLE 4.0, with CC2541 chip.
CC2541

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

here. Thank you for your time.
ssa(1).aia (230.0 KB)

I'm not a BLE expert, so i will cover the introductory ground in the open, for our BLE experts to step in if they spot something I missed.

For the board, here is your error message inline:

error message

java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.UUID android.bluetooth.BluetoothGattCharacteristic.getUuid()' on a null object reference at edu.mit.appinventor.ble.BluetoothLEint$BLEOperation.registerPendingOperation(BluetoothLEint.java:257) at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.subscribe(BluetoothLEint.java:356) at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.run(BluetoothLEint.java:325) at android.os.Handler.handleCallback(Handler.java:997) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loopOnce(Looper.java:237) at android.os.Looper.loop(Looper.java:325) at android.app.ActivityThread.main(ActivityThread.java:10378) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:961)
Note: You will not see another error reported for 5 seconds.

I double checked your chip, and it indeed supports BLE:

I opened your aia, and verified you have the current BLE extention,
image

I see some unusual things in your BLE block code:

  • You don't need the BlueTooth Client component to use the BLE extension.

  • The current BLE extension handles permissions on its own.

  • You are using a short UUID, compared to the usual GATT UUIDs seen on this board.

  • You are reusing the UUIDs both for reading (your register block) and writing.

  • You register to receive bytes, but you lack the When Bytes Received event to receive them.

  • Your chip is programmable, but you did not include the sketch. That's needed for us to be able to match up transmitting UUIDs and data formats.

  • You are mixing bytes and text on the same characteristic UUId.

Here's your Downloaded Blocks Image, after a Cleanup Blocks, for easy scrolling:

That should get you started.

P.S. I searched this board for "short UUID" and found