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

How to message-passing between models

Dear

 

I increated a Generic Level module to main elements which have a Generic ONOFF module on Mesh example Light Switch Server project base on PCA10056 DK board for nrf52840 chips.(SES + nrf5_SDK_for_Mesh_v4.0.0_src+ nRF5_SDK_16.0.0_98a08e2)

Right now The Generic Level module works well that The Brightness can be change by app of nRF mesh app on cell phone. Because the Generic Level module be implemented by PWM base on PWM model of the nrf52840, the pin of LED0 which be connected to PWM model do not be controlled by GPIO, which mean the Generic ONOFF module do not work and LED do not flash when the reset or for other situation.

My questions is

  1. I believe there must be a way to accomplish message-passing between models within elements and between models within different elements within nodes. How do I implement that?
  2. As mentioned in the first paragraph, the pin of the LED0 have to be controlled by PWM model and gpio model. Do you have any good idea for that.

 

Thanks,

 

B,Rs

 

Di-sheng

Parents
  • Hi,

    1. You can send messages between models by publishing directly using unicast addresses or publish/subscribe to a group address. 

    2. 

    which mean the Generic ONOFF module do not work

    Can you tell me what doesn't work? Can you elaborate?

    If I understand you correctly, you want to control one LED with Generic OnOff model and Generic Level Model, am I correct? 

  • The easiest would be to use the nRF Mesh app (Android/iOS) as provisioner. After you have finished the provisioning you will be able to see the unicast address in the app. You can also set the publish/subscribtion address in the app.

    When PWM is started it will take control over the GPIO, while when PWM is stopped it will fall back to the normal GPIO usage. So it should work by starting and stopping PWM.

Reply
  • The easiest would be to use the nRF Mesh app (Android/iOS) as provisioner. After you have finished the provisioning you will be able to see the unicast address in the app. You can also set the publish/subscribtion address in the app.

    When PWM is started it will take control over the GPIO, while when PWM is stopped it will fall back to the normal GPIO usage. So it should work by starting and stopping PWM.

Children
No Data
Related