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

Android-nRF-Mesh-Library to serve models from Android-based devices

Is it possible for the Android-nRF-Mesh-Library to be used to serve models and also proxy/relay other on-Android nodes?

I’ve developed an Android 8 app for a tablet and I’d like it to be able to publish its data over a Bluetooth mesh. The app is effectively a sensor and should be able to represent itself using the generic level model.

So far, I've been able to get the Android SDK to advertise the tablet and have the Android nRF mesh app (on another tablet) scan and see it, and then send an invite via Provisioning Invite PDU (section 5.4.1.1 of the spec). I have both of these apps hooked up to debuggers so I can see what's going on, along with the Bluetooth Mesh spec open as well. There must be an easier way though!

Thanks for any guidance.

Kind regards,
Christopher

Parents
  • Hi Christoper, currently the mesh library does not support this behavior on the app/library side. However the mesh library is designed in a way that this can be incorporated. Unfortunately you will have to implement it yourself and we accept contributions. Feel free to send us a pull request if you get around implementing this.

  • Thanks for the reply. What I'm now beginning to discover/wonder is whether an Android device can be an ADV bearer for mesh traffic... When using the Android BLE advertising API, it appears as though I can only register GATT services i.e. Android's BLE capabilities appeared to be exclusively reliant on GATT.

    Assuming my interpretation is correct, then Android devices can only provide GATT services to connected GATT clients. Perhaps I need to have dedicated non-Android proxy nodes that are connected to my Android devices...

    Have I misread the situation?

  • Hi,

    The GATT bearer was developed specifically to address this limitation on smartphones, namely that the Bluetooth API provided from the smartphone OS did not support Bluetooth mesh. But it supports BLE, so BLE became the chosen gateway into Bluetooth mesh. I am not aware of any smartphones with ADV bearer capabilities yet, and since the GATT bearer was in large part exactly for connecting to smartphones, I doubt we would see much ADV bearer support on smartphones.  may have some more insight on this topic, though.

    Regards,
    Terje

Reply
  • Hi,

    The GATT bearer was developed specifically to address this limitation on smartphones, namely that the Bluetooth API provided from the smartphone OS did not support Bluetooth mesh. But it supports BLE, so BLE became the chosen gateway into Bluetooth mesh. I am not aware of any smartphones with ADV bearer capabilities yet, and since the GATT bearer was in large part exactly for connecting to smartphones, I doubt we would see much ADV bearer support on smartphones.  may have some more insight on this topic, though.

    Regards,
    Terje

Children
  • @Christopher, from what I understand you want to implement Mesh capabilities using Android device's advertising capabilities. @tesc is correct. Technically this is not impossible meaning that you will have to implement the ADV-Bearer more or less on your own. You can implement a BluetoothGattServer on devices running Android API 21 and onward which would allow you to advertise the mesh PDUs and scan for incoming PDUs in order to communicate. You can use the Mesh library to generate the mesh PDUs that you want to advertise just like it being used on GATT. The library was designed with this mind, therefore in theory it's possible and is just a matter of giving it a shot. Hope this helps.

Related