Combining BLE Mesh examples (CYBT-213043)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
oger_4716966
Level 1
Level 1
First question asked First reply posted First like received

Hello dear all,

I am trying to do some examples by using "btsdk-mesh" repo on CYBT-213043 module. First of all I want to thank everyone who contributed all the ble mesh related documents and examples. They are really helpful and easy to understand. However, I want to make sure about what I am doing sth correctly. That's why I started this discussion.

I have EZ-BT Mesh Evaluation Kit CYBT-213043 Mesh. Basically, I want to realize provision and control/monitor scenarios by using these 4 boards and not using android/ios/windows helper applications. I added a figure below to make sth more clear.

What I expect from you is, I highlighted/bolded some text below could you please share your comments about that? Thank you

Let me explain the scenario:

1) Create a mesh network over Node A.

     - This node is connected to another mcu over uart. And "Node A" receives all scan/provision/control messages from "Other MCU". I think HCI-UART should be used for this purpose. ( by following the steps inHow to Use HCI Raw Data Mode in CYW20706 - KBA225970 )

2) Follow the provisioner logs over PC.

     - PUART should be used for this.

3)While "Mesh_demo_dimmable_light" example is used for NODE B/C/D, "Mesh_demo_embedded_provisioner" can be used for Node A. Is it suitable or do we have better solutions?

PS: I am using ModusToolbox 2.2 on ubuntu

cypressProvision (2).jpg

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Great, I like the way you approach in designing your project. All the best.

In BLE mesh applications, we recommend to use the HCI UART in WICED_TRANSPORT_UART_HCI_MODE to communicate with external MCUs. Not using HCI UART in RAW mode as suggested in the KBA225970.

We use the HCI control protocolto communicate effectively between the external host and the mesh application layer. And this protocol is already demonstrated in-front of you in the form of meshclientcontrol  host app. You can refer this implementation to port it into the appropriate MCU.

MeshClientControl: btsdk-host-peer-apps-mesh/host at master · cypresssemiconductorco/btsdk-host-peer-apps-mesh · GitHub

HCI Control Protocol: btsdk-docs/WICED-HCI-Control-Protocol.pdf at master · cypresssemiconductorco/btsdk-docs · GitHub

Mesh_demo_embedded_provisioner is an implementation of a dimmable light which also serves as an embedded provisioner and/or self configured device. If you just need an provisioner device, which can be controlled by an external host, you can refer mesh_provision_client application which is supposed to work with meshClientControl. If you need to create an embedded provisioner (ie. the embedded app itself has functionality to search for unprovisioned devices, provision them and configured in to the network without needing an external host to command to it), you can use the code given under "#if defined(EMBEDDED_PROVISION)" in Mesh_demo_embedded_provisioner or use Mesh_demo_embedded_provisioner app itself for demo.

PUART can be used to get the device traces as you said, which will be useful for debugging.

Please refer https://www.cypress.com/products/bluetooth-low-energy-mesh  page to get more details and documents related to BLE mesh.

Thanks,

-Dheeraj

View solution in original post

0 Likes
4 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Great, I like the way you approach in designing your project. All the best.

In BLE mesh applications, we recommend to use the HCI UART in WICED_TRANSPORT_UART_HCI_MODE to communicate with external MCUs. Not using HCI UART in RAW mode as suggested in the KBA225970.

We use the HCI control protocolto communicate effectively between the external host and the mesh application layer. And this protocol is already demonstrated in-front of you in the form of meshclientcontrol  host app. You can refer this implementation to port it into the appropriate MCU.

MeshClientControl: btsdk-host-peer-apps-mesh/host at master · cypresssemiconductorco/btsdk-host-peer-apps-mesh · GitHub

HCI Control Protocol: btsdk-docs/WICED-HCI-Control-Protocol.pdf at master · cypresssemiconductorco/btsdk-docs · GitHub

Mesh_demo_embedded_provisioner is an implementation of a dimmable light which also serves as an embedded provisioner and/or self configured device. If you just need an provisioner device, which can be controlled by an external host, you can refer mesh_provision_client application which is supposed to work with meshClientControl. If you need to create an embedded provisioner (ie. the embedded app itself has functionality to search for unprovisioned devices, provision them and configured in to the network without needing an external host to command to it), you can use the code given under "#if defined(EMBEDDED_PROVISION)" in Mesh_demo_embedded_provisioner or use Mesh_demo_embedded_provisioner app itself for demo.

PUART can be used to get the device traces as you said, which will be useful for debugging.

Please refer https://www.cypress.com/products/bluetooth-low-energy-mesh  page to get more details and documents related to BLE mesh.

Thanks,

-Dheeraj

0 Likes

Dear DheerajP_41​,

Your reply is very helpful and make many things more understandable. I appreciated. I will follow your recommendations.

BTW, After your suggestion I cloned the git repo and check the source code. I will try to implement these codes into my embedded device and use HCI protocol. However, I have small problem. As I use linux computer, I try to run "RunClientControl.sh" script and the gui is opened. I also succesfully connected to "/dev/ACM0" serial port and gave a network name. As soon as I click the "Create button" application crashes. I shared the output below. Did I do something incorrectly ?

A solution for this problem is not very critical and important as I continue with my own code but it could be better if I have a chance to make some demonstration before I start. It clears the air.

./RunClientControl.sh

QApplication: invalid style override passed, ignoring it.

QMetaObject::connectSlotsByName: No matching signal for on_off_tmr_timeout()

QObject::connect: No such slot MainWindow::on_cbCommPort(int)

QObject::connect:  (sender name:   'cbCommPort')

QObject::connect:  (receiver name: 'MainWindow')

*** buffer overflow detected ***: /home/oguzhan/projects/btsdk-host-peer-apps-mesh/host/Qt_ClientControl/Linux64/./mesh_client terminated

======= Backtrace: =========

/lib/x86_64-linux-gnu/libc.so.6(+0x777f5)[0x7f9a4c57c7f5]

/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f9a4c61e21c]

/lib/x86_64-linux-gnu/libc.so.6(+0x117220)[0x7f9a4c61c220]

/lib/x86_64-linux-gnu/libc.so.6(__vswprintf_chk+0xdd)[0x7f9a4c61ce8d]

0 Likes

Dear DheerajP_41​,

I found the problem. it is happened due to L character in Log() function. I mean, if I use Log(L"database ..") instead of Log("database ..") , then *** buffer overflow detected *** error happens. Extended character set causes this problem.

I removed all the L characters and it works as expected.I successfully completed example which is included in https://www.cypress.com/file/462491/download​   document .

Great thanks for your help and we may close this discussion as I got all the things that I need.

Thank you very much for sharing the information.

0 Likes