Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom/Vendor Model Support #255

Open
atharv-bhadange opened this issue Dec 23, 2022 · 7 comments
Open

Custom/Vendor Model Support #255

atharv-bhadange opened this issue Dec 23, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@atharv-bhadange
Copy link

The Problem

  • I want to be able to send custom model data.

Why I want to do this

  • I am building a flutter application that can communicate using the Custom/Vendor model which is supported on both Android and iOS nRF SDK.

How I would ideally do this

  • It would be good to know if this can be done by only writing dart code and a little native code for both platforms.
  • I wasn't able to figure out if the MagicLevelGetStatusData and DoozEpochStatusData are the custom models that I'm looking for.
  • If yes, can anyone help me figure out how do I use them to send my Custom model?

What am I asking for help on?

  • If this has already been implemented, can anyone point it out for me?
  • Else I would be happy to help be able to fix this.
@ghost
Copy link

ghost commented Dec 24, 2022

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 ghost added the enhancement New feature or request label Dec 24, 2022
@ghost
Copy link

ghost commented Dec 24, 2022

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
Copy link
Author

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
Copy link

ghost commented Dec 25, 2022

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
Copy link
Author

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

@FarhanRiaaz
Copy link

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

@bslisowski
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants