OZEO-DOOZ / nrf_mesh_plugin

A Flutter plugin to enable mesh network management and communication using Nordic Semiconductor's SDKs.
https://pub.dev/packages/nordic_nrf_mesh
BSD 3-Clause "New" or "Revised" License
28 stars 19 forks source link

Custom/Vendor Model Support #255

Open atharv-bhadange opened 1 year ago

atharv-bhadange commented 1 year ago

The Problem

ghost commented 1 year ago

Hello @atharv-bhadange ,

Indeed the vendor models are not exposed in this plugin. Much like #251, exposing this feature from Nordic SDK can be done by extending the current pattern used. It will be about writing Dart code yes, but also native code so the plugin can send/receive more types of msgs.

I can't tell when we could implement this, but we gladly accept contributions of course 😁

ghost commented 1 year ago

The two types of msg you are referencing are only used by DooZ products. You won't be able to use them directly but you can probably do smth similar to unlock your issue. I'm not familiar enough with firmware development to tell you how to do it though !

So better to integrate official APIs

atharv-bhadange commented 1 year ago

I want to contribute to this. Do you have any contributing guidelines for me?
Also, if you could guide me on how are the custom models that Dooz is using can be used to expose the Custom models APIs and what kind of data structure are you sending on the mesh, are you using UInt8 arrays?

ghost commented 1 year ago

Hello @atharv-bhadange , We don't have contribution guidelines yet, just fork the plugin and build from master branch 👍 I don't know how to implement custom msg on firmware side, but yes it was built on top of generic levels, using new opcodes and adding more data in the msg. The type of data differ based on the firmware implementation but yes it's usually some sequence of bytes arrays.

To integrate the official API you gotta check Nordic's source code and see how they define Vendor Model msgs, after that it will be about "telling" the plugin how to send/receive these types of msgs (recognizing msg opcode and instantiating the corresponding class for example).

Try to understand the in/out flow for a simple Generic Level msg and then it's about doing almost the same flow but with new messages opcodes (I can't be 100% sure that this is the only thing to do)

atharv-bhadange commented 1 year ago

Hey! Thanks for the suggestions, I will work on this and keep you posted.

FarhanRiaaz commented 1 year ago

@atharv-bhadange: Did you find any solution to your problem?

bslisowski commented 1 year ago

I currently have this implemented on android. Unfortunately, I'm not sure this is possible to do on iOS without having to change the native code to match your specific vendor model.