You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/03/20 16:14:51 UTC

[GitHub] michal-narajowski opened a new pull request #11: mesh: Add example implementation of generic onoff and level models

michal-narajowski opened a new pull request #11: mesh: Add example implementation of generic onoff and level models
URL: https://github.com/apache/mynewt-nimble/pull/11
 
 
   This patch adds simple implementation of these two models
   with support for both client and server. There is also an example
   light model that simulates a light bulb and controls 4 LEDs through
   4 PWMs.
   
   To use these features set BLE_MESH_SHELL_MODELS: 1 and you should
   enable pwm0, pwm1, pwm2 and pwm3 devices. On nrf52840 you should
   specify PWM_0: 1, PWM_1: 1, PWM_2: 1, PWM_3: 1, to achieve this.
   
   Here are the commands used to control the server from client (mesh-shell
   will communicate through local interface by default):
   
   `init` - to initialize mesh
   `provision 0 0x0001` - provision mesh with fixed keys, 0x0001 is a unicast address
   of a node
   `app-key-add 0 0 0` - add app key with netkey_idx=0 appkey_idx=0 and value=0
   `mod-app-bind 0x0001 0x0000 0x1000` - bind appkey with generic onoff server model
   `mod-app-bind 0x0001 0x0000 0x1001` - bind appkey with generic onoff client model
   `mod-app-bind 0x0001 0x0000 0x1002` - bind appkey with generic level server model
   `mod-app-bind 0x0001 0x0000 0x1003` - bind appkey with generic level client
   model
   `gen-level-set 50` - set diode lightness to 50%
   `gen-level-get` - get state of level model
   `gen-onoff-set 0` - set state of onoff model to off
   `gen-onoff-get` - get state of onoff model

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services