This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

enabling notifications from example "Thingy Mesh Demo v0.1"

Hello. In acrording to: 

How the bridge exchange information between mesh network and mobile device

The bridge using Nordic UART Service to conduct the command/response between mesh nodes and mobile device

  • Nordic UART Service UUID 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
    • TX Characteristic (UUID: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E)
      • After enabled the notification of TX Characteristic, the response from the nodes will show in here
    • RX Characteristic (UUID: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E)
      • Write the command in here, the bridge will send the command to the nodes through mesh

I would like to ask how to eneble notification in this example?

BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString("???????????????????"));
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
gatt.writeDescriptor(descriptor);


I think that the problem is because of incorrect UUID.
I tried:
6E400003-B5A3-F393-E0A9-E50E24DCCA9E 
and
00002902-0000-1000-8000-00805f9b34fb
but i still dont have response from my Thingy.

  • Hi, 

    Have you tried 6E400002-B5A3-F393-E0A9-E50E24DCCA9E ? 

    Have you tested with the nRF Connect app ? (so you can enable notification manually )

    I would suggest to have a look into the nRF Toolbox app where we have the UART profile.  You can write your app to make it work with the ble_app_uart example in the NRF5 SDK before you start playing with the mesh demo. The nRFToolbox app source code is provided here: https://github.com/NordicSemiconductor/Android-nRF-Toolbox

    Please be aware that the demo is pretty old, it based on Mesh SDK v1.0.1. We will provide a newer version in the future. 

  • Hung Bui thank you very much for response :-) 

    I created my own Android app because author of this: https://github.com/NordicPlayground/Nordic-Thingy52-mesh-demo tutorial described very crearly comand description and example. I understand that its old example but I can provisioning now and add new node to group, change colour of node led etc.

    I dont know what should I do next. This example with sending command with UART is very good for me because is easy but it is not solid (compound, developed). because I can't for example unprovision node/nodes (autor does not describe or mayby it is imposible in this example. I dont know).

    Could you give me some information please about this problem? Are there some another examples more complex and with UART command sending support?

    Problem with UUID solved.

    Now it works. Under you can find the snippet with correct UUID.

                    gatt.setCharacteristicNotification(characteristic, true);
                    BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
                    descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
                    gatt.writeDescriptor(descriptor);

  • Hi Matej, 

    Using BLE-UART to control LED can be very convenience but it's a proprietary solution. It won't work with other vendors. And as you mentioned, it maybe harder to do provisioning and unprovisioning from the phone. 

    We will update the example in the near future with new SDK and with support for provisioning from the phone. It will be updated on github in the next few weeks. 

    In the mean time you can have a look at the https://github.com/NordicPlayground/thingy52-mesh-provisioning-demo demo. It based on the light switch example in the SDK. There is no UART service however it's possible to add the service. 

Related