Hi all, I want to add light switch client to light switch proxy server . But I dont know how to get appkey handle for bind to light switch client . Pls , help me !! Thank very much
Hi all, I want to add light switch client to light switch proxy server . But I dont know how to get appkey handle for bind to light switch client . Pls , help me !! Thank very much
Hi Giang,
Please point me to the specific place in code you are struggling with ? The appkey handle is assigned to the model automatically by the config server when the node is configured by the provisioner. You can have a look at this demo, we have both light switch server and client on the thingy, and simply bind the app key to the client (and the server if we want to use server) using the app.
Hi Giang,
Please point me to the specific place in code you are struggling with ? The appkey handle is assigned to the model automatically by the config server when the node is configured by the provisioner. You can have a look at this demo, we have both light switch server and client on the thingy, and simply bind the app key to the client (and the server if we want to use server) using the app.
Yeah, exactly I want to do as your demo. I want to add light switch client model to light switch proxy server . The appkey handle is assigned to the model automatically by the config server when the node is configured by the provisioner, so I want get appkey handle of light switch server model for bind to light switch client model . But I can not find the code to get it . Present, I fixed appkey handle = 0 and bind to light switch client model and project can run as your demo . But I want get it by function code . Can you show me !!! Thank
Ok, so you want to only config the server and then use the same configuration for the client so you don't need to configure the client seprately ?
If it's the case, you can have a look at this line
if (p_message->opcode.opcode == CONFIG_OPCODE_MODEL_APP_BIND)
in config_server.c . This is where we bind the model to an app key when we configure a model (either server or client). You can use the data there to apply for your client. You would need to either modify the config_server.c so that it would also config your client, or try to make a call back into main.c and then call access_model_application_bind() from there.
Thank you , I tried !!!
Can you show my question : devzone.nordicsemi.com/.../pwm-not-run-with-mesh