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

cross mob

Cypress BLE Mesh Solution

Cypress BLE Mesh Solution

Anonymous
Not applicable

Disclaimer: BLE mesh solution in WICED Studio 6.1 and WICED Studio 6.2 is meant only for evaluation. Limited testing is done for BLE mesh in these releases. Cypress community won't provide any support for BLE mesh until the solution is officially rolled out for the broad market.

 

The Cypress BLE Mesh Solution is fully compliant with the Bluetooth SIG's Mesh Specification and is certified. It is available on WICED studio 6.1 SDK.

 

Part Numbers supported: CYW20706, CYW20719B1

Modules available: CYBT-343026-01 (Based on CYW20706 chip)

Eval Boards: CYBT-343026-EVAL (Based on the CYBT-343026-01 module), CYW920706WCDEVAL based on CYW20706 chip, CYW920719Q40EVB-01 (Based on CYW920719WCD1 module)

Bluetooth Specification: 5.0

Mesh Specification: 1.0

 

The WICED Studio SDK has resources that help in getting started with the BLE Mesh Solution by providing examples projects for all the SIG defined models specified in the Mesh Model Specification 1.0

 

The Mesh firmware examples are available in the WICED Studio in the location: WICED-Studio-6.1\<Platform>\apps\snip\mesh. The Mesh usecase requires a provisioner that creates the network, provisions, configures and control devices of the network. This provisioner can be realized using Cypress's MeshLighting App for Android (located in WICED-Studio-6.1\common\apps\snip\mesh\peerapps\Android\src\bin) or the windows ClientControlMesh Application.

 

Provisioning using MeshLighting Android Application:

 

1) Connect the Eval Board to the PC and load the mesh_onoff_server project. Refer to the corresponding Kit User Guide for details on programming the firmware. Once programmed, the device advertises as an unprovisioned mesh device.

 

2) Copy the apk file of the MeshLighting app to your android phone, install the application and open it.

 

3) In the Options, select "Create Network" and specify a name, say "TestNetwork".

 

pastedImage_0.pngpastedImage_1.png

4) Now you can add your own Rooms in the network. A room is a group of devices that form a part of the whole network, to which commands can be multicasted using a single address. Tap the + icon to add a room and specify a name, say "New Room".

pastedImage_2.png pastedImage_3.png

 

 

5) Tap the ADD DEVICE option to scan for of unprovisioned mesh devices. Once the device is detected, click OK to start the provisioning and also configures the device through series of messages sent to the on/off device. The proxy connection is establish with the first device by default. If the proxy disconnects for some reason, the user can tap the "Connect to proxy" and "Configure" buttons to resume the proxy connection and configuration.

 

6) Repeat step 4 to add any number of other devices to the room. Now we can control the ON/OFF status of the devices in the room by sliding the  ON/OFF switch. We can also specify the transition time. The proxy receives the message and transmits it to the nodes in the network. The change of state in the devices may be indicated by the UART Prints and a LED toggle on the board.

 

pastedImage_5.png

 

7) After receiving the messages, the devices send status, which is displayed in the Phone as shown below:

 

pastedImage_6.png

 

😎 Instead of the mesh_onoff_server example, the mesh_light_hsl_server example can also be used with the App. The App can now modify the Color of the light (By setting Hue, Saturation and Lightness values). The Color setting in the GUI can now be accessed as below.

 

Screenshot_2018-02-09-19-14-53-232_com.cypress.le.mesh.meshapp.pngScreenshot_2018-02-09-19-14-58-481_com.cypress.le.mesh.meshapp.png

 

WICED Studio also provides an example for mesh_onoff_client which acts as a switch for the mesh_onoff_server devices. The device can be provisioned into the network using the App. Upon configuration, the device will be listed as a switch. In the below figure the light1 is a provisioned mesh_onoff_client device and the light2 is a mesh_onoff_server project as indicated by icons.

 

Screenshot_2018-02-15-19-17-54-320_com.cypress.le.mesh.meshapp.png

 

Tap on the light1 to see options for assigning light2 to the switch.

 

Screenshot_2018-02-15-19-18-00-295_com.cypress.le.mesh.meshapp.pngScreenshot_2018-02-15-19-18-09-904_com.cypress.le.mesh.meshapp.png

 

Provisioning using windows ClientControlMesh Application:

 

The ClientControlMesh Application for windows is located in "WICED-Studio-6.1\common\apps\snip\mesh\ClientControl\Release". This application sends WICED HCI commands to devices via HCI UART. This app can be used to perform provisioning by sending commands to an embedded mesh controller device that acts as a provision client. A provisioning client can be realized using the mesh_provision_client example firmware in the SDK. The ClientControlMesh tool sends Mesh events as WICED HCI commands. So make sure the C_FLAGS += -DHCI_CONTROL flag is enabled in the makefile.mk in your project.

 

1) Connect an Eval board to the PC and load the mesh_provison_client example to it.

 

2) Open the ClientControlMesh Application and choose the Light Control Tab. and select the HCI UART COM Port number of the provision client device in the GUI.

 

3) Click the "Open" button. This will configure the provision client device, as shown by the series of messages in Trace box in the bottom.

 

4) Click "Create" button to add a network and name it as say, "TestNetwork"

 

4) Connect one more Eval board to the PC and load the mesh_onoff_server or mesh_level_server or mesh_hsl_server example. The device will advertise as an unprovisioned mesh device.

 

5) Click the "Scan Unprovisioned" button. The provision client will scan for the unprovisioned device and lists the details.

 

6) Click "Stop Scanning" and then "Provision and Configure" buttons. The mesh device will be added to the "TestNetwork" after provisioning and configuration.

 

7) Now commands can be sent and status can be received using the tools in the bottom pane of the ClientControlMesh App. In the figure shown below, the "OnOff serve (0002)" device has been provisioned and the On/Off state of the light can be changed using the Get and Set buttons.

 

😎 Repeat steps 4,5,6,7 to add more devices to the network and control them.

 

cc5.png

 

The ClientControlMesh App can also be used to control switches (say, mesh_Onoff_Client, mesh_hsl_client, mesh_level_client devices) by sending WICED HCI commands.

 

1) Create a network, provision a switch and a light using a provisioner (say MeshLighting Android App or Mesh_provision_client by following the above guidelines.

2) In ClientControl.exe and select the HCI UART COM Port number of the Switch device (say, mesh_onoff_client) in the GUI.

2) Open Models tab.

3) Choose "onoff" from dropdown.

4) Check the "use publication info" and "Reliable" checkboxes.

5)  Set appropriate on/off state and click on set. The light should respond appropriately.

 

clientcontrol.png

 

To unprovision a device from the network, long press the user button on the Eval Board. Now the provisioning process can be started afresh.

 

The base code common for all the Mesh modules are located in:

WICED-Studio-6.1\20706-A2_Bluetooth\libraries\mesh_app_lib

3981 Views
Comments
FaBi_2763241
Level 4
Level 4
10 likes given 5 likes given First like received

mady

This shows how to broadcast  messages to all the nodes of a group. In this example all nodes of the group will be on or off.

It would be useful to know how to direct the message from the proxy to selected nodes on the mesh:

like in a scenario of lighting fixtures each with their own address (as in a dmx network) processing RGB values if their address matches that being relayed.

PrejithP_01
Employee
Employee
First like received First like given

Hi
Phone apps connect to a mesh node which supports proxy , Once connected to a proxy device you can turn on/off any device in the network
if the packet was addressed to the connected proxy it will consume  else the proxy device will rebroadcast/flood the message to the network
the phone app will connect to a proxy device of its network and need not know to which proxy node he is connected
So the requested use case already works (unless you meant something else )


Regards
Prejith

Anonymous
Not applicable

Hello

Does the mesh SDK support custom vendor models or is it just for lighting?

Thanks

VladimirI_26
Employee
Employee
First like received Welcome!

Yes it does. The SDK supports custom vendor models and has example application mesh_vendor_server.

Regards,

Vlad

JoJo_2624151
Level 3
Level 3
First like received First like given

The MeshLighting Android Application has a lot of BUG

MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Could you clarify the bugs you've found 495323976_2624151

madysgup

JoJo_2624151
Level 3
Level 3
First like received First like given

Hi mifo:

For example, doing some operation will flash screen, then go back to the main interface.

For example, some of the lamp icons can not be deleted.

And when we enter "add driver", the lights that have already logged down will automatically disconnect.

The status of the uncertain device after landing is the lamp (the light icon) or the proxy (exclamation mark icon).

Customer experience is very poor. So far, I haven't tested and completed networking.

By the way, the data set of "transintion time" has not been sent to the BT device end. The mobile phone type is HUAWEI honor 6A.

In addition, the mode of timer and scene is not added to APP.

PrejithP_01
Employee
Employee
First like received First like given

Hi

We have tested with pixel and nexus 6 and readme.txt mentions the currently available features on the app (for instance there is no UI available for scenes/timers and these are not bugs)

Regarding transition time : Its a bug and we should have disabled the option from UI , although it works on the device we didn't test using Android MeshController

On 6.1 UI code and framework source code is available for customers to modify and build

In general can you confirm if you are able provision/configure onOff , Hsl Server and add a switch and associate with a bulb

Delete is overloaded with node reset and if UI is not refreshing can you go back to home screen and come back to which ever screen of your intrest

we have not implemented UI refresh and that could be the reason you still see it on screen

JoJo_2624151
Level 3
Level 3
First like received First like given

Thank you for your reply and suggestion. I believe you are making efforts to make APP more perfect.

JeLi_2512051
Level 1
Level 1
Distributor - Weikeng(GC)
First like received First like given Welcome!

Hi

As I find in the Buletooth SIG website:Launch Studio - Listing Search, the cypress has launched several Buletooth Module passed the Mesh profile, such as CYBLE-473143-01. But I cant find the module information in Cypress website.

Can you provide the Bluetooth module roadmap including the mesh modules which pass the certification of SIG mesh?

JeLi_2512051
Level 1
Level 1
Distributor - Weikeng(GC)
First like received First like given Welcome!

Add screenshot of Cypress Mesh module  from Bluetooth SIG website.  pastedImage_0.png

MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

CYW20706 - Broad Market Production

CYW20719 - Broad Market Production

CYW20735 - Production for Early Adapter customers, Broad Market under consideration for Q2

LeCa_2156671
Level 4
Level 4
First like received First like given

Hi,

I have a problem when provisioning using Meshlighting.apk.

I connect to the eval board of 20706 and programmed mesh_onoff_server to the board.

But 20706 seems not advertising.I can't scan it with meshlighting.apk or Bluetooth ellisys.

My log is as below,seems mesh start correctly:

Mesh Start

mesh_management_cback: 15

management_cback: LOCAL_IDENTITY_KEYS_REQUEST_EVT: result:0 keys:

mesh_management_cback: 0

***** Free mem before app_init:32012

## mesh_application_init ##

wiced_bt_gatt_register: 0

ds1:0x00504000, len:0x0007e000

ds2:0x00582000, len:0x0007e000

platform btp: Config_DS_Location 0x00003000, Config_VS_Location:0x00001000

WARNING: Upgrade will fail - active DS is not one of the expected locations

WARNING: Are ConfigDSLocation and DLConfigVSLocation in the .btp set up as in nv_loc_len[]?

mesh_application_init: wiced_bt_mesh_core_ota_fw_upgrade_init failed

mesh_application_init: unprovisioned GATT DB status:0

wiced_bt_mesh_model_onoff_server_init

mesh deftt init

def trans time:0

Failed to write nv

wiced_bt_mesh_model_scene_server_init

scene_server_delete_all bytes:0

wiced_bt_mesh_model_scheduler_server_init

No sched events

time srvr init

wiced_bt_mesh_model_onoff_server_init

mesh deftt init

def trans time:0

Failed to write nv

wiced_bt_mesh_model_scene_server_init

scene_server_delete_all bytes:0

wiced_bt_mesh_model_scheduler_server_init

No sched events

wiced_bt_mesh_model_onoff_server_init

mesh deftt init

def trans time:0

Failed to write nv

wiced_bt_mesh_model_scene_server_init

scene_server_delete_all bytes:0

wiced_bt_mesh_model_scheduler_server_init

No sched events

***** Free mem after app_init:30052

MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Can you post this as a new discussion thread lemancai​ as the level 1 team is not always monitoring comments against blogs.  Discussion threads are monitored and responded to as part of their daily flow.

Anonymous
Not applicable

Hi Jess,

It is yet to be launched. The timeline is not yet confirmed.

Regards,

-Madhu

LeCa_2156671
Level 4
Level 4
First like received First like given

Hi,

I'm confused when using mesh by two or more mobile phones.

For example,

I use phoneA as provisioner, and add a light into mesh.

How can I control it with phoneB.

In the sample apk, I see apk store netkey and other information in local sql,then how to synchronization these

meshnet information with other phones?

Maybe I can use phoneA as provisioner and add phoneB into meshnet?Seems can't if phoneB do not support peripheral mode.

Even if it can be done, how can phoneB know that there is already a light in the meshnet?

By the way, do you have a plan on ios app sample about mesh?

Anonymous
Not applicable

The existing app on 6.1 can be used to create a network of mesh devices with only phone and can be used for evaluation

  1. The upcoming 6.2 release, the android app stores mesh data in json file (as suggested by the spec) in external storage: The public api will be given in sources and developers can change the location based on their requirement
  2. #1 will open up usecase of sharing of provisioning data b/w multiple phones (The responsibility of syncing of data will fall on the app developer scope)
  3. Once the data is shared b/w phones (Say A to B) , Phone B can use Cypress Android Mesh Controller and while opening the network, the phone B provides his provisioner name, if the name is unique it will add a new provisioner name to same json file.

Please create a new discussion for future issues with this feature.