Re: Working with mesh shell
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 -- 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,
|
|
Re: Working with mesh shell
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
|
|
Re: Working with mesh shell
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,
|
|
Re: Working with mesh shell
Hi Ashish,
On Thu, Dec 28, 2017, ashish.shukla@... wrote: can you please list out set of commands in order to provision and configureZephyr 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
|
|
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? -- 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
|
|
Re: Subscribing to heartbeat messages in a mesh network
Hi Ashish,
On Thu, Dec 28, 2017, ashish.shukla@... wrote: I'm almost there with mesh shell. Only a small issue, after disabling allCONFIG_INIT_STACKS=n Johan
|
|
Re: Subscribing to heartbeat messages in a mesh network
ashish.shukla@corvi.com <ashish.shukla@...>
Hi, Thanks for your concern Steve, I'll write the code for it. Have a good time on vacation!!! Hi Johan, I'm almost there with mesh shell. Only a small issue, after disabling all DEBUG messages, I still see adv stack and Kernal Stacks on terminal, which makes it difficult work with shell. How to stop seeing these messages while keeping mesh shell and printk enabled? -- 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 Wed, Dec 27, 2017 at 7:15 PM, Steve Brown <sbrown@...> wrote:
|
|
Re: Subscribing to heartbeat messages in a mesh network
Steve Brown
Hi Ashish Steve
|
|
Re: Subscribing to heartbeat messages in a mesh network
Hi Vikrant,
On Wed, Dec 27, 2017, Vikrant More wrote: how to subscribe dynamically to heartbeat of any node (using meshctl) ?I don't think meshctl has this support yet. IIRC, Steve sent an RFC patch for that, but nothing has been merged upstream yet. I've enable CONFIG_BT_MESH_CFG_CLI=y this in prj.confThat all looks fine to me, however note that you don't need this if you're planning to use an external tool like meshctl. CONFIG_BT_MESH_CFG_CLI is only needed if you want to use Zephyr as the configuration client. Johan
|
|
Re: Subscribing to heartbeat messages in a mesh network
Vikrant More <vikrant8051@...>
how to subscribe dynamically to heartbeat of any node (using meshctl) ? I've enable CONFIG_BT_MESH_CFG_CLI=y this in prj.confstatic struct bt_mesh_cfg_cli cfg_cli = { }; static struct bt_mesh_model root_models[] = { BT_MESH_MODEL_CFG_SRV(&cfg_srv), BT_MESH_MODEL_CFG_CLI(&cfg_cli), BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub), BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_SRV, gen_onoff_op, &gen_onoff_pub, NULL), BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_LEVEL_SRV, gen_level_op, &gen_level_pub, NULL), BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_CLI, gen_onoff_cli_op, &gen_onoff_cli_pub, NULL), }; ------------------------------------------------------------------------------------------------------------------------------------------------ static void heartbeat(u8_t hops, u16_t feat) { //Toggle LED4 on nRF52840_PDK NRF_P0->OUT ^= (1<<16); } static struct bt_mesh_cfg_srv cfg_srv = { .relay = BT_MESH_RELAY_DISABLED, .beacon = BT_MESH_BEACON_ENABLED, #if defined(CONFIG_BT_MESH_FRIEND) .frnd = BT_MESH_FRIEND_ENABLED, #else .frnd = BT_MESH_FRIEND_NOT_SUPPORTED, #endif #if defined(CONFIG_BT_MESH_GATT_PROXY) .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED, #else .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED, #endif .default_ttl = 7, /* 3 transmissions with 20ms interval */ .net_transmit = BT_MESH_TRANSMIT(2, 20), .relay_retransmit = BT_MESH_TRANSMIT(2, 20), .hb_sub.func = heartbeat, };
On Wed, Dec 27, 2017 at 12:00 PM, Johan Hedberg <johan.hedberg@...> wrote: Hi Ashish,
|
|
Re: Subscribing to heartbeat messages in a mesh network
Hi Ashish,
On Wed, Dec 27, 2017, Johan Hedberg wrote: On Wed, Dec 27, 2017, ashish.shukla@... wrote:One thing I forgot to mention: you can play with most of these featuresThanks Steve, it works as expected.The call to bt_mesh_cfg_hb_sub_set() that you found in mesh_demo is on also using tests/bluetooth/mesh_shell. It has commands for configuring heartbeat publication & subscription. The commands aren't exactly the same as meshctl, so be sure to check with "help" for what commands are available and what parameters they take. The mesh shell uses internally the same configuration client API that e.g. bt_mesh_cfg_hb_sub_set() is a part of, so if you're interested in more examples of this API's usage, take a look at subsys/bluetooth/host/mesh/shell.c. Johan
|
|
Re: Subscribing to heartbeat messages in a mesh network
Hi Ashish,
On Wed, Dec 27, 2017, ashish.shukla@... wrote: Thanks Steve, it works as expected.The call to bt_mesh_cfg_hb_sub_set() that you found in mesh_demo is on the right track. It will send the heartbeat subscription configuration message to the given address, which also works if the address is the local node. Note that you also need to have the configuration client model as part of your models array. You didn't show us what exactly the compilation issue is that you got, but I suspect you simply didn't have the Configuration Client Model enabled in Kconfig. To enable it you need to set CONFIG_BT_MESH_CFG_CLI=y. Johan
|
|
Re: Subscribing to heartbeat messages in a mesh network
ashish.shukla@corvi.com <ashish.shukla@...>
Hi, Thanks Steve, it works as expected. -- 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 Tue, Dec 26, 2017 at 5:58 PM, Steve Brown <sbrown@...> wrote: Hi Ashish,
|
|
Re: Subscribing to heartbeat messages in a mesh network
Steve Brown
Hi Ashish,
On Tue, 2017-12-26 at 17:47 +0530, ashish.shukla@... wrote: Hello everyone !!If the target of heartbeat publish is 0077 (meshctl's unicast address), it will display the returned status. Steve
|
|
Subscribing to heartbeat messages in a mesh network
ashish.shukla@corvi.com <ashish.shukla@...>
Hello everyone !! I'm trying to work with heartbeat messages. I'm using android app by silicon Labs for provisioning and configuring so I can't subscribe and publish heartbeat messages using this app. struct bt_mesh_cfg_hb_sub sub = { .src = PUBLISHER_ADDR, .dst = GROUP_ADDR, .period = 0x10, }; bt_mesh_cfg_hb_sub_set(net_idx, addr, &sub, NULL); though adding these lines gives compilation error in my 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
|
|
mcuboot usage guide
youqun
Hello experts,
The Zephyr(v1.10) project has run in my NRF52_PCA10040 board. Mcuboot source code has been downloaded. But Zephyr and mcuboot sites give very few info about how to use it.
Hope there is a guide or example for users about how to use mcuboot. My project needs serial bootloader function.
Best Regards, Youqun Sun
|
|
Re: [Zephyr-devel] Using Math function in zephyr
ashish.shukla@corvi.com <ashish.shukla@...>
Thanks a lot Michael, for your efforts. It works now. -- 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 Sat, Dec 23, 2017 at 4:54 PM, Michael Hope <michaelh@...> wrote:
|
|
Re: Unable to set Appkey for generic server model
Mani Sadhasivam
Hi Johan, On Sat, Dec 23, 2017 at 5:21 PM, Johan Hedberg <johan.hedberg@...> wrote: Hi Mani, You are right... Mistakenly specified the cfg_srv model. It is working fine now :) Also, if this is really a formal publish message you're sending, you Sure, will make use of it. Thanks for the clarification! Regards, Mani Johan
|
|
Re: Unable to set Appkey for generic server model
Hi Mani,
On Sat, Dec 23, 2017, Mani Sadhasivam wrote: [bt] [ERR] model_send: Model not bound to AppKey 0x0001A couple of things come to mind here: Is root_models[0] really the model that's supposed to do the publishing? It's often the Configuration Server Model, which would explain the error you're getting. You didn't show the definition of your models array, so I'm just guessing here. Also, if this is really a formal publish message you're sending, you should be using the bt_mesh_model_publish() API instead of bt_mesh_model_send(). The latter is intended mainly for client model messages as well as for the server's responses to those, and it doesn't take into consideration things like the Model Publish Retransmit state or that you're actually publishing using the configured publication state (correct app key, destination address, TTL, etc). Johan
|
|
Unable to set Appkey for generic server model
Mani Sadhasivam
Hello, My objective is to use 96Boards carbons running Zephyr to form a mesh network for publishing sensor data. For testing purposes, I am using Generic ON/OFF server model for sending the sensor data to all nodes in the network, later this will get replaced by Sensor server model. However, after provisioning the node using `meshctl` and binding AppKey to the model, publishing sensor data from node results in the below error: [bt] [ERR] model_send: Model not bound to AppKey 0x0001 Thread used for publishing sensor data: void temp_work_thread(struct k_work *work) { if (node_addr == BT_MESH_ADDR_UNASSIGNED) return; struct net_buf_simple *msg = NET_BUF_SIMPLE(3 + 4); struct bt_mesh_msg_ctx ctx = { .net_idx = 0, .app_idx = 1, .addr = BT_MESH_ADDR_ALL_NODES, .send_ttl = BT_MESH_TTL_DEFAULT, }; bt_mesh_model_msg_init(msg, BT_MESH_MODEL_OP); net_buf_simple_add_u8(msg, 1); if (bt_mesh_model_send(&root_models[0], &ctx, msg, NULL, NULL)) { printk("Unable to send sensor message\n"); return; } printk("Sensor message sent with OpCode 0x%08x\n", BT_MESH_MODEL_OP); } Meshctl commands for provisioning and binding AppKey: discover-unprovisioned on provision 0108 # Node address 0108 menu config target 0108 appkey-add 1 bind 0 1 1000 # bind AppKey 1 to model 1000 of 0th element Above commands seems to succeed with below debug message: [Zephyr-Node-0108]# target 0108 Configuring node 0108 [config: Target = 0108]# target 0108[config: Target = 0108]# appkey-add 1 GATT-TX: 00 f4 c2 c3 a1 79 49 50 dd 24 66 ea ac 62 e3 76 GATT-TX: 8d 86 c3 53 dd ca b1 76 2e 21 0c aa 5c c8 GATT-TX: 00 f4 56 51 ac b5 41 23 5c 15 44 f4 40 68 04 92 GATT-TX: 35 5f e0 33 34 1a 32 99 00 01 b5 67 ed c0 GATT-RX: 00 f4 fb 34 d9 5b 37 66 66 0f 1b 3b d0 ca e5 24 GATT-RX: 70 92 fd 94 3c 44 6c 42 e6 GATT-RX: 00 f4 33 91 bd 9f b5 37 2d ae 01 5a c8 67 00 c0 GATT-RX: fa 5f 34 fc e4 53 c9 da 15 Node 0108 AppKey Status Success NetKey 000, AppKey 001 [config: Target = 0108]# bind 0 1 1000 GATT-TX: 00 f4 25 40 41 a2 09 fb 01 8f d1 be 2c e3 1b 0b GATT-TX: 13 e3 ac 38 ea f9 74 c7 99 a9 33 GATT-RX: 00 f4 a3 1b e3 71 55 5c 0b a6 d1 6f a2 6f 80 62 GATT-RX: 84 d6 26 a9 61 49 0a 73 ad 31 bc 04 Node 0108 Model App Status Success Element 0108 AppIdx 001 ModelId 1000 [config: Target = 0108]# Can anyone please clarify what is going wrong? Branch used: Latest Master branch Thanks in advance! -Mani
|
|