CYBT-213043-MESH WICED Mesh Models Help

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

cross mob
JoBo_4364091
Level 1
Level 1
First question asked First reply posted

Hello All,

I am fairly new to Modus Toolbox and the WICED framework so I am still getting used to its many forms and functions, especially regarding the new Bluetooth Mesh implementation. I have done a lot of digging around in the code, experimentation and have watched the getting started videos but even now I am finding the framework quite hard to get on with and I was wondering if someone could shine some light on it for me.

To give a quick overview, I am experimenting with the CYBT-213043-MESH kit which is a set of four development boards centred around Cypress's CYBT-213043-02 Bluetooth PSoC module. I want to eventually use these boards and their integrated sensors to share information with each-other, cache any recent network data locally and compare each respective node status against the others on the network.

I have scrolled through a lot of the example code, including the many libraries on GitHub but can’t seem to find a solution that suits my requirements. It seems a lot of the Bluetooth Mesh functionality is tied to these predefined mesh “models” which I am finding to be a bit restricting. I have found the level server/client to be somewhat close to what I need and this is what I have been basing my code on but it is missing some details.

I spend a fair amount of time experimenting with the CANBUS network architecture which handles mesh networking very well, where the node simply specifies its unique ID, message length and data bytes when sending messages out on the network. It would be great if I could do something similar in Bluetooth Mesh but I haven’t seen any examples of a simple raw data client/server model that I can use.

It is important for me to know each node ID on the network so I can organise this data for later comparison but this seems to be commonly omitted from the model's specific message handlers as well so I am stumped…

Are there any clever Cypress people that can point me in the right direction? Any help would be appreciated.

Thank you.

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

Hi JoBo_4364091​,

CYBT-213043-02  is not a PSoC module. Mesh stack implementation is not extended to Cypress PSoC chips.

Please have a look at https://www.cypress.com/products/ble-mesh  to know about Mesh supported cypress chips.

Please install modus and update with BTSDK1.3 from ModusToolbox BT SDK 1.3 . You will be able to find few demo application which are basically the complete demonstration of a particular model/feature of Mesh by using the integrated sensors or peripherals.

For example, if you are using sensor_temperature demo app, it uses the inbuilt temperature sensor to measure the surrounding temperature and publish it over the mesh, so that the nodes which are subscribed to the publish address can receive the temperature data and process it.

Please read the ReadMe.txt to understand how to use/test the application.

There are few models (user scenarios or applications) defined by bluetooth SIG in the mesh spec and we have code examples for each of those models. You can download it from the GitHub. (GitHub - cypresssemiconductorco/Code-Examples-BT-SDK-for-ModusToolbox: These examples demonstrate th...​ ). If you are trying to implement any of these models in your end application, then you can directly use the code examples created by us and implement your own logic on top of it which is suitable for your application. If you want to implement vendor specific model (other than standard models defined in Mesh spec) you can use 'mesh_vendor_specific_app' and create you own logic on top of it.

"I haven’t seen any examples of a simple raw data client/server model that I can use" -> please try to use 'mesh_vendor_specific_app'. (CYBT-213043-MESH\apps\snip\mesh\mesh_vendor_specific_app).

I would suggest you to go through mesh spec also so that you can understand mesh communication more clearly.

https://www.bluetooth.com/specifications/mesh-specifications/

Also we have an excellent appnote where you can understand the implementation more easily.

https://www.cypress.com/file/473921/download

Am I clever?

Thnaks,

-Dheeraj

View solution in original post

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

Hi JoBo_4364091​,

CYBT-213043-02  is not a PSoC module. Mesh stack implementation is not extended to Cypress PSoC chips.

Please have a look at https://www.cypress.com/products/ble-mesh  to know about Mesh supported cypress chips.

Please install modus and update with BTSDK1.3 from ModusToolbox BT SDK 1.3 . You will be able to find few demo application which are basically the complete demonstration of a particular model/feature of Mesh by using the integrated sensors or peripherals.

For example, if you are using sensor_temperature demo app, it uses the inbuilt temperature sensor to measure the surrounding temperature and publish it over the mesh, so that the nodes which are subscribed to the publish address can receive the temperature data and process it.

Please read the ReadMe.txt to understand how to use/test the application.

There are few models (user scenarios or applications) defined by bluetooth SIG in the mesh spec and we have code examples for each of those models. You can download it from the GitHub. (GitHub - cypresssemiconductorco/Code-Examples-BT-SDK-for-ModusToolbox: These examples demonstrate th...​ ). If you are trying to implement any of these models in your end application, then you can directly use the code examples created by us and implement your own logic on top of it which is suitable for your application. If you want to implement vendor specific model (other than standard models defined in Mesh spec) you can use 'mesh_vendor_specific_app' and create you own logic on top of it.

"I haven’t seen any examples of a simple raw data client/server model that I can use" -> please try to use 'mesh_vendor_specific_app'. (CYBT-213043-MESH\apps\snip\mesh\mesh_vendor_specific_app).

I would suggest you to go through mesh spec also so that you can understand mesh communication more clearly.

https://www.bluetooth.com/specifications/mesh-specifications/

Also we have an excellent appnote where you can understand the implementation more easily.

https://www.cypress.com/file/473921/download

Am I clever?

Thnaks,

-Dheeraj

0 Likes

Hi Dheeraj,

Thank you for getting back to me. Sorry I am still getting used to the Cypress product range, I thought I read somewhere it was PSoC.

I have downloaded and installed Modus Toolbox with the BTSDK1.3 included and as I previously stated and I have been looking through a lot of the example code, including the GitHub libraries that work through a lot of the mesh model implementations. I have the documentation open and have read all the ReadMe Files (I actually found the Wikipedia page clarified things better), but I am still struggling to understand how to use the models effectively.

I am finding the level server is the best fit so far as I can send/receive 16-bit signed integers and the property server might also work if I can make any sense of it from the example code. I guess I just don’t like how Bluetooth have added this rigid and complicated model-based abstraction layer – ideally, I would like to ignore this and communicate more directly. Otherwise I have no trouble playing with the other board functions board such as the LEDs and temperature sensor, the WICED backend makes this fairly easy.

I am playing with the vendor specific app as you stated and it looks like you can rigidly define your own models based on existing model structures and handlers and by doing this, I have been able to find a different event handler that parses more information on network events. This is good as this new handler actually specifies the BT node address which is a step in the right direction. I will keep experimenting to see if I can get this working reliably.

I will have another look through those links to see if I can find anything that will help me find a clearer solution. Do you know if it is possible to bypass these models e.g. directly use opcodes to specific your own communication protocols?

Thanks again.

0 Likes

Hi Josh Bowen,

BT-SDK1.4 also released. Please use ModusToolbox BT SDK 1.4​ which is the latest software package for modus.

"Do you know if it is possible to bypass these models e.g. directly use opcodes to specific your own communication protocols?"

You will have to follow SIG mesh rules, restrictions and security measures to enable mesh communication. Models gives one layer of security for different applications. Bluetooth mesh stack resides on top of BLE stack and models are just the application layer where you can implement your own application logic appropriate for the end product. Please let me know what is the real requirement for your end product and why you want to bypass the mesh models?

I would suggest you to go through mesh spec also so that you can understand mesh communication more clearly.

https://www.bluetooth.com/specifications/mesh-specifications/

Also we have an excellent appnote where you can understand the implementation more easily.

https://www.cypress.com/file/473921/download

Thanks,

-Dheeraj

0 Likes

Hi Dheeraj,

Thanks again for your response.

Yes, I figured as much that I wouldn’t be able to do this. Ideally, I would like to define my own extension to the application layer where I can define my own data structures to share on the network. I have noticed that a lot of models only allow you one piece of data per element with a predefined data type, so it would be nice to have more flexibility with the data on each element.

The idea being that if I wanted to say, correlate temperature and light sensor levels or send a cache of historical sensor data with time stamps, I can define a structure to keep this data organised and within the context of one element.

The level server model looks like it will work reasonably well for my current project as I am using the vendor specific message handlers which give more details on the incoming events on the network - most importantly the address of the node that sent the message, along with its respective element.

However, it would still be nice to know if I can define my own element data structures for future reference.

Let me know your thoughts.

Kind regards.

0 Likes

Hi Josh Bowen,

Currently, we have mesh applications which demonstrate each and every model. These are common and general application. So that the users can easily build their end applications with multiple model and also with multiple elements. Some of the complete demonstration apps can be found in BT-SDK\common\apps\demo\mesh (Eg. light_dimmable). Also, models demonstrated in each applications are according to the mesh spe defined by SIG.

For your application, if you want to use both temperature and other sensor, you can select appropriate models and create your own application. for each model you need to define the appropriate structure in the applications to access the model variable and features.

Thanks,

-Dheeraj

0 Likes