2021-06-08 02:55 AM
Hi,
In a BLE mesh, I want to send vendor commands from the vendor client node to the vendor server node and get responses and notifications from the server node. I also need to set the publish and subscribe addresses of the vendor client node.
But there isn't any vendor client in the SDK.
I tried to implement it but there is no effect.
How do I test it ?
or is there any way I can develop it ?
or is it going to be available in next commit or so ?
Kindly help me.
Thanks.
Solved! Go to Solution.
2021-08-11 05:46 AM
For your use case, you have to use the Vendor Server Model on both nodes (ENABLE_VENDOR_MODEL_SERVER) to let the Vendor Server code manage both reception and transmission of messages.
You should then be able to activate or deactivate the publication of Vendor messages using the VENDOR_CLIENT_MODEL_PUBLISH macro. This is what is done in the example:
#ifdef VENDOR_CLIENT_MODEL_PUBLISH
Appli_Vendor_Publish(BLEMesh_GetAddress());
#endif
You should configure the nodes in this way :
Node1 (The client):
#define ENABLE_VENDOR_MODEL_SERVER ([...])
#define VENDOR_CLIENT_MODEL_PUBLISH
Node2 (The server):
#define ENABLE_VENDOR_MODEL_SERVER ([...])
With the Android application, you can specify the publication address of Node1 to Node2.
2021-06-08 10:13 AM
2021-06-08 10:51 AM
Thank you @Remi QUINTIN !
I saw the above document and I see that the vendor server publishes a message to other node (which also has a vendor server). But what I want is to set a publish address in the vendor client itself (just like what we do with the generic onoff client model) so that it can publish messages to the vendor server node. Is that possible ?
or I have to implement the vendor server on both nodes ?
[Note : With generic onoff models, I enable the generic onoff client in node 1 and generic onoff server in node 2. I provision both nodes from the android app and set publish address of client node and subscription address of the server node same. and then publish the set and get commands using the SW1 on the client node, so the server node which leads to successful operation on the LED.]
I hope I've explained myself well.
Thank you.
2021-08-11 05:46 AM
For your use case, you have to use the Vendor Server Model on both nodes (ENABLE_VENDOR_MODEL_SERVER) to let the Vendor Server code manage both reception and transmission of messages.
You should then be able to activate or deactivate the publication of Vendor messages using the VENDOR_CLIENT_MODEL_PUBLISH macro. This is what is done in the example:
#ifdef VENDOR_CLIENT_MODEL_PUBLISH
Appli_Vendor_Publish(BLEMesh_GetAddress());
#endif
You should configure the nodes in this way :
Node1 (The client):
#define ENABLE_VENDOR_MODEL_SERVER ([...])
#define VENDOR_CLIENT_MODEL_PUBLISH
Node2 (The server):
#define ENABLE_VENDOR_MODEL_SERVER ([...])
With the Android application, you can specify the publication address of Node1 to Node2.
2021-08-11 05:54 AM
Thank you very much @Remi QUINTIN . Later I was able to figure it out the same way as you said. But thank you so much for your answers ! I really appreciate the help.