Working with mesh shell


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi,

can you please list out set of commands in order to provision and configure a simple onoff server?

Though it is straight forward, I do not know how deal with OOB feature, which is disabled in my case. Without handling OOB, provision command doesn't work. 

--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


Johan Hedberg
 

Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@corvi.com wrote:
can you please list out set of commands in order to provision and configure
a simple onoff server?

Though it is straight forward, I do not know how deal with OOB feature,
which is disabled in my case. Without handling OOB, provision command
doesn't work.
Zephyr does not yet have provisioner support. You can only provision the
local node throught the mesh shell at the moment (since that does not
involve running the full provisioning protocol).

Johan


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi Johan, 

I'm trying to provision a local node only. 

On 28-Dec-2017 1:37 PM, "Johan Hedberg" <johan.hedberg@...> wrote:
Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@... wrote:
> can you please list out set of commands in order to provision and configure
> a simple onoff server?
>
> Though it is straight forward, I do not know how deal with OOB feature,
> which is disabled in my case. Without handling OOB, provision command
> doesn't work.

Zephyr does not yet have provisioner support. You can only provision the
local node throught the mesh shell at the moment (since that does not
involve running the full provisioning protocol).

Johan


Johan Hedberg
 

Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@corvi.com wrote:
I'm trying to provision a local node only.
Are there any specific commands you're wondering about? You can get the
full list of them by typing "help". You'd e.g. start with provisioning
by typing "provision <network index> <unicast address>". The shell does
require basic knowledge of the configuration model, so I hope you can
explore the available commands and by experimenting get something
working. Each configuration model related shell command maps directly to
a configuration model message, so you'll need to look at the respective
specification section for each command for the details of its
parameters, etc.

Johan


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi Johan,
I understand basics on configuration model. However, I'm trying to add app key, it results in following error

unable to send App Key add (error -11).

I face same issue trying to add net key. For your reference, I'm attaching snapshot of mesh shell  


--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Thu, Dec 28, 2017 at 1:54 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@... wrote:
> I'm trying to provision a local node only.

Are there any specific commands you're wondering about? You can get the
full list of them by typing "help". You'd e.g. start with provisioning
by typing "provision <network index> <unicast address>". The shell does
require basic knowledge of the configuration model, so I hope you can
explore the available commands and by experimenting get something
working. Each configuration model related shell command maps directly to
a configuration model message, so you'll need to look at the respective
specification section for each command for the details of its
parameters, etc.

Johan


Johan Hedberg
 

Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@corvi.com wrote:
I understand basics on configuration model. However, I'm trying to add app
key, it results in following error

unable to send App Key add (error -11).

I face same issue trying to add net key. For your reference, I'm attaching
snapshot of mesh shell
The first thing the shell prints is that it asks you to run "init"
before any other command. Since you haven't done that the "provision"
command doesn't do anything, and then you get EAGAIN (errno 11) when you
try to send a message, which is the error that the mesh stack returns
when you're not provisioned and try to send messages.

Johan


ashish.shukla@corvi.com <ashish.shukla@...>
 

hi Johan,

can you share a working code that's compatible with mesh shell?  Otherwise I've learn by trial and error. For now, I'm stuck at "init" command, it seemed to me that health client isn't configured in my code. Even after configuring health client, it never comes out of loop:
here is mesh shell

shell> Initializing...
[bt] [INF] hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[bt] [INF] hci_vs_init: HW Variant: nRF52x (0x0002)
[bt] [INF] hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 1.10 Build 99
[bt] [INF] show_dev_info: Identity: d0:23:3e:36:04:49 (random)
[bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0xffff
[bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0xffff
Bluetooth initialized
[bt] [DBG] bt_mesh_cfg_cli_init: (0x20002360) primary 1
[bt] [DBG] bt_mesh_health_cli_init: (0x20002360) primary 1
[bt] [INF] bt_mesh_prov_init: Device UUID: 00000000-0000-0000-0000-d0233e360449
Mesh initialized
Type "help" for supported commands.
Before any Bluetooth commands you must run "init"

mesh> init
[bt] [DBG] bt_mesh_cfg_cli_init: (0x20000270) primary 1
[bt] [DBG] bt_mesh_health_cli_init: (0x20000270) primary 1




 


--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Thu, Dec 28, 2017 at 7:12 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Thu, Dec 28, 2017, ashish.shukla@... wrote:
> I understand basics on configuration model. However, I'm trying to add app
> key, it results in following error
>
> unable to send App Key add (error -11).
>
> I face same issue trying to add net key. For your reference, I'm attaching
> snapshot of mesh shell

The first thing the shell prints is that it asks you to run "init"
before any other command. Since you haven't done that the "provision"
command doesn't do anything, and then you get EAGAIN (errno 11) when you
try to send a message, which is the error that the mesh stack returns
when you're not provisioned and try to send messages.

Johan


Johan Hedberg
 

Hi Ashish,

On Fri, Dec 29, 2017, ashish.shukla@corvi.com wrote:
can you share a working code that's compatible with mesh shell? Otherwise
I've learn by trial and error. For now, I'm stuck at "init" command, it
seemed to me that health client isn't configured in my code. Even after
configuring health client, it never comes out of loop:
here is mesh shell
Which application are you using? An unmodified tests/bluetooth/mesh_shell
should work directly. If you're using something else you might at least
want to take a look at the configuration of the mesh_shell app.

Johan


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi Johan,
Here is brief bout what I'm doing :

I'm integrating the code available at  tests/bluetooth/mesh_shell  and /samples/bluetooth/mesh and then running the code on a controller which is supposed to provision and configure itself. of course, taking care of configuration file.

I might seem naive, as I've just learned to use zephyr shell with very small documentation available.

If I only use /tests/bluetooth/mesh_shell, how am I supposed to bind model with app key, when model is not even defined in the code.

 


--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Fri, Dec 29, 2017 at 1:00 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Fri, Dec 29, 2017, ashish.shukla@... wrote:
> can you share a working code that's compatible with mesh shell?  Otherwise
> I've learn by trial and error. For now, I'm stuck at "init" command, it
> seemed to me that health client isn't configured in my code. Even after
> configuring health client, it never comes out of loop:
> here is mesh shell

Which application are you using? An unmodified tests/bluetooth/mesh_shell
should work directly. If you're using something else you might at least
want to take a look at the configuration of the mesh_shell app.

Johan


Johan Hedberg
 

Hi Ashish,

On Fri, Dec 29, 2017, ashish.shukla@corvi.com wrote:
If I only use /tests/bluetooth/mesh_shell, how am I supposed to bind model
with app key, when model is not even defined in the code.
Obviously that's not possible. What you could try to do, is to take the
mesh_shell code as a starting point and extend it from there with the
models that you need.

Johan